Automatic start-stop positioning method, device, electronic device and storage medium

By automatically determining indoor and outdoor scenes using the built-in sensors of the mobile terminal and activating or deactivating the indoor positioning module, the problem of high cost of additional equipment and slow response in existing technologies is solved, achieving efficient and accurate indoor and outdoor positioning.

CN114111801BActive Publication Date: 2024-11-12CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111531601.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-11-12
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

Existing indoor and outdoor scene recognition requires additional auxiliary equipment, resulting in high costs and slow response times. Furthermore, existing indoor positioning technologies suffer from low operational efficiency and low accuracy.

Method used

The system collects scene data using sensors built into the mobile terminal (such as light sensors, pressure sensors, geomagnetic sensors, accelerometers, and gyroscopes), and combines weighted calculations and the Adaboost model to automatically determine the indoor or outdoor scene in which the user is located, and activates or deactivates the indoor positioning module accordingly.

Benefits of technology

It reduced user costs, improved the accuracy and response speed of scene judgment, reduced the energy consumption of the positioning module, and reduced positioning errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114111801B_ABST
    Figure CN114111801B_ABST
Patent Text Reader

Abstract

The present disclosure provides an automatic start-stop positioning method, device, electronic device and computer-readable storage medium, which relate to the field of positioning technology. The automatic start-stop positioning method includes: collecting scene data corresponding to the terminal through one or more sensors provided by the terminal; judging the scene in which the terminal is currently located based on the collected scene data; if the scene in which the terminal is currently located is indoors, calling the indoor positioning module to perform indoor positioning on the terminal. The automatic start-stop positioning method provided by the present disclosure comprehensively judges whether the user is indoors or outdoors through a variety of sensors provided by the mobile phone terminal, and after judging the scene state in which the user is located, positioning is performed through the automatic start-stop positioning module, which reduces the scene positioning error, improves the positioning accuracy, and reduces the energy consumption of the mobile phone terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the rapid development of mobile terminal technology and Internet technology, more and more personalized needs have emerged, and the demand for indoor personnel positioning is becoming more and more urgent.

[0003] When users need to perform indoor positioning, they need to first perform indoor and outdoor scene detection. Usually, users are required to wear beacon devices such as work cards or electronic tags before entering the indoor scene detection. This increases the user's usage cost, and if the beacon device is lost, the positioning will be invalid and seriously affect the positioning result. This indoor and outdoor detection method is costly and has poor operability.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present disclosure is to overcome the deficiencies of the above-mentioned prior art and to provide an automatic start-stop positioning method, device, electronic device and computer-readable storage medium, which can solve the problems that the existing indoor and outdoor scene recognition requires additional auxiliary equipment, and the terminal has high energy consumption and slow response.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, there is provided an automatic start-stop positioning method, the method comprising:

[0008] Collecting scene data currently corresponding to the terminal through one or more sensors provided by the terminal;

[0009] Determining the current scene of the terminal based on the collected scene data;

[0010] If the terminal is currently located indoors, the indoor positioning module is called to perform indoor positioning on the terminal.

[0011] In some embodiments of the present disclosure, based on the above solution, the method further includes:

[0012] If the terminal is currently located outdoors, the indoor positioning module is turned off.

[0013] In some embodiments of the present disclosure, based on the above solution, the method further includes:

[0014] Calculating the confidence of the scene data corresponding to each of the sensors, performing weighted sum calculation on the multiple confidences, and obtaining the confidence of the scene currently located by the terminal;

[0015] The scene where the terminal is currently located is determined according to the confidence level of the scene where the terminal is currently located.

[0016] In some embodiments of the present disclosure, based on the above solution, the method further includes:

[0017] Collecting the current ambient light intensity corresponding to the terminal through a light sensor;

[0018] The ambient light intensity is compared with a preset light intensity threshold to determine the light intensity confidence level of the scene currently located by the terminal.

[0019] In some embodiments of the present disclosure, based on the aforementioned scheme, the preset light intensity threshold includes a first preset light intensity threshold and a second light intensity threshold, the first preset light intensity threshold is a preset light intensity threshold one hour after sunrise to half an hour before sunset, and the second preset light intensity threshold is a preset light intensity threshold from sunset to sunrise.

[0020] In some embodiments of the present disclosure, based on the above solution, the method further includes:

[0021] Collecting the absolute value of the scene pressure change currently corresponding to the terminal through the pressure sensor;

[0022] The absolute value of the ambient pressure change is compared with a preset pressure change threshold to determine the pressure confidence level of the scene currently located by the terminal.

[0023] In some embodiments of the present disclosure, based on the above solution, the method further includes:

[0024] Collecting the scene peak quantity value currently corresponding to the terminal through the geomagnetic sensor;

[0025] The peak quantity value is compared with a preset peak threshold to determine the geomagnetic confidence of the scene where the terminal is currently located.

[0026] In some embodiments of the present disclosure, based on the above solution, the method further includes:

