Device positioning method and apparatus, and electronic device

By acquiring multiple positioning parameters, determining the degree of interference with the wireless signal, and adjusting the positioning method, the problem of insufficient indoor positioning accuracy was solved, and higher precision indoor positioning was achieved.

CN116233738BActive Publication Date: 2026-11-20GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310248160.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2026-11-20
Estimated Expiration
2043-03-14

AI Technical Summary

Technical Problem

Existing indoor positioning methods lack accuracy, especially when wireless signals are interfered with by obstacles such as walls, resulting in significant errors in the positioning system, and they cannot effectively distinguish whether the current wireless signal is being interfered with.

Method used

By acquiring multiple generated first positioning parameters, the current communication environment information is obtained based on the multiple first positioning parameters. This characterizes the degree of interference of the wireless signal transmitted between the first electronic device and the second electronic device, and positioning is performed based on the positioning method corresponding to the communication environment information.

Benefits of technology

The accuracy of positioning has been improved. By confirming the current communication environment and adopting appropriate positioning methods, the accuracy of indoor positioning of electronic devices has been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233738B_ABST
    Figure CN116233738B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a device positioning method and device and electronic device. The method comprises: obtaining a plurality of first positioning parameters generated at different times to obtain a plurality of first positioning parameters, the first positioning parameters being generated by a first electronic device each time according to a wireless signal transmitted by a second electronic device; obtaining current communication environment information based on the plurality of first positioning parameters, the communication environment information representing a degree of interference of a wireless signal transmitted between the first electronic device and the second electronic device; and positioning the first electronic device based on a positioning mode corresponding to the communication environment information. In this way, the current communication environment (communication environment information) of the first electronic device is confirmed by obtaining the first positioning parameters generated at different times, and the current communication environment of the first electronic device can be accurately determined, so that the first electronic device can be positioned by using a corresponding positioning mode according to the current communication environment, thereby improving the positioning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of positioning technology, and more specifically, to a device positioning method, apparatus, and electronic device. Background Technology

[0002] With the development of technology, the demand for positioning electronic devices is increasing. For example, in indoor scenarios, positioning of electronic devices can enable real-time acquisition of their location. However, the accuracy of these positioning methods still needs improvement. Summary of the Invention

[0003] In view of the above problems, this application proposes a device positioning method, apparatus, and electronic device to improve the above problems.

[0004] In a first aspect, this application provides a device positioning method applied to a first electronic device. The method includes: acquiring multiple generated first positioning parameters to obtain a plurality of first positioning parameters, wherein the first positioning parameters are generated by the first electronic device each time based on a wireless signal transmitted by a second electronic device; acquiring current communication environment information based on the plurality of first positioning parameters, wherein the communication environment information characterizes the degree of interference of the wireless signal transmitted between the first electronic device and the second electronic device; and positioning the first electronic device based on a positioning method corresponding to the communication environment information.

[0005] Secondly, this application provides a device positioning apparatus operating on a first electronic device. The apparatus includes: a parameter acquisition unit, configured to acquire multiple generated first positioning parameters to obtain a plurality of first positioning parameters, wherein the first positioning parameters are generated by the first electronic device each time based on a wireless signal transmitted by a second electronic device; an environment determination unit, configured to acquire current communication environment information based on the plurality of first positioning parameters, wherein the communication environment information characterizes the degree of interference of the wireless signal transmitted between the first electronic device and the second electronic device; and a positioning unit, configured to locate the first electronic device based on a positioning method corresponding to the communication environment information.

[0006] Thirdly, this application provides an electronic device including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors to implement the above-described method.

[0007] Fourthly, this application provides a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run by a processor.

[0008] This application provides a device positioning method, apparatus, and electronic device. After acquiring multiple generated first positioning parameters to obtain multiple first positioning parameters, the current communication environment information can be obtained based on the multiple first positioning parameters. When the communication environment information indicates the degree of interference in the wireless signal transmitted between the first electronic device and a second electronic device, the first electronic device can be positioned based on the positioning method corresponding to the communication environment information. Therefore, by acquiring multiple generated first positioning parameters, the current communication environment (communication environment information) of the first electronic device can be confirmed, thereby accurately determining the current communication environment of the first electronic device. Based on the current communication environment, a corresponding positioning method can be adopted to locate the first electronic device, thus improving positioning accuracy. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 A schematic diagram illustrating an application scenario of the device positioning method proposed in this application is shown.

[0011] Figure 2 A flowchart of a device positioning method according to an embodiment of this application is shown;

[0012] Figure 3 A schematic diagram illustrating the replacement of positioning parameters in an embodiment of this application is shown;

[0013] Figure 4 The diagram illustrates the positioning accuracy of various positioning methods in different environments according to embodiments of this application.

[0014] Figure 5 A flowchart of a device positioning method according to another embodiment of this application is shown;

[0015] Figure 6 A schematic diagram illustrating the acquisition of multiple first values ​​is shown in an embodiment of this application;

[0016] Figure 7 A schematic diagram illustrating the acquisition of multiple second values ​​in an embodiment of this application is shown;

[0017] Figure 8 A flowchart of a device positioning method according to another embodiment of this application is shown;

[0018] Figure 9A flowchart of a device positioning method according to another embodiment of this application is shown;

[0019] Figure 10 A flowchart of a device positioning method according to another embodiment of this application is shown;

[0020] Figure 11 A flowchart of a device positioning method proposed in another embodiment of this application is shown;

[0021] Figure 12 A structural block diagram of a device positioning apparatus according to an embodiment of this application is shown;

[0022] Figure 13 This invention illustrates a structural block diagram of an electronic device for performing a device positioning method according to an embodiment of the present invention.

[0023] Figure 14 The present application shows a storage unit for storing or carrying program code that implements the device positioning method according to the embodiments of the present application. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0025] By locating electronic devices, their position in their environment can be determined in real time. For example, in an indoor setting, the device's location can be determined in real time.

[0026] However, the inventors discovered during their research that the accuracy of the relevant positioning methods still needs improvement. For example, in indoor positioning, the system can rely on wireless signals. However, the presence of obstacles such as walls can cause wireless signals to be reflected, refracted, or even completely blocked, interfering with the signal and causing significant errors in the positioning system. Furthermore, the existing technologies cannot effectively distinguish whether the current wireless signal is being interfered with.

[0027] Therefore, the inventors have proposed the device positioning method, apparatus, and electronic device of this application. After obtaining multiple first positioning parameters generated multiple times, the current communication environment information can be obtained based on the multiple first positioning parameters. When the communication environment information characterizes the degree of interference in the wireless signal transmitted between the first electronic device and the second electronic device, the first electronic device can be located based on the positioning method corresponding to the communication environment information. Thus, by obtaining multiple first positioning parameters, the current communication environment (communication environment information) of the first electronic device can be confirmed, thereby accurately determining the current communication environment of the first electronic device. Based on the current communication environment, a corresponding positioning method can be adopted to locate the first electronic device, thereby improving the accuracy of positioning.

[0028] The application scenarios involved in the embodiments of this application will be introduced below.

[0029] Please see Figure 1 ,exist Figure 1 The scenario depicted includes electronic device 10 and electronic device 11. Electronic device 10 can periodically transmit wireless signals, and electronic device 11 can locate itself based on the received wireless signals transmitted by electronic device 10. Optionally, electronic device 10 can transmit wireless signals based on the UWB (Ultra Wide Band) protocol. In this case, the wireless signals transmitted by electronic device 10 can be understood as UWB wireless signals, and electronic device 11 can then locate itself based on these UWB wireless signals. For example, electronic device 11 can be located using UWB three-dimensional AOA (Angle-of-Arrival) positioning technology. When electronic device 10 locates itself based on UWB wireless signals, it can also be equipped with a UWB tag. Electronic device 10 can also transmit wireless signals for positioning based on other protocols, such as Bluetooth or WiFi.