[0027] Collecting the current steering frequency value corresponding to the terminal through an acceleration sensor and a gyroscope;

[0028] The turning frequency value is compared with a preset turning frequency threshold to determine the turning confidence of the scene in which the terminal is currently located.

[0029] According to another aspect of the present disclosure, there is provided an automatic start-stop positioning device, the device comprising:

[0030] A data acquisition module, used to collect scene data currently corresponding to the terminal through the light sensor, pressure sensor, geomagnetic sensor, acceleration sensor and gyroscope provided by the terminal, wherein the collected scene data includes index information related to light intensity, pressure, geomagnetic intensity and turning frequency;

[0031] A scene recognition module, used to determine the confidence corresponding to each indicator information of the terminal according to the scene data collected by the data collection module, and perform weighted sum calculation on multiple confidences to determine the scene in which the terminal is currently located;

[0032] An automatic start-stop module, used to control the start and stop of the indoor positioning module according to the scene in which the terminal is currently located determined by the scene recognition module;

[0033] The indoor positioning module is used to perform indoor positioning on the terminal.

[0034] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement any of the above methods.

[0035] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement any of the above methods.

[0036] The automatic start-stop positioning method provided by the present disclosure comprehensively judges the scene where the user is located through one or more sensors provided by the mobile phone terminal, and automatically turns on or off the terminal positioning system according to the indoor and outdoor scene states of the user. On the one hand, the method comprehensively judges the scene state where the user is located by using the judgment results of multiple sensors provided by the terminal, thereby reducing the judgment error and improving the accuracy of the judgment; on the other hand, the method uses the sensors provided by the mobile phone terminal, and the user does not need to use additional auxiliary equipment, thus saving costs and improving the response speed of scene judgment; thirdly, since the mobile phone terminal can automatically turn on and off the positioning module according to the scene where the user is located, the energy consumption of the terminal is reduced, and the positioning module can call different positioning methods according to different indoor and outdoor scenes, thereby reducing the positioning error and improving the positioning accuracy.

[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0039] Figure 1 The present invention is a flowchart of an automatic start-stop positioning method in an exemplary embodiment of the present invention.

[0040] Figure 2 It is a specific flow chart of an automatic start-stop positioning method in an exemplary embodiment of the present disclosure.

[0041] Figure 3 It is a schematic diagram of the framework of an automatic start-stop positioning device in an exemplary embodiment of the present disclosure.

[0042] Figure 4 It is a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0043] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present disclosure will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar structures, and thus their detailed description will be omitted. In addition, the drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale.

[0044] The terms "a", "an", "the", "said" and "at least one" are used to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusive meaning and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first", "second" and "third" etc. are used merely as labels and are not intended to limit the quantity of their objects.

[0045] Currently, the commonly used positioning technologies can be divided into the following categories according to the ranging system: based on the base station receiving signal AOA (Angle of Arrival), based on RSSI (Received Signal Strength Indication), based on TOA / TDOA (Time / Time Difference of Arrival), etc. Specific technologies include Bluetooth technology, Wifi technology, Zigbee technology, UWB (Ultra Wide Band) technology, ultrasonic technology, infrared technology, vSLAM (vision Simultaneous Localization And mapping) technology, geomagnetic technology, 5G technology, etc.

[0046] Existing indoor and outdoor positioning detection technology applications provide services to users with the above positioning technology. First, indoor and outdoor positioning detection technology can provide necessary and original information sources for upper-level mobile applications to serve upper-level applications. Before turning on the positioning technology, it is necessary to first check whether it is outside the building to ensure the performance and accuracy of the positioning technology; before searching for WiFi access points, it can be checked whether the device is indoors and the scanning strategy can be adjusted accordingly; in addition, there are many other applications, such as automatic image, screen brightness adjustment, etc., which also need to obtain appropriate work plans based on the user's indoor and outdoor conditions; second, indoor and outdoor positioning detection technology can be applied to smart factories, and there is a strong demand for positioning in employee management, material management, flammable and explosive monitoring, visitor management, etc.; third, indoor and outdoor positioning detection technology can be applied in smart parking lots. Indoor parking lots mainly need to apply positioning technology in idle parking guidance, intelligent reverse car search, automatic valet parking, etc.

[0047] Based on the above application scenarios of indoor positioning technology, it can be seen that the demand for indoor positioning technology in the market is becoming more and more urgent. However, the current indoor positioning technology generally requires the user to manually turn on the positioning switch after entering the room. This operation process is inefficient and slow to respond, and the monitoring results have large errors and low accuracy.

[0048] Based on the development prospects of the above-mentioned indoor positioning technology, the present disclosure proposes a method for detecting indoor and outdoor scenes of users based on multiple sensors in the device. When it is detected that the user is in an indoor scene, the indoor precise positioning module can be automatically turned on to facilitate the application of user positioning indoors.

[0049] The present disclosure provides an automatic start-stop positioning method. Figure 1 Flow chart of an automatic start-stop positioning method in an exemplary embodiment of the present disclosure, such as Figure 1 As shown, the method includes:

[0050] S10: collecting scene data corresponding to the terminal currently through one or more sensors provided by the terminal;

[0051] S20: Determine the current scene of the terminal based on the collected scene data;

[0052] S30: If the terminal is currently located indoors, an indoor positioning module is called to perform indoor positioning on the terminal.

[0053] In the present disclosure, the technology of the mobile terminal itself is combined with the indoor positioning technology, and the indoor positioning technology is bound to the mobile terminal. Two steps are required for positioning operation. The first step is to determine the scene where the user is located. The user scenes in the present disclosure are mainly divided into indoor scenes and outdoor scenes. Determining the scene where the user is located requires indoor and outdoor detection of the user; the second step is that the mobile terminal starts and stops the indoor positioning technology according to the scene where the user is located. Among them, the first step of indoor and outdoor scene detection includes steps S10 and S20, and the second step of starting and stopping the indoor positioning technology includes step S30.

[0054] It should be noted that the terminal in the present disclosure can be a mobile phone terminal or other mobile terminals. Users can choose terminal devices suitable for the present disclosure according to actual usage needs. The present disclosure uses mobile phone terminals as an example to illustrate the embodiments, but it does not mean that the following embodiments are only applicable to mobile phone terminals. The following embodiments are also applicable to other terminals.

[0055] In step S10, the mobile phone terminal collects the current corresponding scene data through one or more sensors provided in the terminal.

[0056] The scene data of the terminal is collected through one or more sensors built into the mobile phone terminal, where the sensors built into the mobile phone terminal include light sensors, pressure (air pressure) sensors, geomagnetic sensors, acceleration sensors, gyroscopes, etc. The sensors used in the mobile phone terminal of the present invention include but are not limited to the types of the above sensors, and can also be temperature sensors, humidity sensors, proximity sensors, sound sensors and other sensors built into the mobile phone terminal.

[0057] In step S20, the current scene of the terminal is determined based on the collected scene data.

[0058] The terminal in the present disclosure mainly collects scene data based on four sensors: light sensor, pressure sensor, geomagnetic sensor, acceleration sensor and gyroscope, and determines the current scene of the terminal based on the data collected by the above four sensors. Among them, the light sensor can collect the light intensity in the scene where the mobile phone terminal is currently located, the pressure sensor can obtain the ambient air pressure corresponding to the current scene by collecting data in the scene where the mobile phone terminal is located, the geomagnetic sensor can collect the ambient geomagnetism in the current scene through the mobile phone terminal, the acceleration sensor and the gyroscope can be used in combination, and the acceleration sensor can be used to determine the motion state of the mobile phone terminal, such as whether it is stationary or in motion, and the gyroscope can be used to determine whether the user carrying the mobile phone terminal has changed the direction of motion. In this way, through the cooperation between the acceleration sensor and the gyroscope, the motion information of the current scene of the mobile phone terminal can be collected.

[0059] In the present disclosure, based on the data collected by the above-mentioned sensors of the mobile phone terminal and using one or more data indicators therein as the basis for judging the current scene of the terminal, specifically, the following data indicators are mainly used as the basis for judging whether the terminal is in an indoor scene: changes in light intensity indoors and outdoors, changes in air pressure indoors and outdoors, changes in geomagnetic field indoors and outdoors, and changes in the rotation frequency of the user carrying the mobile phone terminal.

[0060] One or more of the above four data indicators can be combined with each other, complement each other, or when the reliability of one or several data indicators is not high, they can be replaced with each other to judge the current scene of the mobile phone terminal, that is, whether the scene of the mobile phone terminal is indoors or outdoors. The scene judgment method is: calculate the confidence of the scene data corresponding to each sensor, and perform weighted sum calculation on multiple confidences to obtain the confidence of the current scene of the mobile phone terminal, and the confidence includes indoor confidence and outdoor confidence.

[0061] Among them, the method for judging the scene in which the mobile phone terminal is located based on the changes in indoor and outdoor light intensity collected by the light sensor is: collecting the current ambient light intensity corresponding to the mobile phone terminal through the light sensor; comparing the ambient light intensity with the preset light intensity threshold to determine the light intensity confidence of the scene in which the mobile phone terminal is currently located.

[0062] Specifically, in outdoor environments, sunlight is the main light source, while indoors, artificial light is the main light source, such as artificial light emitted by energy-saving lamps or incandescent lamps. Since the brightness of sunlight is much greater than that of artificial light, when a mobile phone terminal enters an indoor environment from an outdoor environment, the light intensity will undergo a drastic change, that is, the light intensity will obviously change from strong to weak. Similarly, when a mobile phone terminal enters an outdoor environment from an indoor environment, the light intensity will also undergo an obvious change from weak to strong. This provides a theoretical basis for the mobile phone terminal to judge indoor and outdoor scenes by changes in light intensity.