[0030] Optionally, the electronic device 10 can be configured for smartphones, tablets, wearable devices, or robots.

[0031] It should be noted that electronic device 10 can be used as the first electronic device in subsequent embodiments, and electronic device 11 can be used as the second electronic device in subsequent embodiments.

[0032] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0033] Please see Figure 2This application provides a device positioning method, applied to a first electronic device, the method comprising:

[0034] S110: Obtain the first positioning parameters generated multiple times to obtain multiple first positioning parameters. The first positioning parameters are generated by the first electronic device each time based on the wireless signal transmitted by the second electronic device.

[0035] In this embodiment, the positioning parameter is a parameter used to locate the first electronic device. The first positioning parameter can be understood as a parameter generated by the first electronic device based on the wireless signal emitted by the second electronic device, used to locate the first electronic device. Optionally, the second electronic device can periodically emit wireless signals, and correspondingly, the first electronic device can obtain the first positioning parameter based on the wireless signal each time it receives the wireless signal emitted by the second electronic device.

[0036] Optionally, the first positioning parameter may include an angle parameter and a distance parameter. The angle parameter may characterize the angle of arrival (e.g., AOA angle of arrival) of the wireless signal transmitted by the second electronic device, and the distance parameter may characterize the distance between the second electronic device and the first electronic device.

[0037] If the first electronic device remains stationary or moves, and the interference with the wireless signal transmitted by the second electronic device is minimal, then the first positioning parameter generated based on the wireless signal can remain constant or change slowly. Conversely, if the interference with the wireless signal transmitted by the second electronic device is significant, the generated first positioning parameter will become abnormal, for example, suddenly increasing or decreasing. Therefore, by acquiring multiple generated first positioning parameters, the current communication environment of the first electronic device can be determined.

[0038] One of the positioning parameters can be understood as the first positioning parameter obtained in a positioning process. In the embodiments of this application, the number of the first positioning parameters obtained can be determined in a variety of ways.

[0039] As a deterministic approach, this can be configured by the developers during factory settings. In this method, the developers can store the configured quantity in the first electronic device. Before the first electronic device responds to a positioning command to obtain the generated first positioning parameters, it can first read the configured quantity and then obtain the corresponding multiple sets of first positioning parameters based on the read quantity. For example, if the read quantity is N, then N sets of generated first positioning parameters can be obtained. In this method, the first electronic device can also update the configured quantity through system updates.

[0040] As another method of determination, the configuration can be performed by the user of the electronic device. In this method, the first electronic device can provide a configuration interface, on which the user can select the desired number of first positioning parameters. After the user selects the number of first positioning parameters, the first electronic device can store the selected number. Correspondingly, in this method, the first electronic device can also retrieve the first positioning parameters according to the number pre-configured by the user when it is necessary to retrieve multiple generated first positioning parameters.

[0041] As another method of determination, the first electronic device can determine the number of first positioning parameters to be acquired based on the current actual situation.

[0042] Optionally, the first electronic device can determine the number of first positioning parameters to be acquired based on the currently available processing resources. It should be noted that the more first positioning parameters acquired by the first electronic device, the more processing resources will be consumed during the processing of these parameters. However, the processing resources of the first electronic device are usually limited. Excessive consumption of these resources may negatively impact its operation. For example, these processing resources may include processor resources and / or battery power. If the first electronic device is currently running a large number of applications, or running resource-intensive applications, and still consumes excessive processing resources for processing the first positioning parameters, it may cause the first electronic device to lag or experience rapid battery drain.

[0043] In this process, the first electronic device consumes processor resources and power while running applications or performing data calculations. To avoid excessively impacting the operation of the first electronic device, the number of first positioning parameters acquired by the first electronic device is proportional to the remaining processing resources of the first electronic device. Therefore, the less processing resources the first electronic device has remaining, the fewer first positioning parameters it can acquire; conversely, the more processing resources the first electronic device has remaining, the more first positioning parameters it can acquire.

[0044] Optionally, the remaining processing resources of the first electronic device can be compared with a resource threshold. If the remaining processing resources are less than the resource threshold, a first quantity of first positioning parameters is obtained. If the remaining processing resources are not less than the resource threshold, a second quantity of first positioning parameters is obtained. This second quantity is greater than the first quantity.

[0045] In this embodiment of the application, in order to obtain the current communication environment of the first electronic device more promptly, the first positioning parameters generated most recently can be obtained.

[0046] In one approach, the first electronic device can store the first positioning parameter generated each time in relation to its corresponding generation time. In this method, the first electronic device retrieves the most recently generated first positioning parameters based on the time interval between the corresponding generation time and the current time. For example, first positioning parameters whose generation time is less than a specified time threshold can be used as the first positioning parameters to be retrieved from the multiple generation times.

[0047] Alternatively, the first electronic device can store only a specified number of first positioning parameters, specifically the most recently acquired first positioning parameters. In this method, if a new first positioning parameter is generated after the specified number of stored first positioning parameters has been reached, the newly generated first positioning parameter can replace the stored first positioning parameter whose generation time is furthest from the current time. For example, as shown... Figure 3 As shown, if the stored first positioning parameters include first positioning parameter D1, first positioning parameter D2, first positioning parameter D3 and first positioning parameter D4, and a new first positioning parameter D5 is generated at the current time, then the first positioning parameter D1 with the longest generation time will be replaced by the first positioning parameter D5.

[0048] In this approach, if the specified quantity is the same as the number of first positioning parameters to be acquired, all stored positioning parameters can be directly read as the most recently generated first positioning parameters. For example, if the specified quantity is M, the first electronic device will store the most recently acquired M first positioning parameters after acquiring M first positioning parameters. Furthermore, if the number of first positioning parameters used by the first electronic device to determine communication environment information is also M, the first electronic device can directly read the stored M first positioning parameters.

[0049] Optionally, the first positioning parameters that need to be stored can be stored in the first electronic device in the form of a sliding window queue. The window of this sliding window queue represents the number of first positioning parameters that can be stored. Alternatively, the number of first positioning parameters acquired by the first electronic device can be the same as the size of the window, and the size of the window can be dynamically changed.

[0050] S120: Obtain current communication environment information based on multiple first positioning parameters. The communication environment information characterizes the degree of interference to the wireless signal transmitted between the first electronic device and the second electronic device.

[0051] After obtaining multiple first positioning parameters, the current communication environment information can be determined based on the changes in the magnitude of these parameters, thereby obtaining the communication environment in which the first electronic device is located. It should be noted that, in this embodiment, the communication environment can be understood as the impact of the environment in which the first electronic device is located on wireless signal transmission. Correspondingly, the communication environment information can characterize the degree of interference to the transmitted wireless signal under the corresponding communication environment. For different communication environment information, the degree of interference to the wireless signal transmitted between the first electronic device and the second electronic device can be different.

[0052] In one embodiment of this application, the communication environment information may include a first communication environment information and a second communication environment information. The first communication environment information indicates that the communication environment in which the first electronic device operates is poor, and consequently, that the wireless signal transmitted by the second electronic device will be subject to significant interference. The second communication environment information indicates that the communication environment in which the first electronic device operates is good, and consequently, that the wireless signal transmitted by the second electronic device will be subject to less interference, or even no interference. Optionally, the communication environment represented by the first communication environment information may be an NLOS (Non-Line of Sight) area, and the communication environment represented by the second communication environment information may be a LOS (Line of Sight) area.