[0063] When judging indoor and outdoor scenes by light intensity, the intensity of indoor and outdoor light intensity also changes in different time periods of the day. Therefore, in order to improve the accuracy and robustness of judging the scene where the mobile phone terminal is located by light intensity, the day is divided into different time periods, and the judgment method is adjusted according to the characteristics of light intensity in different time periods to judge whether the scene where the mobile phone terminal is located is indoors or outdoors. In addition, in the two time periods from half an hour before sunset to sunset, and from sunrise to sunrise within one hour, the indoor light intensity is similar to the outdoor light intensity. This will cause the light sensor to be unable to judge the indoor and outdoor environment of the mobile phone terminal. Therefore, the light intensity judgment method is not considered in these two time periods.

[0064] The scene judgment method based on the light intensity collected by the mobile phone terminal first obtains the local sunrise and sunset times based on the latitude and longitude collected by the mobile phone terminal, and then divides the time period of the light intensity judgment method according to the specific sunrise and sunset times collected by the mobile phone terminal, or judges the sunrise and sunset times according to other methods. It is applicable to the present disclosure, and different preset light intensity thresholds are used according to different time periods to judge the scene where the mobile phone terminal is located:

[0065] 1. From one hour after sunrise to half an hour before sunset, the first preset light intensity threshold is set to 2000 lux, and a sliding window sequence with a length of T1 is set. For example, the sliding window can be a 15S (second) sequence. The collected light intensity is put into the sequence in a first-in-first-out order, and the average light intensity of the sliding window when the length is T1 is calculated, and the average light intensity is represented as L. The confidence of the scene where the current mobile terminal is located is represented as I1, where I 1内 Indicates the current indoor light intensity confidence, I 1外 Identify the outdoor light intensity confidence. The relationship between the scene confidence I1 of the current mobile terminal and the average light intensity L is as follows:

[0066] I 1外 =1(L≥2000lux)

[0067]

[0068] I 1内 =1(L<200lux)

[0069] 2. In the period from sunset to sunrise, the second preset light intensity threshold is set to 30 lux. Similarly, a sliding window sequence with a length of T1 is used. For example, T1 can be 15S. The average light intensity L of the sliding window with a length of T1 is calculated. The relationship between the scene confidence I1 of the current mobile terminal and the average light intensity L is as follows:

[0070]

[0071] When the average intensity L of the above sliding window (15S) is ≤30lux, and the time is not between 22:00 and 6:00, during this period, the room is usually illuminated by lights. At this time, the influence of light factors on light intensity needs to be considered. Therefore, the relationship between the scene confidence I1 of the current mobile terminal and the average light intensity L is as follows:

[0072]

[0073] In the above two cases, if the indoor confidence value is greater than or equal to 0.5, it can be judged that the mobile phone terminal is more likely to be in an indoor scene; if the outdoor confidence value is greater than or equal to 0.5, it can be judged that the mobile phone terminal is more likely to be in an outdoor scene.

[0074] Through the above method, the confidence of the indoor scene where the mobile phone terminal is located can be calculated through the relationship between the average light intensity and the preset light intensity threshold, and the probability of the indoor and outdoor scenes where the mobile phone terminal is located can be judged according to the confidence value, that is, the scene where the mobile phone terminal is located can be judged according to the light sensor built into the mobile phone terminal.

[0075] Among them, the method for judging the scene in which the mobile phone terminal is located based on the indoor and outdoor pressure changes collected by the pressure sensor is: collecting the absolute value of the pressure change of the scene currently corresponding to the terminal through the pressure sensor; comparing the absolute value of the ambient pressure change with the preset pressure change threshold to determine the pressure confidence of the scene currently located by the terminal.

[0076] Specifically, in a reasonable application scenario, the user's pressure changes rapidly within a short period of time when walking up and down stairs or taking an elevator, and the mobile phone terminal can use the rapid changes in pressure generated by the user per unit time to determine the scene the user is in, maintain a rapidly changing parameter from the pressure sensor to the current moment, and determine whether the mobile phone terminal is in an indoor scene based on the size of the parameter and its positive and negative values.

[0077] The pressure sensor carried by the mobile phone terminal is set to collect the observation value of atmospheric pressure once every t2 seconds, and a sliding window with a length of T2 seconds is constructed. When the sliding window is filled with atmospheric pressure observation data, the difference between the most recently observed air pressure in the sliding window and the air pressure T2 seconds ago is calculated. For example, the most recently observed air pressure in the sliding window is calculated to be P1, and the air pressure value T2 seconds ago is P2, then the absolute value of the air pressure difference ΔP = P1-P2.

[0078] If ΔP is greater than the preset pressure change threshold within T2 seconds, it is determined that the mobile terminal has moved up and down in the current observation period, resulting in a rapid change in air pressure. Further, the preset pressure change threshold can be 0.45hPa, T2 is 30 seconds, and when it is necessary to determine the indoor and outdoor scenes where the mobile terminal is located, the absolute value of the pressure change ΔP and the indoor confidence level I 2内 The relationship between them is as follows:

[0079]

[0080] In the above formula, when △P≤0.45hPa, I 2内 is 1, indicating that the user goes upstairs; when △P ≥ 0.45hPa, I 2内 If it is 1, it means that the user goes downstairs, and in both cases, the mobile terminal is in an indoor scene.

[0081] Through the above method, the confidence of the indoor scene where the mobile phone terminal is located can be calculated through the relationship between the atmospheric pressure difference and the preset light intensity threshold, and the probability of the indoor and outdoor scenes where the mobile phone terminal is located can be judged according to the confidence value, that is, the scene where the mobile phone terminal is located can be judged according to the pressure sensor of the mobile phone terminal.

[0082] Among them, the method for judging the scene in which the mobile phone terminal is located based on the indoor and outdoor geomagnetic changes collected by the geomagnetic sensor is: collecting the peak quantity value of the scene currently corresponding to the terminal through the geomagnetic sensor; comparing the peak quantity value with the preset peak threshold to determine the geomagnetic confidence of the scene currently located by the terminal.

[0083] Specifically, since the reinforced concrete structure in the building interferes with the surrounding magnetic field, and the reinforced structure in the building distorts the magnetic field, different magnetic field distributions and changes occur indoors and outdoors. Generally speaking, the magnetic field changes more strongly indoors than outdoors. In order to improve the robustness of scene judgment and filter out some noise data, a sliding window method is used to eliminate noise. In addition, in some special cases, such as outdoor parking lots, large variance data will be generated for geomagnetic acquisition. Therefore, the present invention uses the main peak detection method to determine the number of indoor and outdoor magnetic field peaks. Considering the parameters of various influencing factors, these parameters can be combined for test analysis. At the same time, the parameters can be adjusted according to different mobile phone terminals and different geomagnetic sensors built into the mobile phone terminals, and according to different walking speeds.

[0084] Therefore, in the present disclosure, the strength of the ambient magnetic field is measured by measuring the number of main peaks in the magnetic field data window within an effective movement time. For a normal walking speed of a person, the size of the sliding window is set to T3 seconds, and the number of peak thresholds within the T3 seconds of the sliding window is set to N. The preset peak threshold can be 8, and the relationship between the indoor and outdoor confidence I3 and the peak threshold number is:

[0085] I 3外 =1(N<8)

[0086] I 3内 =1(N≥8)

[0087] Among them, I 3内 Represented as the current indoor confidence, I 3外 Represents the current outdoor confidence.

[0088] When the number of peaks N in the window is less than 8, it is judged to be outdoor, that is, indoor confidence level I 3外 =1; when the number of peaks N in the window is greater than or equal to 8, it is judged to be indoor, and the indoor confidence level I 3内 =1.

[0089] Optionally, in order to further improve the accuracy and robustness of the geomagnetic sensor, the user's walking speed may be added as an influencing parameter to the above calculation, so that the peak threshold can be adapted to more scenarios.

[0090] Through the above method, the confidence of the indoor scene in which the mobile phone terminal is located can be calculated through the relationship between the peak value collected by the geomagnetic sensor and the preset peak threshold, and the probability of the indoor and outdoor scenes in which the mobile phone terminal is located can be judged according to the confidence value, that is, the scene in which the mobile phone terminal is located can be judged based on the geomagnetic sensor of the mobile phone terminal.

[0091] Among them, the method for judging the scene in which the mobile phone terminal is located based on the change of rotation frequency collected by the acceleration sensor and the gyroscope is: collecting the current corresponding turning frequency value of the terminal through the acceleration sensor and the gyroscope; comparing the turning frequency value with the preset turning frequency threshold to determine the rotation confidence of the scene in which the terminal is currently located.

[0092] Specifically, considering that the user's movement patterns indoors and outdoors change regularly, due to the limitations of indoor space, the movement speed indoors is lower than the movement speed outdoors, and the number of turns indoors is greater than the number of turns outdoors. Therefore, in the present disclosure, the characteristic that the user's turning frequency indoors is higher than that outdoors can be utilized. After determining whether the user carrying the mobile phone terminal is in a stationary state or in motion through an acceleration sensor, the current rotation frequency F of the mobile phone terminal is calculated based on the data collected by the gyroscope. The rotation frequency F is measured by the number of rotations per unit time. Within the effective time, the confidence of the indoor and outdoor scenes where the mobile phone terminal is located is determined based on the rotation frequency F, wherein the effective time refers to the total time when a person is in motion.

[0093] Set the preset steering frequency threshold to T F , then the confidence of indoor and outdoor scenes is expressed by I4 and the preset turning frequency threshold T F The relationship between them is:

[0094] I 4内 =1(F≥T f )

[0095] I 4外 =1(F<T f )

[0096] Among them, I 4内 Represented as the current indoor confidence, I 4外 Represents the current outdoor confidence.

[0097] In the above formula, if the steering frequency F collected by the mobile terminal's built-in acceleration sensor and gyroscope is greater than or equal to the preset steering frequency threshold T f , then the indoor confidence is determined to be 1, that is, the indoor confidence I 5内 =1; if the steering frequency F collected by the mobile terminal's built-in acceleration sensor and gyroscope is less than the set steering frequency threshold T f , then the outdoor confidence is determined to be 1, that is, the outdoor confidence I5 = 1; the preset turning frequency threshold T f It is based on multiple turning results collected and counted in an actual indoor environment within a unit effective time to obtain the average number of turns.

[0098] Through the above method, the confidence of the indoor scene in which the mobile phone terminal is located can be calculated through the relationship between the turning frequency collected by the acceleration sensor and the gyroscope and the preset turning frequency threshold, and the probability of the indoor and outdoor scenes in which the mobile phone terminal is located can be judged according to the confidence value, that is, the scene in which the mobile phone terminal is located can be judged based on the acceleration sensor and gyroscope of the mobile phone terminal.

[0099] According to the data collected by the mobile phone terminal's built-in light sensor, pressure sensor, geomagnetic sensor, acceleration sensor and gyroscope, and considering the results of multiple sensors, the indoor and outdoor scene detection results of the mobile phone terminal can be obtained as follows:

[0100] I=K(∑K i I i )

[0101] Where 0<i≤4, and i is an integer, K i The value of is determined by the current sensor detection result and the error size, and K is the confidence coefficient

[0102] The judgment of the scene where the terminal is located based on the data collected by the above sensors has its own advantages and disadvantages. Since each judgment method can only give a better judgment result for a specific scene, the present disclosure performs a weighted calculation on the detection results of the above sensors, where the coefficient K of the weighted calculation is iThe value of is determined by the current sensor detection result and the size of the error. For example, the light sensor can quickly detect the change of the light intensity in the environment during a clear day and give a scene judgment result with a high confidence level. However, at night when there is lighting both indoors and outdoors, the accuracy of its judgment result will be lower. When the environment causes the light sensor to have a low accuracy, it is necessary to reduce the light sensor confidence coefficient in the weighted calculation. When the pressure sensor judges the scene, it needs to make the judgment result more accurate when there is a change in the air pressure value. If the user is in an indoor or outdoor environment for a long time, resulting in a small change in the air pressure value or even no change in the air pressure value, the confidence coefficient of the pressure sensor needs to be reduced at this time. Geomagnetic The method of using the sensor to judge the scene through the geomagnetic peak is relatively stable, but it is still affected by objects such as fast-moving cars that cause large geomagnetic fluctuations. When the confidence of the geomagnetic sensor in judging the scene is affected, the coefficient of the weighted calculation of the geomagnetic sensor needs to be adjusted accordingly; the acceleration sensor and the gyroscope judge the scene through the user's rotation frequency. Under normal circumstances, the accuracy is higher when the user is walking normally. If the user is in an abnormal walking state, the judgment accuracy of the acceleration sensor and the gyroscope will be reduced. When the judgment accuracy of the acceleration sensor and the gyroscope is reduced, when performing weighted calculation of the confidence, the weighted coefficient needs to be reduced accordingly. Based on the accuracy of the above-mentioned multiple sensors in judging the scene, the confidence coefficient of each sensor is appropriately selected, and a more accurate confidence in indoor and outdoor scene judgment can be obtained through weighted calculation.

[0103] In the present disclosure, in order to further reduce the interaction and errors between different sensors, the present disclosure may also use an Adaboost model to perform strong classification learning and obtain more accurate indoor and outdoor scene judgment results.

[0104] Since the weighted coefficients of the confidence of the above-mentioned multiple sensors are manually adjusted according to the specific usage scenarios, there are certain errors in the results. Based on the errors in the judgment results of the above-mentioned multiple sensors, the present disclosure can adopt the Adaboost algorithm, with the characteristic value of each sensor as input, indoor and outdoor scenes as classification recognition, and training an integrated model. The integrated model can automatically optimize the confidence coefficients of the above-mentioned sensors to obtain more accurate scene judgment results.

[0105] Among them, the Adaboost algorithm can improve the classification ability of data, as follows: first, the first weak classifier is obtained by learning N training samples; the wrongly classified samples and other new data together constitute a new N training sample, and the second weak classifier is obtained by learning this sample; the samples that are wrongly classified in the above two steps are added to other new samples to form another new N training sample, and the third weak classifier is obtained by learning this sample; finally, the strong classifier that is improved, that is, which category a certain data is classified into is determined by the weights of each classifier, so that the trained Adaboost classifier does not have the problem of overfitting. From the description process of the Adaboost algorithm, it can be seen that in the implementation process of the algorithm, the sample weights are initialized according to the size of the training set to satisfy the uniform distribution, and the weights of the samples after the algorithm iteration are changed and normalized through formulas in subsequent operations.