[0053] It should be noted that, in this embodiment, the types of communication environment information can be determined based on the degree of interference detected in the wireless signal, and the number of types of communication environment information is not specifically limited. For example, in addition to the aforementioned first and second communication environment information, third communication environment information, etc., may also be included.

[0054] S130: Locate the first electronic device based on the positioning method corresponding to the communication environment information.

[0055] It should be noted that, as mentioned earlier, the degree of interference to the wireless signals emitted by the second electronic device varies under different communication environments, and consequently, the accuracy of positioning based on these wireless signals will also be affected to varying degrees. For example... Figure 4As shown, the first electronic device (electronic device 10) can locate itself based on the wireless signals emitted by the second electronic device (electronic device 11), thereby determining the movement trajectory of the first electronic device. Specifically, between location points P1 and P2, the wireless signals emitted by the second electronic device experience less interference (e.g., in a LOS region), so the trajectory obtained based on wireless signal positioning is relatively consistent with the actual trajectory, as shown in the figure. However, between location points P2 and P3, the wireless signals emitted by the second electronic device experience greater interference (e.g., in a NLOS region), so the trajectory obtained based on wireless signal positioning differs significantly from the actual trajectory, as shown in the figure.

[0056] Therefore, after determining the communication environment information, a suitable positioning method can be selected to locate the first electronic device based on the determined communication environment information. Optionally, if the first communication environment information is determined, a positioning method that does not rely on wireless signals or has minimal reliance on wireless signals can be used to locate the first electronic device. For example, a visual-inertial method can be used to locate the first electronic device. Optionally, if the second communication environment information is determined, the first electronic device can be located based on the wireless signals emitted by the second electronic device, or a combination of the wireless signals emitted by the second electronic device and a visual-inertial method can be used to locate the first electronic device.

[0057] It's important to note that Visual-Inertial System (VINS) is an algorithm that integrates camera and IMU (Inertial Measurement Unit) data to achieve Simultaneous Localization and Mapping (SLAM). First, VINS aligns the pose sequences estimated by the IMU with those estimated by the camera to estimate the true scale of the camera trajectory. Furthermore, the IMU can accurately predict the pose of image frames and the positions of feature points from the previous moment in the next frame, improving the matching speed of feature tracking algorithms and their robustness against rapid rotations. Then, the gravity vector provided by the velocities of the IMU converts the estimated position into the world coordinate system required for actual navigation, enabling device localization. VINS combines the advantages of both visual and IMU approaches for accurate trajectory prediction and is unaffected by the wireless environment.

[0058] This embodiment provides a device positioning method. After obtaining multiple generated first positioning parameters, the current communication environment information can be obtained based on these parameters. If the communication environment information indicates the degree of interference in the wireless signal transmission between a first electronic device and a second electronic device, the first electronic device can be located based on the positioning method corresponding to the communication environment information. Therefore, by obtaining multiple generated first positioning parameters, the current communication environment (communication environment information) of the first electronic device can be confirmed, thereby accurately determining the current communication environment of the first electronic device. This allows for the adoption of a corresponding positioning method based on the communication environment to improve positioning accuracy.

[0059] Please see Figure 5 This application provides a device positioning method for electronic devices, the method comprising:

[0060] S210: Obtain the first positioning parameters generated multiple times to obtain multiple first positioning parameters. The first positioning parameters are generated by the first electronic device each time based on the wireless signal transmitted by the second electronic device.

[0061] S220: Obtain the corresponding parameter features based on multiple first positioning parameters.

[0062] In this embodiment, corresponding parameter features can be calculated based on the acquired multiple first positioning parameters. These parameter features can be used to characterize the changes in the multiple first positioning parameters. Furthermore, in this embodiment, there can be multiple methods for acquiring the parameter features.

[0063] One approach is to directly calculate the corresponding parameter features based on multiple first positioning parameters. Alternatively, the average of the multiple first positioning parameters can be directly calculated as the corresponding parameter feature, or the median of the multiple first positioning parameters can be directly used as the corresponding parameter feature.

[0064] As another approach, multiple first positioning parameters can be differentiated first, and then the corresponding parameter features can be calculated based on the multiple values ​​obtained after differentiation.

[0065] Optionally, the first value corresponding to each pair of adjacent first positioning parameters can be obtained from multiple first positioning parameters to obtain multiple first values. Each first value is the ratio of the difference between adjacent first positioning parameters to the time interval between adjacent first positioning parameter generation. The parameter features of these multiple first values ​​are then obtained as the parameter features corresponding to the multiple first positioning parameters. Specifically, after receiving a wireless signal from the second electronic device, the first electronic device can perform a first positioning parameter generation operation based on that received wireless signal. Adjacent operations can be understood as two adjacent first positioning parameter generation operations. The generation time corresponding to the first positioning parameter generation can be used to determine the parameters generated between adjacent operations. In this approach, the multiple first values ​​can be understood as values ​​obtained after differentiating multiple first positioning parameters. The parameter features corresponding to these multiple first values ​​can then be obtained through a predetermined method as the parameter features corresponding to the multiple first positioning parameters.

[0066] For example, such as Figure 6 The multiple first positioning parameters shown include first positioning parameter D2, first positioning parameter D3, first positioning parameter D4, first positioning parameter D5, and first positioning parameter D6. The generation order of these multiple first positioning parameters is as follows: Figure 6 As shown, based on Figure 6 In the scenario shown, the first positioning parameter D3 is generated adjacent to the first positioning parameter D2. Therefore, a corresponding first value, a1, can be calculated based on the first positioning parameter D2 and the first positioning parameter D3. Furthermore, the first positioning parameter D3 is also generated adjacent to the first positioning parameter D4. Thus, a corresponding first value, a2, can be calculated based on the first positioning parameter D3 and the first positioning parameter D4. This process continues to yield the first values ​​a3 and a4, which can then be used to calculate... Figure 6 a1, a2, a3, and a4 are used as multiple first values ​​to calculate the corresponding parameter characteristics.

[0067] S230: Obtain current communication environment information based on parameter characteristics. The communication environment information characterizes the degree of interference to the wireless signal transmitted between the first electronic device and the second electronic device.

[0068] S240: Locate the first electronic device based on the positioning method corresponding to the communication environment information.

[0069] In the process of calculating parameter features based on multiple first numerical values, there are also multiple ways to calculate parameter features.

[0070] One approach is to obtain the standard deviations of multiple first values, which can then be used as multiple first positioning parameters to acquire corresponding parameter features. In this method, the obtained standard deviations can be compared with corresponding thresholds, and the current communication environment information can be determined based on the comparison results.

[0071] Optionally, if the standard deviation is greater than a first standard deviation threshold, the current communication environment information is determined as the first communication environment information; if the standard deviation is not greater than the first standard deviation threshold, the current communication environment information is determined as the second communication environment information. The degree of interference represented by the first communication environment information is greater than the degree of interference represented by the second communication environment information. It should be noted that if the standard deviations corresponding to multiple first values ​​are greater than the first standard deviation threshold, it indicates that there are relatively large fluctuations among the multiple first values, which in turn indicates that there are abnormally fluctuating first positioning parameters. Therefore, the communication environment information of the first electronic device can be determined as the first communication environment information. If the standard deviations corresponding to multiple first values ​​are not greater than the first standard deviation threshold, it indicates that the fluctuations among the multiple first values ​​are relatively gradual, which in turn indicates that the changes in the multiple first positioning parameters are not significant. Therefore, the communication environment information of the first electronic device can be determined as the second communication environment information.