[0106] Specifically, the Adaboost algorithm is used for model training, and crowdsourcing is used to collect data on the current scene of users carrying mobile phone terminals, record the characteristic values ​​of each sensor and the actual status of user input, and finally train the Adaboost model in Matlab. The strong classification learning of the Adaboost module can learn the main behavioral habits of the current user based on the collection of a certain number of indoor and outdoor scene activity data of users. For example, children, middle-aged people, and the elderly have different behaviors, so the Adaboost module can be used to roughly classify users, and the above-mentioned indoor and outdoor modules can be further accurately detected based on user classification learning.

[0107] In addition, as a detection model, the Adaboost model does not cover the original comprehensive detection method. The output results of the software have two results, one is the result of the sensor weighting method, and the other is the Adaboost test result. By comparing the two results, the accuracy of the user's judgment of the scene can be determined.

[0108] Based on the confidence of the data collected by the above-mentioned multiple sensors and combined with the Adaboost model, the indoor and outdoor scenes where the user is located are judged.

[0109] In step S30, if the terminal is currently located indoors, the indoor positioning module is called to perform indoor positioning on the terminal.

[0110] If the terminal is currently located outdoors, the indoor positioning module is disabled.

[0111] Combine the following Figure 2 The automatic start-stop positioning method is described as follows:

[0112] A user with his own terminal device enters the detection area. The terminal device has an indoor and outdoor scene detection module and an indoor positioning module. The terminal device calls a variety of sensors built into the device to judge the indoor and outdoor scenes of the user. The multiple sensors include light sensors, pressure sensors, geomagnetic sensors, acceleration sensors and gyroscopes, and calculates the confidence I1 of the light intensity data collected by the light sensor, the confidence I2 of the air pressure data collected by the pressure sensor, the confidence I3 of the geomagnetic data collected by the geomagnetic sensor, and the confidence I4 of the steering data collected by the acceleration sensor and the gyroscope. The Adaboost module is used for strong classification learning to learn the main behavioral habits of the current user, and the user is classified into discount categories (children, middle-aged, and elderly), and the confidence I=K(∑K i I i );

[0113] When the terminal device determines that the location is indoors, the indoor positioning module is called, that is, the terminal's own indoor positioning technology (Bluetooth, UWB) is called for indoor positioning;

[0114] When the terminal device detects that the user leaves the indoor area or is in an outdoor scene, the indoor positioning module is shut down.

[0115] The automatic start-stop positioning method provided by the present invention uses a variety of sensors to comprehensively judge the indoor and outdoor scenes where the user is located, and automatically starts or stops the terminal's built-in positioning module according to the different scenes where the user is located. The scene positioning is more accurate, and the error of indoor and outdoor scene positioning is reduced. At the same time, the positioning cost is also reduced, and the energy consumption of the positioning module is reduced.

[0116] It should be noted that, although the steps of the automatic start-stop positioning method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0117] The embodiment of the present disclosure also provides an automatic start-stop positioning device, Figure 3 FIG. 1 is a schematic diagram of a framework of an automatic start-stop positioning device in an exemplary embodiment of the present disclosure. Figure 3 As shown, the automatic start-stop positioning device includes: a data acquisition module 10, a scene recognition module 20, an automatic start-stop module 30 and an indoor positioning module 40.

[0118] Among them, the data acquisition module 10 is used to collect the scene data currently corresponding to the terminal through the terminal's own light sensor, pressure sensor, geomagnetic sensor, acceleration sensor and gyroscope. The collected scene data includes indicator information related to light intensity, pressure, geomagnetic intensity and turning frequency.

[0119] The scene recognition module 20 is used to determine the confidence level corresponding to each indicator information of the terminal according to the scene data collected by the data collection module 10, and perform weighted sum calculation on multiple confidence levels to determine the scene in which the terminal is currently located.

[0120] The automatic start-stop module 30 is used to control the start and stop of the indoor positioning module 40 according to the scene in which the terminal is currently located determined by the scene recognition module 20 .

[0121] The indoor positioning module 40 is used to perform indoor positioning of the terminal.

[0122] The present invention provides an automatic start-stop positioning device. The device uses an automatic start-stop positioning method to judge indoor and outdoor scenes through four modules: a data acquisition module, a scene recognition module, an automatic start-stop module and an indoor positioning module. The indoor positioning module is called to start or stop according to the judgment results of the indoor and outdoor scenes, and the judgment result is highly accurate.

[0123] Figure 4 is a schematic diagram of the structure of an electronic device in an exemplary embodiment of the present disclosure, such as Figure 4 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: at least one processing unit 1010, at least one storage unit 1020, and a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010).

[0124] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 1 The method steps shown, etc.

[0125] The storage unit 1020 may include a volatile storage unit, such as a random access storage unit (RAM) 1021 and / or a cache storage unit 1022 , and may further include a read-only storage unit (ROM) 1023 .

[0126] The storage unit 1020 may also include a program / utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0127] The bus 1030 may include a data bus, an address bus, and a control bus.