[0072] In one approach, the first positioning parameter includes angle parameters. In this approach, the first value corresponding to each pair of adjacent generated angle parameters can be obtained from multiple angle parameters, resulting in multiple first values. Each first value is the ratio of the difference between the corresponding adjacent generated angle parameters to the duration between adjacent generated angle data. Here, the adjacent generated angle parameters can be understood as the angle parameters included in each of the adjacent generated first positioning parameters.

[0073] As another approach, the first positioning parameter includes a distance parameter. In this approach, the first value corresponding to each pair of adjacent generated distance parameters can be obtained from multiple distance parameters, resulting in multiple first values. Each first value is the ratio of the difference between the corresponding adjacent generated distance parameters to the duration between adjacent generated distance parameters. The adjacent generated distance parameters can be understood as the angle parameters included in each of the adjacent generated first positioning parameters.

[0074] As another approach, the first positioning parameter can include both angle and distance parameters. In this approach, a first value can be obtained based on multiple angle parameters. The method for obtaining the first value based on multiple angle parameters is the same as the previously described method and will not be repeated here.

[0075] Furthermore, the difference between each pair of adjacent distance parameters generated in multiple distance parameters can be obtained to obtain multiple distance differences. The second value corresponding to each pair of adjacent distance differences can be obtained to obtain multiple second values. The second value is the ratio of the difference between the corresponding adjacent distance differences to the duration between adjacent generation distance data. The adjacent generation distance parameters corresponding to each adjacent distance difference include distance parameters generated in the same time.

[0076] For example, such as Figure 7 As shown, multiple distance parameters include distance parameter J2, distance parameter J3, distance parameter J4, distance parameter J5, and distance parameter J6. Among them, based on... Figure 7 In the scenario shown, distance parameter J3 is generated adjacent to distance parameter J2. Therefore, a corresponding distance difference, b1, can be calculated based on distance parameter J2 and distance parameter J4. Furthermore, distance parameter J3 is also generated adjacent to distance parameter J4, so a corresponding distance difference, b2, can be calculated based on distance parameter J3 and distance parameter J4. This process continues to yield distance differences b3 and b4, which can then be used to calculate the distance difference between distance parameters J2 and J4. Figure 7 b1, b2, b3, and b4 are considered as multiple distance differences.

[0077] Specifically, the adjacent generated distance parameters corresponding to distance difference b1 include distance parameters J2 and J3, and the adjacent generated distance parameters corresponding to distance difference b2 include distance parameters J3 and J4. Therefore, distance differences b1 and b2 can be considered as a pair of adjacent distance differences. Similarly, distance differences b2 and b3 can be considered as a pair of adjacent distance differences, and distance differences b3 and b4 can be considered as a pair of adjacent distance differences. Then, based on the adjacent distance differences b1 and b2, the corresponding second value c1 can be obtained; based on the adjacent distance differences b2 and b3, the corresponding second value c2 can be obtained; and based on the adjacent distance differences b3 and b4, the corresponding second value c3 can be obtained.

[0078] Because the first positioning parameter can simultaneously include distance and angle parameters, multiple first numerical values ​​and multiple second numerical values ​​of parameter features can be obtained as multiple first positioning parameters to acquire corresponding parameter features. Correspondingly, when the acquired parameter features include those based on multiple first numerical values ​​and those based on multiple second numerical values, these two sets of parameter features can be compared separately to determine the current communication environment information.

[0079] Optionally, the parameter characteristics of the multiple first values ​​are the standard deviations of the multiple first values, and the parameter characteristics of the multiple second values ​​are the standard deviations of the multiple second values. In this case, obtaining the current communication environment information based on the parameter characteristics may include: if the standard deviations of the multiple first values ​​are greater than a second standard deviation threshold and greater than a third standard deviation threshold, the current communication environment information is determined to be a first communication environment; if the standard deviations of the multiple first values ​​are not greater than the second standard deviation threshold, or the standard deviations of the multiple second values ​​are not greater than the third standard deviation threshold, the current communication environment information is determined to be second communication environment information. The second standard deviation threshold can be the same as the aforementioned first standard deviation threshold.

[0080] It should be noted that when obtaining the parametric features of multiple first values ​​or multiple second values, in addition to using the standard deviation, other methods can be used to determine the parametric features. For example, the median, variance, mean, and mode can also be used to calculate the parametric features of multiple first values ​​or multiple second values.

[0081] This embodiment provides a device positioning method that, through the aforementioned approach, allows for the confirmation of the current communication environment of a first electronic device by acquiring multiple generated first positioning parameters. This enables accurate determination of the communication environment and allows for the adoption of appropriate positioning methods to locate the first electronic device, thereby improving positioning accuracy. Furthermore, in this embodiment, after acquiring multiple generated first positioning parameters, the parameter characteristics of the multiple generated first positioning parameters can be determined based on the difference between adjacent generated first positioning parameters and the time interval between adjacent generation. These parameter characteristics are then used to more accurately determine the current communication environment of the first electronic device, allowing the electronic device to employ a more accurate and suitable positioning method for positioning.

[0082] Please see Figure 8 This application provides a device positioning method for electronic devices, the method comprising:

[0083] S310: Obtain the first positioning parameters generated multiple times to obtain multiple first positioning parameters. The first positioning parameters are generated by the first electronic device each time based on the wireless signal transmitted by the second electronic device.

[0084] S320: Obtain the corresponding parameter features based on multiple first positioning parameters.

[0085] S330: The positioning parameters are obtained based on the visual inertial positioning method and used as the second positioning parameters.

[0086] The first electronic device can calculate the current positioning parameters based on multiple angle parameters, and use them as the second positioning parameters.

[0087] S340: Based on parameter features and the second positioning parameters, obtain the current communication environment information, which characterizes the degree of interference to the wireless signal transmitted between the first electronic device and the second electronic device.

[0088] As mentioned above, the first positioning parameters used to calculate the parameter features are obtained based on wireless signals, while the second positioning parameters are obtained based on visual-inertial positioning methods that do not rely on wireless signals. Combining these two methods can more accurately infer the current communication environment information.

[0089] In this approach, the current communication environment information can be preliminarily determined based on parameter characteristics, and then the second positioning parameter can be used to confirm the preliminarily determined communication environment information, thereby improving the accuracy of the communication environment determination.

[0090] As one approach, if the current communication environment information is determined to be the first communication environment information based on parameter characteristics, then the first communication environment information can be used as the current communication environment information. If the current communication environment information is determined to be the second communication environment information based on parameter characteristics, the difference between the second positioning parameter and the first positioning parameter obtained at the corresponding time is obtained. If the difference is greater than a specified threshold, the current communication environment information is determined to be the first communication environment information; otherwise, the current communication environment information is determined to be the second communication environment information. It should be noted that the corresponding time of the second positioning parameter can be understood as the time when the second positioning parameter is generated. At the same time, the first electronic device can use the wireless signal emitted by the second electronic device to generate the corresponding first positioning parameter, and simultaneously obtain the second positioning parameter based on visual inertial positioning. If the difference between the first positioning parameter and the second positioning parameter generated at the same time is large (for example, greater than a specified threshold), it indicates that the current communication environment is poor, and thus the current communication environment information can be determined to be the first communication environment information.

[0091] Optionally, the first positioning parameter includes an angle parameter and a distance parameter, and the second positioning parameter includes an angle parameter and a distance parameter. If the difference is greater than a specified threshold, the current communication environment information is determined to be the first communication environment information, including: if the difference between the first positioning parameter (including the angle parameter) and the second positioning parameter (including the angle parameter) is greater than a first specified threshold, and the difference between the first positioning parameter (including the distance parameter) and the second positioning parameter (including the distance parameter) is greater than a second specified threshold, the current communication environment information is determined to be the first communication environment information. If the difference between the first positioning parameter (including the angle parameter) and the second positioning parameter (including the angle parameter) is not greater than the first specified threshold, or if the difference between the first positioning parameter (including the distance parameter) and the second positioning parameter (including the distance parameter) is not greater than the second specified threshold, the current communication environment information is determined to be the second communication environment information.

[0092] S350: Locate the first electronic device based on the positioning method corresponding to the communication environment information.

[0093] The following is through Figure 9 The process involved in this embodiment will be explained below.

[0094] like Figure 9 As shown, after the process begins, a first positioning parameter and a second positioning parameter can be acquired once. Then, based on the acquired first positioning parameter and the first positioning parameters acquired in the past, multiple generated first positioning parameters are obtained, and the multiple generated first positioning parameters are differentiated to obtain the corresponding parameter features. If the parameter feature is determined to be greater than a threshold, the current communication environment information is determined to be the first communication environment information (e.g., the first electronic device is in an NLOS region). Otherwise, it is further detected whether this is the first time positioning is performed (e.g., whether it is the first time the first positioning parameter is acquired). If it is the first time positioning is performed, the current communication environment information is determined to be the second communication environment information (e.g., the first electronic device is in a LOS region). Otherwise, the residual is further acquired and compared. The residual can be understood as the difference between the first positioning parameter and the second positioning parameter generated at the same time.

[0095] If this is not the first time the location has been established, it can be checked whether the residual is greater than the corresponding threshold. If it is, the current communication environment information is determined to be the first communication environment information; otherwise, the current communication environment information is determined to be the second communication environment information.

[0096] It should be noted that, in Figure 9 In the process shown, the calculation of parameter features and the comparison with the corresponding thresholds are the same as those in the previous embodiments, and will not be repeated here.

[0097] This embodiment provides a device positioning method that, through the aforementioned approach, allows for the confirmation of the current communication environment of a first electronic device by acquiring multiple generated first positioning parameters. This enables accurate determination of the current communication environment and allows for the adoption of appropriate positioning methods based on the communication environment, thereby improving positioning accuracy. Furthermore, in this embodiment, in addition to acquiring the first positioning parameters, a second positioning parameter is also acquired through another positioning method. The first and second positioning parameters are then combined simultaneously to determine the current communication environment, further facilitating a more accurate assessment of the degree of wireless signal interference in the current communication environment.

[0098] Please see Figure 10 This application provides a device positioning method for electronic devices, the method comprising:

[0099] S410: Obtain the first positioning parameters generated multiple times to obtain multiple first positioning parameters. The first positioning parameters are generated by the first electronic device each time based on the wireless signal transmitted by the second electronic device.

[0100] S420: Obtain current communication environment information based on multiple first positioning parameters. The communication environment information characterizes the degree of interference to the wireless signal transmitted between the first electronic device and the second electronic device.

[0101] S430: If the communication environment information is the second communication environment information, the first electronic device obtains the corresponding first positioning parameters based on the wireless signal transmitted by the second electronic device, and obtains the corresponding second positioning parameters based on the visual inertial positioning method.

[0102] S431: Positioning of the first electronic device based on the first positioning parameters and the second positioning parameters.

[0103] The positioning of the first electronic device based on the first positioning parameter and the second positioning parameter can be understood as obtaining the final positioning information by referring to the first positioning parameter and the second positioning parameter, and taking the position represented by the final positioning information as the location of the first electronic device.

[0104] One approach is to fuse the first and second positioning parameters based on a Kalman filter algorithm to obtain positional information representing the location of the first electronic device. Here, the first positioning parameter serves as the measured value of the Kalman filter algorithm, and the second positioning parameter serves as the predicted value. The extended Kalman filter algorithm can be used.

[0105] Alternatively, a corresponding weight can be configured for the first positioning parameter and a corresponding weight can be configured for the second positioning parameter. Then, the first positioning parameter can be multiplied by its corresponding weight to obtain a first reference positioning parameter, and the second positioning parameter can be multiplied by its corresponding weight to obtain a second reference positioning parameter. Finally, the first and second reference positioning parameters are added together to obtain the position parameter representing the position of the first electronic device.

[0106] It should be noted that when both the first and second positioning parameters include angle and distance parameters, the corresponding first reference positioning parameters and second positioning parameters can be calculated for the angle and distance parameters respectively.

[0107] Alternatively, if the communication environment information is the second communication environment information, the first electronic device can locate itself based on the wireless signal emitted by the second electronic device.

[0108] S440: If the communication environment information is the first communication environment information, obtain the corresponding second positioning parameters based on the visual inertial positioning method;

[0109] S441: Locate the first electronic device based on the second positioning parameters.

[0110] One approach is to obtain the corresponding second positioning parameters based on visual inertial positioning, which includes: obtaining the initial position required by visual inertial positioning from the historical positioning positions of the first electronic device; and obtaining the corresponding second positioning parameters based on the initial position and visual inertial positioning.

[0111] Optionally, obtaining the initial position required for visual-inertial positioning from the historical positioning positions of the first electronic device includes: obtaining parameter features and / or residuals corresponding to multiple historical positioning positions, wherein the parameter features are obtained based on the first positioning parameters of the corresponding historical positioning position and the first positioning parameters of multiple positioning positions determined before the historical positioning position, and the residuals are obtained based on the first positioning parameters and the second positioning parameters of the corresponding historical positioning position; and determining the initial position required for visual-inertial positioning from the multiple historical positioning positions based on the parameter features and / or residuals.

[0112] It should be noted that for visual-inertial positioning, an initial position is required for each positioning process, allowing the real-time position of the electronic device to be determined based on this initial position. In this case, the more accurate the initial position, the more accurate the positioning of the electronic device based on that initial position. In this embodiment, as one approach, first and second positioning parameters can be generated each time positioning is performed. The first positioning parameters generated in the current positioning and the positioning parameters generated in previous positioning processes can then be used as multiple first positioning parameters to obtain corresponding parameter features, and the corresponding residuals can be obtained based on the first and second positioning parameters generated in the current positioning process. When the positioning positions are stored, each stored positioning position can correspond to parameter features and residuals.

[0113] Optionally, determining the initial position required for visual-inertial positioning from multiple historical positioning positions based on parameter features and / or residuals may include: obtaining a first reference value for each of the multiple historical positioning positions by multiplying a first weight of the multiple historical positioning positions with the corresponding parameter features; obtaining a second reference value for each of the multiple historical positioning positions by multiplying a second weight of the multiple historical positioning positions with the corresponding residuals; adding the first reference values ​​and second reference values ​​of the multiple historical positioning positions to obtain target values ​​for the multiple historical positioning positions; and using the historical positioning position with the smallest corresponding target value as the initial position required for visual-inertial positioning.

[0114] As the aforementioned analysis shows, the parameter characteristics obtained from multiple first positioning parameters can characterize the changes in these parameters. Furthermore, the smaller the parameter characteristics, the smoother the changes between the multiple first positioning parameters, indicating that the multiple first positioning parameters themselves are more accurate. Correspondingly, since the second positioning parameters are generated in different ways than the first positioning parameters, the smaller the residual between the first and second positioning parameters, the more accurate both the first and second positioning parameters are. Therefore, using the historical positioning position with the smallest target value as the initial position required by the visual-inertial positioning method helps to make the positioning results obtained by the visual-inertial positioning method more accurate.