[0128] The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), and such communication may be performed via an input / output (I / O) interface 1040. The electronic device 1000 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1050. As shown, the network adapter 1050 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0129] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0130] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0131] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. In one embodiment, the program product can be implemented as a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.

[0132] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0133] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0134] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0135] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0136] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. An automatic start-stop positioning method, characterized in that: include: The scene data currently corresponding to the terminal is collected by one or more sensors provided by the terminal, wherein the sensors include a light sensor, a pressure sensor, a geomagnetic sensor, an acceleration sensor and a gyroscope; Calculating the confidence of the scene data corresponding to each of the sensors, performing weighted sum calculation on the multiple confidences, and obtaining the confidence of the scene currently located by the terminal; Adopting the Adaboost algorithm, taking the characteristic value of each sensor as input and the scene where the terminal is located as classification recognition, training the integrated model so that the integrated model can automatically optimize the confidence coefficient in each sensor; Determining the scene in which the terminal is currently located according to the confidence of the scene in which the terminal is currently located; If the terminal is currently located indoors, calling an indoor positioning module to perform indoor positioning on the terminal; Collecting the current ambient light intensity corresponding to the terminal through a light sensor; Comparing the ambient light intensity with a preset light intensity threshold to determine the light intensity confidence level of the scene currently located by the terminal; The preset light intensity threshold includes a first preset light intensity threshold and a second preset light intensity threshold, the first preset light intensity threshold is a preset light intensity threshold from one hour after sunrise to half an hour before sunset, and the second preset light intensity threshold is a preset light intensity threshold from after sunset to before sunrise; The terminal is a mobile phone terminal, and the local sunrise and sunset times are obtained based on the longitude and latitude collected by the mobile phone terminal, and then the time period of the light intensity judgment method is divided according to the sunrise and sunset times collected by the mobile phone terminal: From one hour after sunrise to half an hour before sunset, the first preset light intensity threshold is set to 2000 lux, and a sliding window sequence with a length of T1 is set. The collected light intensity is put into the sequence in a first-in-first-out order, and the average light intensity of the sliding window when the length is T1 is calculated, and the average light intensity is represented as L. The confidence of the scene where the mobile phone terminal is currently located is represented as I1, where I1 represents the current indoor light intensity confidence, and I1 represents the outdoor light intensity confidence. The relationship between the scene confidence I1 and the average light intensity L of the mobile phone terminal is as follows: I1 outside = 1 (L ≥ 2000 lux) I1 = 1 (L < 200 lux) In the period from sunset to sunrise, the second preset light intensity threshold is set to 30 lux, and a sliding window sequence with a length of T1 is also used to calculate the average light intensity L of the sliding window when the length is T1. The relationship between the scene confidence I1 of the current mobile terminal and the average light intensity L is as follows: When the average intensity L of the sliding window is ≤30 lux, and the time is not between 22:00 and 6:00 in the morning, the room will be illuminated by lights during this period. At this time, the influence of the light factor on the light intensity needs to be considered. Therefore, the relationship between the scene confidence I1 of the current mobile terminal and the average light intensity L is as follows: This improves the accuracy and robustness of determining the scene in which the mobile phone terminal is located by light intensity.

2. The automatic start-stop positioning method according to claim 1, characterized in that: The method further comprises: If the terminal is currently located outdoors, the indoor positioning module is turned off.

3. The automatic start-stop positioning method according to claim 1, characterized in that: The method further comprises: Collecting the absolute value of the scene pressure change currently corresponding to the terminal through the pressure sensor; The absolute value of the scene pressure change is compared with a preset pressure change threshold to determine the pressure confidence level of the scene currently located by the terminal.

4. The automatic start-stop positioning method according to claim 1, characterized in that: The method further comprises: Collecting the scene peak quantity value currently corresponding to the terminal through the geomagnetic sensor; The peak quantity value is compared with a preset peak threshold to determine the geomagnetic confidence of the scene where the terminal is currently located.

5. The automatic start-stop positioning method according to claim 1, characterized in that: The method further comprises: Collecting the current steering frequency value corresponding to the terminal through an acceleration sensor and a gyroscope; The turning frequency value is compared with a preset turning frequency threshold to determine the turning confidence of the scene in which the terminal is currently located.

6. An automatic start-stop positioning device, applied to the method according to any one of claims 1 to 5, characterized in that: include: A data acquisition module is used to collect scene data currently corresponding to the terminal through the light sensor, pressure sensor, geomagnetic sensor, acceleration sensor and gyroscope provided by the terminal, and the collected scene data includes index information related to light intensity, pressure, geomagnetic intensity and turning frequency; A scene recognition module, used to determine the confidence corresponding to each indicator information of the terminal according to the scene data collected by the data collection module, and perform weighted sum calculation on multiple confidences to determine the scene in which the terminal is currently located; An automatic start-stop module, used to control the start and stop of the indoor positioning module according to the scene in which the terminal is currently located determined by the scene recognition module; The indoor positioning module is used to perform indoor positioning on the terminal.

7. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the method according to any one of claims 1 to 5.