[0115] For example, if the first positioning parameters include angle and distance parameters, then the stored historical positioning locations will each have a corresponding parameter feature for the angle parameter and a corresponding parameter feature for the distance parameter. The parameter feature corresponding to the angle parameter can be used as the first parameter feature, and the parameter feature corresponding to the distance parameter can be used as the second parameter feature. Furthermore, if the second positioning parameters also include angle and distance parameters, the residual corresponding to the angle parameter can be used as the first residual, and the residual corresponding to the distance parameter can be used as the second residual.

[0116] In this scenario, the first reference value corresponding to each of the multiple historical positioning locations can include a first reference value corresponding to the distance parameter and a first reference value corresponding to the angle parameter. Similarly, the second reference value corresponding to each of the multiple historical positioning locations can include a second reference value corresponding to the distance parameter and a second reference value corresponding to the angle parameter. Furthermore, the target value can be obtained by adding the first reference values ​​corresponding to the distance parameter, the first reference value corresponding to the angle parameter, the second reference value corresponding to the distance parameter, and the second reference value corresponding to the angle parameter for each of the multiple historical positioning locations.

[0117] Next, we will proceed through... Figure 11 The process involved in this embodiment will be described below.

[0118] During the current positioning process, after acquiring the first positioning information, parameter features can be determined based on the first positioning information generated in the current positioning process and the historically generated first positioning information. Then, the current communication environment information can be obtained based on these parameter features. If the current communication environment information is the first communication environment information, positioning can be performed using a visual-inertial positioning method. Furthermore, during positioning using a visual-inertial positioning method, the initial position can be selected based on the methods provided above. Alternatively, if the current communication environment information is not the first communication environment information (e.g., the second communication environment information), positioning can be performed using a Kalman filter algorithm. The obtained positioning position is stored in the historical positioning result storage area.

[0119] This embodiment provides a device positioning method that, through the aforementioned approach, allows for the confirmation of the current communication environment of a first electronic device by acquiring multiple generated first positioning parameters. This enables accurate determination of the communication environment and allows for the adoption of a corresponding positioning method based on the communication environment, thereby improving positioning accuracy. Furthermore, in this embodiment, when the acquired communication environment information is the first communication environment information, considering the relatively high degree of interference between the wireless signals of the first and second electronic devices, a visual-inertial positioning method is used to avoid interference affecting positioning accuracy. When the acquired communication environment information is the second communication environment information, a Kalman filter algorithm can be used in conjunction with the first and second positioning parameters to improve positioning accuracy.

[0120] Please see Figure 12 This application provides a device positioning device 500, which operates in a first electronic device. The device 500 includes:

[0121] The parameter acquisition unit 510 is used to acquire the first positioning parameters generated multiple times to obtain multiple first positioning parameters. The first positioning parameters are generated by the first electronic device each time based on the wireless signal transmitted by the second electronic device.

[0122] The parameter acquisition unit 510 is specifically used to acquire the first positioning parameters generated in the most recent multiple times.

[0123] The environment determination unit 520 is used to obtain current communication environment information based on multiple first positioning parameters. The communication environment information characterizes the degree of interference of the wireless signal transmitted between the first electronic device and the second electronic device.

[0124] The positioning unit 530 is used to locate the first electronic device based on the positioning method corresponding to the communication environment information.

[0125] In one approach, the environment determination unit 520 is specifically used to obtain corresponding parameter features based on multiple first positioning parameters, and to obtain current communication environment information based on the parameter features.

[0126] Optionally, the environment determination unit 520 is specifically used to obtain the first value corresponding to each pair of adjacent first positioning parameters among multiple first positioning parameters, so as to obtain multiple first values, wherein the first value is the ratio of the difference between the corresponding adjacent first positioning parameters to the duration between the adjacent first positioning parameters; and to obtain the parameter features of the multiple first values ​​as the parameter features obtained for the multiple first positioning parameters.

[0127] Optionally, the environment determination unit 520 is specifically used to obtain the standard deviation of multiple first values, and use them as multiple first positioning parameters to obtain corresponding parameter features. If the standard deviation is greater than a first standard deviation threshold, the current communication environment information is determined to be the first communication environment information; if the standard deviation is not greater than the first standard deviation threshold, the current communication environment information is determined to be the second communication environment information. The degree of interference to the wireless signal represented by the first communication environment information is greater than the degree of interference to the wireless signal represented by the second communication environment information.

[0128] Optionally, the environment determination unit 520 is specifically used to obtain the first value corresponding to each pair of adjacent generated angle parameters among multiple angle parameters, so as to obtain multiple first values. The first value is the ratio of the difference between the corresponding adjacent generated angle parameters to the duration between the adjacent generated angle data.

[0129] Optionally, the first positioning parameters also include distance parameters. The environment determination unit 520 is further specifically configured to obtain the difference between each pair of adjacent generated distance parameters from the multiple distance parameters, resulting in multiple distance differences; obtain a second value corresponding to each pair of adjacent distance differences from the multiple distance differences, resulting in multiple second values, wherein the second value is the ratio of the difference between the corresponding adjacent distance differences to the duration between adjacent generated distance data, and the adjacent generated distance parameters corresponding to each adjacent distance difference include distance parameters generated in the same instance. The parameter features of the multiple first values ​​and the parameter features of the multiple second values ​​are obtained as the corresponding parameter features for the multiple first positioning parameters.

[0130] Optionally, the environment determination unit 520 is specifically used to determine the current communication environment information as a first communication environment if the standard deviation of multiple first values ​​is greater than a second standard deviation threshold and the standard deviation of multiple first values ​​is greater than a third standard deviation threshold; and to determine the current communication environment information as a second communication environment if the standard deviation of multiple first values ​​is not greater than the second standard deviation threshold, or the standard deviation of multiple second values ​​is not greater than the third standard deviation threshold.

[0131] In one approach, the environment determination unit 520 is specifically used to obtain positioning parameters based on visual-inertial positioning as second positioning parameters; and to obtain current communication environment information based on parameter features and the second positioning parameters.

[0132] Optionally, the environment determination unit 520 is specifically used to: if the current communication environment information is determined to be the first communication environment information based on parameter features, then use the first communication environment information as the current communication environment information; if the current communication environment information is determined to be the second communication environment information based on parameter features; obtain the difference between the second positioning parameter and the first positioning parameter obtained at the corresponding time; if the difference is greater than a specified threshold, determine the current communication environment information as the first communication environment information; otherwise, determine the current communication environment information as the second communication environment information.

[0133] Optionally, the environment determination unit 520 is specifically used to determine the current communication environment information as the first communication environment information if the difference between the first positioning parameter including the angle parameter and the second positioning parameter including the angle parameter is greater than a first specified threshold, and the difference between the first positioning parameter including the distance parameter and the second positioning parameter including the distance parameter is greater than a second specified threshold.

[0134] In one manner, the positioning unit 530 is specifically used to locate the first electronic device based on the wireless signal emitted by the second electronic device if the communication environment information is the second communication environment information; or if the communication environment information is the second communication environment information, the first electronic device obtains the corresponding first positioning parameters based on the wireless signal emitted by the second electronic device, and obtains the corresponding second positioning parameters based on the visual-inertial positioning method; and locates the first electronic device based on the first positioning parameters and the second positioning parameters.

[0135] Optionally, the positioning unit 530 is specifically used to fuse the first positioning parameter and the second positioning parameter based on the Kalman filter algorithm to obtain position information representing the position of the first electronic device, wherein the first positioning parameter is the measured value of the Kalman filter algorithm and the second positioning parameter is the predicted value of the Kalman filter algorithm.

[0136] Optionally, the positioning unit 530 is further configured to, if the communication environment information is the first communication environment information, obtain the corresponding second positioning parameters based on the visual-inertial positioning method; and position the first electronic device based on the second positioning parameters.

[0137] Optionally, the positioning unit 530 is specifically used to obtain the initial position required by the visual-inertial positioning method from the historical positioning positions of the first electronic device; and to obtain the corresponding second positioning parameters based on the initial position and the visual-inertial positioning method.

[0138] Optionally, the positioning unit 530 is specifically used to acquire parameter features and / or residuals corresponding to multiple historical positioning locations, wherein the parameter features are obtained based on the first positioning parameters of the corresponding historical positioning location and the first positioning parameters of multiple positioning locations determined before the historical positioning location, and the residuals are obtained based on the first positioning parameters and the second positioning parameters of the corresponding historical positioning location; and the initial position required for visual inertial positioning is determined from the multiple historical positioning locations based on the parameter features and / or residuals.

[0139] Optionally, the positioning unit 530 is specifically used to obtain a first reference value corresponding to each of the multiple historical positioning positions based on the product of the first weight of the multiple historical positioning positions and the corresponding parameter features; to obtain a second reference value corresponding to each of the multiple historical positioning positions based on the product of the second weight of the multiple historical positioning positions and the corresponding residual; to add the first reference value and the second reference value of the multiple historical positioning positions to obtain the target value of the multiple historical positioning positions; and to use the historical positioning position with the smallest corresponding target value as the initial position required by the visual inertial positioning method.

[0140] This embodiment provides a device positioning device, which enables the acquisition of multiple generated first positioning parameters to confirm the current communication environment of a first electronic device. This allows for accurate determination of the current communication environment of the first electronic device, enabling the adoption of a corresponding positioning method based on the communication environment to locate the first electronic device and improve positioning accuracy.

[0141] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.

[0142] The following will combine Figure 13 This application describes an electronic device.

[0143] Please see Figure 13 Based on the aforementioned device positioning method and apparatus, this application embodiment also provides another electronic device 2000 capable of executing the aforementioned device positioning method. The electronic device 2000 includes one or more (only one shown in the figure) processors 202, a memory 204, a network module 206, a sensor module 208, and an audio acquisition device 210, all coupled to each other. The memory 204 stores programs capable of executing the contents of the aforementioned embodiments, and the processor 202 can execute the programs stored in the memory 204.

[0144] The processor 202 may include one or more processing cores. The processor 202 connects to various parts of the electronic device 2000 via various interfaces and lines, and performs various functions and processes data of the electronic device 2000 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 204, and by calling data stored in the memory 204. Optionally, the processor 202 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 202 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 202 and may be implemented separately using a communication chip.

[0145] The memory 204 may include random access memory (RAM) or read-only memory (ROM). The memory 204 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 204 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below.

[0146] The network module 206 is used to enable information interaction between the electronic device 2000 and other devices, such as transmitting device control commands, manipulation request commands, and status information acquisition commands. However, the network module 206 may differ depending on the specific device being used.

[0147] Sensor module 208 may include at least one sensor. Specifically, sensor module 208 may include, but is not limited to, a light sensor, a motion sensor, a pressure sensor, an infrared thermal sensor, a distance sensor, an acceleration sensor, and other sensors.

[0148] The pressure sensor is a sensor that detects pressure generated by pressing on the electronic device 2000. That is, the pressure sensor detects pressure generated by contact or pressing between the user and the electronic device, such as the pressure generated by contact or pressing between the user's ear and the mobile terminal. Therefore, the pressure sensor can be used to determine whether contact or pressing has occurred between the user and the electronic device 2000, and the magnitude of the pressure.

[0149] The accelerometer can detect the magnitude of acceleration in various directions (generally three axes), and when stationary, it can detect the magnitude and direction of gravity. It can be used for applications such as identifying the posture of electronic devices 2000 (e.g., screen orientation switching, related games, magnetometer posture calibration), and vibration recognition functions (e.g., pedometer, tapping). In addition, electronic devices 2000 can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, and thermometers, which will not be elaborated upon here.

[0150] Audio acquisition device 210 is used for acquiring audio signals. Optionally, audio acquisition device 210 includes multiple audio acquisition devices. These audio acquisition devices can be microphones. For example, in one embodiment, audio acquisition device 210 may include two microphones, in which one microphone may correspond to one analog-to-digital converter (ADC), and the other microphone may correspond to two ADCs with different analog gains. In another embodiment, audio acquisition device 210 may include three microphones. In this embodiment, two microphones (e.g., a main microphone and a secondary microphone) may each correspond to one ADC, and the other microphone (e.g., a camera microphone) may correspond to two ADCs with different analog gains.

[0151] In one approach, the network module of the electronic device 2000 is a radio frequency (RF) module. This RF module is used to receive and transmit electromagnetic waves, converting electromagnetic waves into electrical signals, thereby enabling communication with a communication network or other devices. The RF module may include various existing circuit elements used to perform these functions, such as antennas, RF transceivers, digital signal processors, encryption / decryption chips, SIM cards, memory, etc. For example, the RF module can interact with external devices by transmitting or receiving electromagnetic waves, thereby receiving audio signals transmitted by external devices.

[0152] Furthermore, the electronic device 2000 may also include an image acquisition device for image acquisition. For example, the image acquisition device can be used to capture video, still images, or moving images.

[0153] Please refer to Figure 14This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 800 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0154] The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.

[0155] This application provides a device positioning method, apparatus, and electronic device. After acquiring multiple generated first positioning parameters to obtain multiple first positioning parameters, the current communication environment information can be obtained based on the multiple first positioning parameters. When the communication environment information characterizes the degree of interference in the wireless signal transmitted between the first electronic device and a second electronic device, the first electronic device can be positioned based on the positioning method corresponding to the communication environment information. Thus, by acquiring multiple generated first positioning parameters, the current communication environment (communication environment information) of the first electronic device can be confirmed, thereby accurately determining the current communication environment of the first electronic device. Based on the current communication environment, a corresponding positioning method can be adopted to locate the first electronic device, improving positioning accuracy.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for positioning equipment, characterized in that, Applied to a first electronic device, the method includes: The first positioning parameters generated multiple times are obtained to obtain multiple first positioning parameters, wherein the first positioning parameters are generated by the first electronic device each time based on the wireless signal transmitted by the second electronic device; Obtain corresponding parameter features based on the plurality of first positioning parameters; If the current communication environment information is determined to be the first communication environment information based on the parameter features, then the first communication environment information is used as the current communication environment information; if the current communication environment information is determined to be the second communication environment information based on the parameter features, then the difference between the second positioning parameter and the first positioning parameter obtained at the corresponding time is obtained, where the second positioning parameter is the positioning parameter obtained according to the visual inertial positioning method; If the difference is greater than a specified threshold, the current communication environment information is determined to be the first communication environment information; otherwise, the current communication environment information is determined to be the second communication environment information. The communication environment information characterizes the degree of interference of the wireless signal transmitted between the first electronic device and the second electronic device. The first electronic device is located based on the positioning method corresponding to the current communication environment information.

2. The method according to claim 1, characterized in that, The step of obtaining corresponding parameter features based on the plurality of first positioning parameters includes: The first value corresponding to each pair of adjacent first positioning parameters is obtained from the plurality of first positioning parameters to obtain a plurality of first values. The first value is the ratio of the difference between the corresponding adjacent first positioning parameters to the duration between the adjacent first positioning parameters. Obtain the parameter features of the plurality of first values, and use them as the corresponding parameter features of the plurality of first positioning parameters.

3. The method according to claim 2, characterized in that, The step of obtaining the parameter features of the plurality of first values, and using them as the corresponding parameter features for the plurality of first positioning parameters, includes: The standard deviation of the plurality of first values ​​is obtained and used as the corresponding parameter features for the plurality of first positioning parameters. The method further includes: If the standard deviation is greater than the first standard deviation threshold, the current communication environment information is determined to be the first communication environment information; if the standard deviation is not greater than the first standard deviation threshold, the current communication environment information is determined to be the second communication environment information. The degree of interference of the wireless signal represented by the first communication environment information is greater than the degree of interference of the wireless signal represented by the second communication environment information.

4. The method according to claim 2, characterized in that, The first positioning parameter includes an angle parameter. The step of obtaining the first value corresponding to each pair of adjacent generated first positioning parameters among the plurality of first positioning parameters, to obtain a plurality of first values, includes: The first value corresponding to each pair of adjacent generated angle parameters is obtained from multiple angle parameters to obtain multiple first values. The first value is the ratio of the difference between the corresponding adjacent generated angle parameters to the duration between adjacent generated angle data.

5. The method according to claim 4, characterized in that, The first positioning parameter further includes a distance parameter; the method further includes: Obtain the difference between each pair of adjacent distance parameters generated from multiple distance parameters to obtain multiple distance differences; Obtain the second value corresponding to each pair of adjacent distance differences among the plurality of distance differences, so as to obtain a plurality of second values, wherein the second value is the ratio of the difference between the corresponding adjacent distance differences to the duration between adjacent generated distance data, and the distance parameters corresponding to each adjacent distance difference in adjacent generated distances include the distance parameters generated in the same time. The step of obtaining the parameter features of the plurality of first values, and using them as the corresponding parameter features for the plurality of first positioning parameters, includes: Obtain the parameter features of the plurality of first values ​​and the parameter features of the plurality of second values, and use them as the parameter features of the plurality of first positioning parameters.

6. The method according to claim 5, characterized in that, The parameter characteristics of the plurality of first values ​​are the standard deviations of the plurality of first values, and the parameter characteristics of the plurality of second values ​​are the standard deviations of the plurality of second values; the method further includes: If the standard deviation of multiple first values ​​is greater than the second standard deviation threshold and the standard deviation of multiple first values ​​is greater than the third standard deviation threshold, the current communication environment information is determined to be the first communication environment. If the standard deviation of multiple first values ​​is not greater than the second standard deviation threshold, or the standard deviation of multiple second values ​​is not greater than the third standard deviation threshold, the current communication environment information is determined to be the second communication environment.

7. The method according to claim 1, characterized in that, The first positioning parameter includes an angle parameter and a distance parameter, the second positioning parameter includes an angle parameter and a distance parameter, and the step of determining the current communication environment information as the first communication environment information if the difference is greater than a specified threshold includes: If the difference between the first positioning parameter (including angle parameter) and the second positioning parameter (including angle parameter) is greater than a first specified threshold, and the difference between the first positioning parameter (including distance parameter) and the second positioning parameter (including distance parameter) is greater than a second specified threshold, then the current communication environment information is determined to be the first communication environment information.

8. The method according to claim 1, characterized in that, The method of locating the first electronic device based on the current communication environment information includes: If the current communication environment information is the second communication environment information, the first electronic device locates itself based on the wireless signal emitted by the second electronic device; or If the current communication environment information is the second communication environment information, the first electronic device obtains the corresponding first positioning parameters based on the wireless signal emitted by the second electronic device, and obtains the corresponding second positioning parameters based on the visual inertial positioning method. The location of the first electronic device is determined based on the first positioning parameter and the second positioning parameter.

9. The method according to claim 8, characterized in that, The positioning of the first electronic device based on the first positioning parameter and the second positioning parameter includes: The first positioning parameter and the second positioning parameter are fused based on the Kalman filter algorithm to obtain position information representing the position of the first electronic device. The first positioning parameter is used as the measured value of the Kalman filter algorithm, and the second positioning parameter is used as the predicted value of the Kalman filter algorithm.

10. The method according to claim 9, characterized in that, The method further includes: If the communication environment information is the first communication environment information, the corresponding second positioning parameters are obtained based on the visual inertial positioning method; The first electronic device is located based on the second positioning parameters.

11. The method according to claim 8 or 10, characterized in that, The acquisition of the corresponding second positioning parameters based on the visual-inertial positioning method includes: Obtain the initial position required for visual-inertial positioning from the historical positioning positions of the first electronic device; The corresponding second positioning parameters are obtained based on the initial position and the visual-inertial positioning method.

12. The method according to claim 11, characterized in that, The step of obtaining the initial position required for visual-inertial positioning from the historical positioning positions of the first electronic device includes: Obtain parameter features and / or residuals corresponding to multiple historical positioning locations, wherein the parameter features are obtained based on the first positioning parameters of the corresponding historical positioning location and the first positioning parameters of multiple positioning locations determined before the historical positioning location, and the residuals are obtained based on the first positioning parameters and the second positioning parameters of the corresponding historical positioning location; The initial position required for visual-inertial positioning is determined from multiple historical positioning positions based on the parameter characteristics and / or residuals.

13. The method according to claim 12, characterized in that, The determination of the initial position required for visual-inertial positioning from multiple historical positioning positions based on the parameter features and / or residuals includes: Based on the product of the first weight of the multiple historical location and the corresponding parameter features, the first reference value corresponding to each of the multiple historical location is obtained. Based on the product of the second weight of the multiple historical positioning locations and the corresponding residual, the second reference value corresponding to each of the multiple historical positioning locations is obtained. Add the first reference value and the second reference value of multiple historical positioning locations to obtain the target value of multiple historical positioning locations; The historical location with the smallest corresponding target value is used as the initial location required by the visual inertial positioning method.

14. The method according to claim 1, characterized in that, The process of obtaining the first positioning parameters generated multiple times includes: Get the first location parameter generated most recently.

15. A device positioning apparatus, characterized in that, Operating in a first electronic device, the device comprising: The parameter acquisition unit is used to acquire multiple first positioning parameters generated multiple times to obtain multiple first positioning parameters, wherein the first positioning parameters are generated by the first electronic device each time based on the wireless signal transmitted by the second electronic device; An environment determination unit is used to obtain corresponding parameter features based on the plurality of first positioning parameters; If, based on the parameter characteristics, the current communication environment information is determined to be the first communication environment information, then the first communication environment information is used as the current communication environment information; if, based on the parameter characteristics, the current communication environment information is determined to be the second communication environment information, then the difference between the second positioning parameter and the first positioning parameter obtained at the corresponding time is obtained, where the second positioning parameter is the positioning parameter obtained according to the visual inertial positioning method; if the difference is greater than a specified threshold, the current communication environment information is determined to be the first communication environment information; otherwise, the current communication environment information is determined to be the second communication environment information, where the communication environment information characterizes the degree of interference of the wireless signal transmitted between the first electronic device and the second electronic device; The positioning unit is used to locate the first electronic device based on the positioning method corresponding to the current communication environment information.

16. An electronic device, characterized in that, It includes one or more processors and memory; one or more programs are stored in the memory and configured to be executed by the one or more processors according to any one of claims 1-14.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, wherein the program code, when executed by a processor, performs the method according to any one of claims 1-14.

Citation Information

Patent Citations

  • Position determination using a wireless signal

    CN102713663A

  • Indoor positioning method based on improved square root unscented Kalman filtering

    CN109916410A

  • User equipment positioning device and method

    CN114342457A