Method, device and storage medium for determining magnetic sensor measurement data

By determining the interfering components and their working scenarios, the magnetic sensor measurement data is compensated, which solves the problem of reduced measurement accuracy of magnetic sensors in electronic equipment, improves the accuracy and accuracy of measurement data, and ensures the reliability of compass and other functions.

CN114252930BInactive Publication Date: 2024-09-24BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202011000137.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-22
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN114252930B
    Figure CN114252930B
Patent Text Reader

Abstract

The present disclosure relates to a method, device and storage medium for determining magnetic sensor measurement data. The method for determining magnetic sensor measurement data is applied to a terminal, on which a magnetic sensor is installed. The method includes: in response to the magnetic sensor being in a working state, determining interference components that interfere with the magnetic sensor measurement data, and determining the working scene of the interference components; based on the corresponding relationship between the interference components, the working scene and the measurement data influence value, determining the measurement data influence value of the interference components in the working scene; based on the measurement data influence value, compensating the measurement data of the magnetic sensor, and determining the compensated measurement data. Through the embodiments of the present disclosure, the adverse effects of interference components on the measurement data of the magnetic sensor can be removed, so that the measurement data is accurate and the accuracy of the measurement data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to a method, device and storage medium for determining measurement data of a magnetic sensor. Background Art

[0002] With the rapid development of science and technology, electronic technology has made great progress, and various electronic devices are increasingly used in people's lives. In order to meet the needs of users, the functions of electronic devices are becoming more and more perfect. When users use various applications installed on electronic devices, many applications require the support of compass function, navigation function, global positioning system function, orientation function, etc.

[0003] In order to achieve the above functions, the geomagnetic signal collected by the magnetic sensor installed in the electronic device is needed. The magnetic sensor senses the direction of the earth's magnetic field. The earth's magnetic field strength is about 0.5 gauss, while the magnetic field strength of a general electromagnet is as high as hundreds of gauss. When the internal components of electronic devices such as motors, receivers, speakers, etc. are in working state, the magnetic field of the components will be superimposed on the earth's magnetic field, causing fluctuations in the magnetic field. This influence is more significant when the internal components that produce electromagnetic effects are set close to the magnetic sensor.

[0004] Due to the limitation of the internal space of electronic equipment, it is difficult for magnetic sensors to avoid and are close to motors, earpieces, speakers and other devices. This causes interference in the magnetic sensor's measurement of the earth's magnetic field strength, reduces the measurement accuracy of the magnetic sensor, and makes the measurement results no longer accurate. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present disclosure provides a method, device and storage medium for determining measurement data of a magnetic sensor.

[0006] According to a first aspect of an embodiment of the present disclosure, a method for determining magnetic sensor measurement data is provided, which is applied to a terminal, on which a magnetic sensor is installed. The method for determining the magnetic sensor measurement data comprises: in response to the magnetic sensor being in a working state, determining an interfering component that interferes with the measurement data of the magnetic sensor, and determining a working scenario of the interfering component; based on a correspondence between the interfering component, the working scenario and the measurement data influence value, determining the measurement data influence value of the interfering component in the working scenario; and compensating the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data.

[0007] In one embodiment, the correspondence between the interference components, working scenarios and measurement data impact values ​​is pre-determined in the following manner: determine one or more interference components within the first area of ​​the magnetic sensor installation position; control the magnetic sensor to enter a working state, and independently enter the working state for each of the one or more interference components, and control the interference components entering the working state to be in different working scenarios; record the measurement data impact values ​​of each interference component in different working scenarios that interfere with the measurement data of the magnetic sensor, and obtain the correspondence between the interference components, working scenarios and measurement data impact values.

[0008] In one embodiment, there are multiple interfering components that interfere with the measurement data of the magnetic sensor. Before compensating the measurement data of the magnetic sensor based on the measurement data impact value, the method for determining the measurement data of the magnetic sensor also includes: separately determining multiple measurement data impact values ​​that interfere with the measurement data of the magnetic sensor by the multiple interfering components; and determining the measurement data impact value for compensating the measurement data of the magnetic sensor according to the magnitude of the multiple measurement data impact values.

[0009] In one embodiment, according to the sizes of the multiple measurement data influence values, the measurement data influence value for compensating the measurement data of the magnetic sensor is determined, including: in order of the multiple measurement data influence values ​​from large to small, one or more measurement data influence values ​​from the multiple measurement data influence values ​​are selected as the measurement data influence values ​​for compensating the measurement data of the magnetic sensor.

[0010] In one embodiment, compensating the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data includes: reversely compensating the measurement data of the magnetic sensor for the measurement data influence value to obtain compensated measurement data.

[0011] According to a second aspect of an embodiment of the present disclosure, a device for determining magnetic sensor measurement data is provided, which is applied to a terminal, on which a magnetic sensor is installed. The device for determining magnetic sensor measurement data includes: a determination module, for determining, in response to the magnetic sensor being in a working state, an interfering component that interferes with the magnetic sensor measurement data, and determining a working scenario of the interfering component; and determining, based on a correspondence between the interfering component, the working scenario and the measurement data influence value, a measurement data influence value of the interfering component in the working scenario; and a compensation module, for compensating the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data.

[0012] In one embodiment, the determination module determines the correspondence between interference components, working scenarios and measurement data impact values ​​in the following manner: determining one or more interference components within the first area of ​​the magnetic sensor installation position; controlling the magnetic sensor to enter a working state, and independently allowing each of the one or more interference components to enter a working state, and controlling the interference components entering the working state to be in different working scenarios; recording the measurement data impact values ​​of each interference component in different working scenarios that interfere with the measurement data of the magnetic sensor, and obtaining the correspondence between the interference components, working scenarios and measurement data impact values.

[0013] In one embodiment, there are multiple interfering components that interfere with the measurement data of the magnetic sensor, and the determination module is further used to: before compensating the measurement data of the magnetic sensor based on the measurement data influence value, respectively determine multiple measurement data influence values ​​of the interference caused by the multiple interfering components on the measurement data of the magnetic sensor; and determine the measurement data influence value for compensating the measurement data of the magnetic sensor according to the magnitude of the multiple measurement data influence values.

[0014] In one embodiment, the determination module determines the measurement data influence value for compensating the measurement data of the magnetic sensor according to the sizes of the multiple measurement data influence values ​​in the following manner: in order of the multiple measurement data influence values ​​from large to small, one or more measurement data influence values ​​are selected from the multiple measurement data influence values ​​as the measurement data influence values ​​for compensating the measurement data of the magnetic sensor.

[0015] In one embodiment, the compensation module compensates the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data in the following manner: reversely compensate the measurement data of the magnetic sensor for the measurement data influence value to obtain compensated measurement data.

[0016] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when the magnetic sensor is in a working state, interfering components that interfere with the measurement data of the magnetic sensor are determined, and the working scenario of the interfering components is determined; based on the corresponding relationship between the interfering components, the working scenario and the measurement data influence value, the measurement data influence value of the interfering components in the working scenario is determined; based on the measurement data influence value, the measurement data of the magnetic sensor is compensated to obtain the compensated measurement data, and the adverse effects of the interfering components on the measurement data of the magnetic sensor are removed, so that the measurement data is accurate and the precision of the measurement data is improved.

[0017] 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

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0019] Figure 1 The figure is a flow chart of a method for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure.

[0020] Figure 2 It is a flowchart of a method for corresponding relationships among interference components, working scenarios and measurement data impact values ​​according to an exemplary embodiment of the present disclosure.

[0021] Figure 3 The present invention is a flowchart of a method for determining a measurement data influence value for compensating measurement data of a magnetic sensor according to an exemplary embodiment of the present disclosure.

[0022] Figure 4 The present invention is a flowchart of a method for determining a measurement data influencing value for compensating measurement data of a magnetic sensor according to another exemplary embodiment of the present invention.

[0023] Figure 5 The figure is a flow chart of a method for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure.

[0024] Figure 6 It is a schematic diagram of a method for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure.

[0025] Figure 7 The present invention is a block diagram of a device for determining magnetic sensor measurement data according to an exemplary embodiment of the present invention.

[0026] Figure 8 The invention is a block diagram of a device for determining magnetic sensor measurement data according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0028] Various electronic devices are increasingly used in people's lives. In order to meet the needs of users, the functions of electronic devices are becoming more and more complete. When users use various applications installed on electronic devices, many applications require the support of compass functions, navigation functions, global positioning system functions, orientation functions, etc.

[0029] In order to achieve the above functions, it is necessary to use the magnetic sensor installed in the electronic device to collect geomagnetic signals. Magnetic sensors, also known as geomagnetic sensors, can be used to sense the direction of the earth's magnetic field. The strength of the earth's magnetic field is about 0.5 gauss, while the magnetic field strength of a general electromagnet is as high as hundreds of gauss. When the internal components of electronic devices such as motors, receivers, speakers, etc. are in working state, the magnetic field of the above components will be superimposed on the earth's magnetic field, causing fluctuations in the magnetic field. This influence is more significant when the internal components that produce electromagnetic effects are set close to the magnetic sensor.

[0030] However, due to the limited internal space of electronic devices, it is difficult to avoid magnetic sensors and motors, receivers, speakers and other devices in actual settings. The magnetic sensor's measurement of the earth's magnetic field strength is disturbed, the measurement accuracy of the magnetic sensor is reduced, and the measurement results are no longer accurate.

[0031] Therefore, the present disclosure provides a method for determining the measurement data of a magnetic sensor, which compensates the measurement data based on the interference components of the terminal and the influence value of the interference components on the measurement data of the magnetic sensor to obtain the compensated measurement data. The adverse effects of the interference components in the terminal on the measurement data of the magnetic sensor are removed to make the measurement data accurate.

[0032] Figure 1 is a flow chart of a method for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method for determining the magnetic sensor measurement data is used in a terminal, and a magnetic sensor is installed on the terminal. The method for determining the magnetic sensor measurement data includes the following steps.

[0033] In step S101, in response to the magnetic sensor being in a working state, interfering components that interfere with measurement data of the magnetic sensor are determined, and a working scenario of the interfering components is determined.

[0034] In step S102, based on the correspondence between the interfering components, the working scenarios and the measured data impact values, the measured data impact values ​​of the interfering components in the working scenarios are determined.

[0035] In step S103, the measurement data of the magnetic sensor is compensated based on the measurement data influence value to obtain compensated measurement data.

[0036] In the embodiments of the present disclosure, the interfering components are components installed in the terminal that interfere with the measurement data of the magnetic sensor. When the magnetic sensor is in working state, the interfering components that interfere with the measurement data of the magnetic sensor are determined. For example, in the application in which the user uses the terminal, it is necessary to use the compass function, navigation function, global positioning system function, etc. of the terminal, and the magnetic sensor of the terminal is in working state at this time. Determine the interfering components that interfere with the measurement data of the magnetic sensor, for example, such as a motor, an earpiece, a speaker, etc., and determine the working scenes of the motor, the earpiece, and the speaker. For example, when the terminal is a mobile phone, when the user uses the earpiece to make a call or play music, the earpiece is in different working scenes. It can be understood that the same interfering component has different degrees of influence on the measurement data of the magnetic sensor in different working scenes.

[0037] In the embodiment of the present disclosure, the interference components have different measurement data impact values ​​of the magnetic sensor in different working scenarios, that is, there is a corresponding relationship between the working scenario and the measurement data impact value. It can be understood that the measurement data and the measurement data impact value in the present disclosure can be characterized by magnetic declination. The measurement data impact value is used to characterize the interference of the interference components on the measurement data of the magnetic sensor. The correspondence between the interference components, the working scenario and the measurement data impact value can be understood as the correspondence between the interference components, the working scenario and the magnetic declination impact value. In the following embodiment of the present disclosure, the measurement data is sometimes referred to as magnetic declination, and the measurement data impact value is sometimes referred to as magnetic declination impact value. For example, the correspondence between the interference components, the working scenario and the magnetic declination impact value can be: the loudspeaker plays at a volume of 10, and the resulting magnetic declination is 20 degrees; the loudspeaker plays at a volume of 5, and the resulting magnetic declination is 10 degrees, etc.

[0038] For example, a user uses a terminal for walking navigation, and the terminal is playing audio at a volume of 10. It is determined that the interfering component that interferes with the magnetic declination of the magnetic sensor is a speaker, and the working scenario of the speaker is to play at a volume of 10. Based on the correspondence between the interfering components, working scenarios, and the impact value of the magnetic declination, it is determined that when the volume of the speaker is 10, the impact value of the magnetic declination of the magnetic sensor is 20 degrees.

[0039] In the disclosed embodiment, the magnetic declination of the magnetic sensor is compensated based on the magnetic declination influence value to obtain the compensated magnetic declination. As described in the above example, the magnetic sensor is in a working state, and the measurement data of the magnetic sensor, that is, the magnetic declination is 40 degrees. At this time, the speaker plays audio, which affects the magnetic declination value determined by the magnetic sensor, that is, the value of the above-mentioned side declination angle is an inaccurate magnetic declination value that is interfered with. The interfering component that interferes with the magnetic declination of the magnetic sensor is a speaker, and it is determined that the speaker plays at a volume of 10. According to the correspondence between the working scene of the speaker and the magnetic declination influence value, when the speaker plays at a volume of 10, the magnetic declination influence value of the magnetic sensor is 20 degrees, that is, the magnetic declination of the magnetic sensor is compensated to obtain the declination after interference removal and compensation.

[0040] According to an embodiment of the present disclosure, when the magnetic sensor is in a working state, interfering components that interfere with the measurement data of the magnetic sensor are determined, and the working scenario of the interfering components is determined. Based on the correspondence between the interfering components, the working scenario and the measurement data impact value, the measurement data impact value of the interfering components in the working scenario is determined. Based on the measurement data impact value, the measurement data of the magnetic sensor is compensated to obtain the compensated measurement data, thereby removing the adverse effects of the interfering components on the measurement data of the magnetic sensor, making the measurement data of the magnetic sensor accurate, and improving the accuracy of the measurement data.

[0041] Figure 2 is a flow chart showing a method for corresponding relationship between interference components, working scenarios and measurement data impact values ​​according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method for corresponding relationships between interference components, working scenarios and measurement data impact values ​​includes the following steps.

[0042] In step S201, one or more interfering components within a first area of ​​the magnetic sensor installation position are determined.

[0043] In step S202, the magnetic sensor is controlled to enter a working state, and each interference component of the one or more interference components is independently controlled to enter a working state, and the interference components entering the working state are controlled to be in different working scenarios.

[0044] In step S203, the measurement data impact value of each interfering component causing interference to the magnetic sensor measurement data in different working scenarios is recorded to obtain a corresponding relationship between the interfering component, the working scenario and the measurement data impact value.

[0045] In the embodiments of the present disclosure, for example, corresponding measurement data impact values ​​may be measured for different interference components and different working scenarios in an experimental environment.

[0046] For different terminals, interfering components within the first area of ​​the installation position of the magnetic sensor in the terminal are determined. The interfering components may be one or more.

[0047] In order to determine the corresponding relationship between the interference components, the working scene and the impact value of the measured data, for example, the magnetic sensor can be controlled to enter the working state. When the magnetic sensor is in the working state, each interference component enters the working state independently, and the interference components entering the working state are controlled to be in different working scenes.

[0048] For example, the magnetic declination obtained when the magnetic sensor enters the working state is 0 degrees, and there are no interfering components at this time. Keep the working state of the magnetic sensor, turn on the speaker alone for playback, and control it in different working scenarios, that is, play at different volume values. Record the values ​​of the magnetic declination that interferes with the magnetic sensor when the speaker plays at different volume values, and obtain the corresponding relationship between the speaker and different volume values ​​and magnetic declination values. For example, the speaker plays at a volume of 10, and the magnetic declination measured by the magnetic sensor is 20 degrees, then it is determined that the magnetic declination impact value generated by the speaker playing at a volume of 10 is 20 degrees. The speaker plays at a volume of 5, and the magnetic declination measured by the magnetic sensor is 10 degrees, then it is determined that the magnetic declination impact value generated by the speaker playing at a volume of 5 is 10 degrees. The speaker plays audio at a volume of 8, and the magnetic declination impact value generated is 12 degrees.

[0049] For another example, when the magnetic sensor enters the working state, the magnetic declination is 0 degrees, and there are no interfering components. When the motor of the terminal is triggered to work alone, the magnetic declination measured by the magnetic sensor becomes 5 degrees, and the magnetic declination impact value caused by the motor working is 5 degrees.

[0050] The magnetic declination influence values ​​of various interfering components and different working scenarios that interfere with the magnetic declination of the magnetic sensor obtained by experimental means are used to establish a corresponding relationship between the interfering components, working scenarios and the magnetic declination influence values. It can be understood that the corresponding relationship between the interfering components, working scenarios and the magnetic declination influence values ​​can be pre-established according to different terminals, different usage scenarios, user needs, etc. In this disclosure, the method for establishing the corresponding relationship is not limited.

[0051] According to an embodiment of the present disclosure, by determining one or more interfering components within the first area of ​​the magnetic sensor installation position, the magnetic sensor controls the interfering components to work in different working scenarios when it enters a working state, and records the measurement data impact values ​​of each interfering component in different working scenarios that interfere with the magnetic sensor measurement data, and obtains the corresponding relationship between the interfering components, the working scenario and the measurement data impact value. When determining the measurement data of the magnetic sensor, accurate data can be used to determine the impact value of the interfering component on the measurement data, thereby improving the accuracy of the measurement data of the magnetic sensor.

[0052] Figure 3 is a flow chart of a method for determining a measurement data influence value for compensating measurement data of a magnetic sensor according to an exemplary embodiment of the present disclosure, such as Figure 3 As shown, the method for determining a measurement data influencing value for compensating the measurement data of a magnetic sensor includes the following steps.

[0053] In one embodiment of the present disclosure, there are multiple interfering components that interfere with the measurement data of the magnetic sensor.

[0054] In step S301, a plurality of measurement data influence values ​​of interference caused by a plurality of interfering components on the measurement data of the magnetic sensor are respectively determined.

[0055] In step S302, a measurement data influence value for compensating the measurement data of the magnetic sensor is determined according to the magnitudes of the plurality of measurement data influence values.

[0056] In the embodiment of the present disclosure, in an experimental environment, for multiple interfering components, multiple magnetic declination influence values ​​that interfere with the magnetic sensor measurement data in different working scenarios are determined respectively.

[0057] As described in the above example, the magnetic sensor enters the working state, the speaker plays audio at a volume of 10, and the magnetic declination impact value is 20 degrees. The motor of the terminal is triggered to work alone, and the magnetic declination impact value is 5 degrees.

[0058] According to the magnitude of the above-mentioned magnetic declination influence value, the magnetic declination influence value for compensating the magnetic declination of the magnetic sensor is determined. It can be understood that in the current working scenario, the interference component corresponding to the large magnetic declination influence value is the speaker. Compared with the speaker, the influence of the motor on the magnetic declination when working can be considered relatively small. When compensating the magnetic declination of the magnetic sensor, it can be to comprehensively consider the influence of the speaker and the motor on the magnetic declination, that is, the magnetic declination influence value of the speaker interfering with the magnetic declination of the magnetic sensor and the magnetic declination influence value generated by the motor are superimposed. It can be understood that the comprehensive consideration of the influence of the speaker and the motor on the magnetic declination can be the magnetic declination influence value of the speaker interfering with the magnetic declination of the magnetic sensor and the magnetic declination influence value generated by the motor, according to the preset weight value. The disclosed embodiment does not limit the method of comprehensively considering the influence of multiple interfering components on the magnetic declination.

[0059] In the embodiment of the present disclosure, when compensating the magnetic declination of the magnetic sensor, only the influence of the speaker on the magnetic declination as the main influence can be considered. That is, since the influence value of the magnetic declination caused by the motor operation is relatively small and the influence time is short, it can be ignored. This is to avoid the measurement data jitter caused by excessive and repeated magnetic declination compensation as the motor working state changes.

[0060] Figure 4 is a flowchart of a method for determining a measurement data influence value for compensating measurement data of a magnetic sensor according to another exemplary embodiment of the present disclosure, such as Figure 4 As shown, the method for determining a measurement data influencing value for compensating the measurement data of a magnetic sensor includes the following steps.

[0061] In step S401, a plurality of measurement data influence values ​​of interference caused by a plurality of interfering components on the measurement data of the magnetic sensor are respectively determined.

[0062] In step S402, one or more measurement data influence values ​​are selected from the multiple measurement data influence values ​​in descending order as measurement data influence values ​​for compensating the measurement data of the magnetic sensor.

[0063] In the embodiment of the present disclosure, in an experimental environment, for multiple interfering components, multiple magnetic declination influence values ​​that interfere with the magnetic declination of the magnetic sensor in different working scenarios are determined respectively.

[0064] As described in the above example, the magnetic sensor enters the working state, and the magnetic declination is 30 degrees. At this time, the speaker plays audio at a volume of 5, and the magnetic declination impact value is 10 degrees. The motor of the terminal is triggered to work, and the magnetic declination impact value is 3 degrees.

[0065] The above-mentioned declination influence values, i.e., 10 degrees and 3 degrees, are used in order from small to large to determine the declination influence values ​​for compensating the magnetic declination of the magnetic sensor. It can be understood that in the current working scenario, the interfering component with a large declination influence value is the speaker. Compared with the speaker, the influence of the motor on the magnetic declination when working can be considered relatively small. The declination influence value of 10 degrees generated by the speaker is determined as compensation for the magnetic declination of the magnetic sensor. That is, the magnetic declination is 30 degrees, and 10 degrees is compensated, and the magnetic declination of the magnetic sensor after compensation is 20 degrees.

[0066] In the disclosed embodiment, when determining the magnetic declination influence value for compensating the magnetic declination of the magnetic sensor, the influence of the speaker and the motor on the magnetic declination can also be considered at the same time, that is, the 10-degree magnetic declination influence value of the speaker interfering with the magnetic declination of the magnetic sensor is selected, and the 3-degree magnetic declination influence value generated by the motor is selected. That is, the 10-degree magnetic declination influence value of the speaker interfering with the magnetic declination of the magnetic sensor and the 3-degree magnetic declination influence value generated by the motor are superimposed to obtain a magnetic declination influence value of 13 degrees. 13 degrees is used as the magnetic declination influence value for compensating the magnetic declination of the magnetic sensor, that is, the magnetic declination of 30 degrees is compensated by 13 degrees, and the magnetic declination of the magnetic sensor after compensation is 17 degrees.

[0067] It can be understood that, taking into account the influence of the speaker and the motor on the magnetic declination, the declination influence value of 10 degrees caused by the speaker interfering with the magnetic declination of the magnetic sensor and the declination influence value of 3 degrees caused by the motor operation can be accumulated according to the preset weight value. The sum of the speaker declination influence value and the motor declination influence value accumulated according to the preset weight value is used as the declination influence value for compensating the magnetic declination of the magnetic sensor to obtain the compensated magnetic declination. For example, the speaker declination influence value takes a weight value of 0.8, the motor declination influence value takes a weight value of 0.2, and the weighted calculation obtains a declination influence value of 8.6 degrees. The declination of 30 degrees is compensated by 8.6 degrees, and the magnetic declination of the magnetic sensor after compensation is 21.4 degrees.

[0068] According to an embodiment of the present disclosure, by respectively determining multiple measurement data influence values ​​of interference caused by multiple interfering components on the measurement data of the magnetic sensor, and selecting one or more measurement data influence values ​​from the multiple measurement data influence values ​​in order from large to small, as measurement data influence values ​​for compensating the measurement data of the magnetic sensor, it is possible to more accurately determine the influence value of the interfering components on the measurement data when determining the measurement data of the magnetic sensor, thereby improving the accuracy of the measurement data of the magnetic sensor.

[0069] Figure 5 is a flow chart of a method for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure. Figure 5 As shown, the method for determining the magnetic sensor measurement data includes the following steps.

[0070] In step S501, in response to the magnetic sensor being in a working state, interfering components that interfere with measurement data of the magnetic sensor are determined, and a working scenario of the interfering components is determined.

[0071] In step S502, based on the correspondence between the interfering components, the working scenarios and the measured data impact values, the measured data impact values ​​of the interfering components in the working scenarios are determined.

[0072] In step S503, the measurement data of the magnetic sensor is reversely compensated for the measurement data influencing value to obtain compensated measurement data.

[0073] In the disclosed embodiment, when the magnetic sensor is in working state, the interfering components that interfere with the magnetic declination of the magnetic sensor are determined. The interfering components can be one or more, and the working scene of the interfering components is determined. There is a corresponding relationship between the working scene and the magnetic declination impact value. In different working scenes, the magnetic declination impact value of the magnetic sensor is different. For example, when the speaker plays at a volume of 10, the magnetic declination generated is 20 degrees; when the speaker plays at a volume of 5, the magnetic declination generated is 10 degrees, and so on.

[0074] For example, a user uses a terminal for walking navigation, and the terminal is playing audio at a volume of 10. It is determined that the interfering component that interferes with the magnetic declination of the magnetic sensor is a speaker, and the working scenario of the speaker is to play at a volume of 10. Based on the correspondence between the interfering components, working scenarios, and the impact value of the magnetic declination, it is determined that when the volume of the speaker is 10, the impact value of the magnetic declination of the magnetic sensor is 20 degrees.

[0075] In the disclosed embodiment, the magnetic declination of the magnetic sensor is compensated based on the magnetic declination influence value to obtain the compensated magnetic declination. As described in the above example, the magnetic sensor is in a working state, and the magnetic declination of the magnetic sensor is 40 degrees. At this time, the speaker plays audio, which affects the magnetic declination value determined by the magnetic sensor, that is, the value of the above-mentioned side declination angle is an inaccurate magnetic declination value that is interfered with. The interfering component that interferes with the magnetic declination of the magnetic sensor is a speaker, and it is determined that the speaker plays at a volume of 10. According to the correspondence between the working scene of the speaker and the magnetic declination influence value, when the speaker plays at a volume of 10, the magnetic declination influence value of the magnetic sensor is 20 degrees, that is, the magnetic declination of the magnetic sensor of 40 degrees is compensated by -20 degrees, and the interference-free and compensated magnetic declination value is 40-20, that is, 20 degrees.

[0076] According to an embodiment of the present disclosure, when the magnetic sensor is in a working state, interfering components that interfere with the measurement data of the magnetic sensor are determined, and the working scenario of the interfering components is determined. Based on the correspondence between the interfering components, the working scenario and the measurement data impact value, the measurement data impact value of the interfering components in the working scenario is determined, and the measurement data impact value of the magnetic sensor is reversely compensated to obtain the compensated measurement data, thereby removing the adverse effects of the interfering components on the measurement data of the magnetic sensor, making the measurement data of the magnetic sensor accurate, and improving the accuracy of the measurement data.

[0077] Figure 6 It is a schematic diagram of a method for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure.

[0078] In step S601, the interfering components that affect the magnetic sensor are determined during terminal design and are marked.

[0079] In step S602, the impact value of each interfering component on the measurement data of the magnetic sensor is detected and recorded during factory production.

[0080] In step S603, the magnetic sensor is in working state, and the working scene of the interfering component is determined.

[0081] In step S604, the impact value on the measurement data of the magnetic sensor is determined according to the current working scene.

[0082] In step S605 , reverse compensation of the measurement data of the magnetic sensor is performed.

[0083] In step S606, compensated measurement data is obtained.

[0084] According to an embodiment of the present disclosure, when the magnetic sensor is in a working state, interfering components that interfere with the measurement data of the magnetic sensor are determined, and the working scenario of the interfering components is determined. Based on the correspondence between the interfering components, the working scenario and the measurement data impact value, the measurement data impact value of the interfering components in the working scenario is determined. Based on the measurement data impact value, the measurement data of the magnetic sensor is compensated to obtain the compensated measurement data, thereby removing the adverse effects of the interfering components on the measurement data of the magnetic sensor, making the measurement data of the magnetic sensor accurate, and improving the accuracy of the measurement data.

[0085] Based on the same concept, an embodiment of the present disclosure also provides a device for determining measurement data of a magnetic sensor.

[0086] It is understandable that the device for determining the magnetic sensor measurement data provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0087] Figure 7 is a block diagram of a device for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure. Figure 7 The device 100 for determining the measurement data of the magnetic sensor is applied to a terminal, on which a magnetic sensor is installed. The device 100 for determining the measurement data of the magnetic sensor includes a determination module 101 and a compensation module 102 .

[0088] The determination module 101 is used to determine the interference components that interfere with the measurement data of the magnetic sensor in response to the magnetic sensor being in a working state, and determine the working scene of the interference components; and determine the measurement data impact value of the interference components in the working scene based on the corresponding relationship between the interference components, the working scene and the measurement data impact value.

[0089] The compensation module 102 is used to compensate the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data.

[0090] According to an embodiment of the present disclosure, when the magnetic sensor is in a working state, interfering components that interfere with the measurement data of the magnetic sensor are determined, and the working scenario of the interfering components is determined. Based on the correspondence between the interfering components, the working scenario and the measurement data impact value, the measurement data impact value of the interfering components in the working scenario is determined. Based on the measurement data impact value, the measurement data of the magnetic sensor is compensated to obtain the compensated measurement data, thereby removing the adverse effects of the interfering components on the measurement data of the magnetic sensor, making the measurement data of the magnetic sensor accurate, and improving the accuracy of the measurement data.

[0091] In one embodiment, the determination module 101 determines the correspondence between the interference components, the working scenarios and the measurement data impact values ​​in the following manner: determining one or more interference components within the first area of ​​the magnetic sensor installation position; controlling the magnetic sensor to enter a working state, and independently entering a working state for each of the one or more interference components, and controlling the interference components entering the working state to be in different working scenarios; recording the measurement data impact values ​​of each interference component in different working scenarios that interfere with the magnetic sensor measurement data, and obtaining the correspondence between the interference components, the working scenarios and the measurement data impact values.

[0092] In one embodiment, there are multiple interfering components that interfere with the measurement data of the magnetic sensor, and the determination module 101 is also used to: before compensating the measurement data of the magnetic sensor based on the measurement data influence value, respectively determine multiple measurement data influence values ​​of the interference caused by the multiple interfering components on the measurement data of the magnetic sensor; and determine the measurement data influence value for compensating the measurement data of the magnetic sensor according to the magnitude of the multiple measurement data influence values.

[0093] In one embodiment, the determination module 101 determines the measurement data influence value for compensating the measurement data of the magnetic sensor according to the sizes of the multiple measurement data influence values ​​in the following manner: in the order of the multiple measurement data influence values ​​from large to small, one or more measurement data influence values ​​are selected from the multiple measurement data influence values ​​as the measurement data influence values ​​for compensating the measurement data of the magnetic sensor.

[0094] In one embodiment, the compensation module 102 compensates the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data in the following manner: reversely compensate the measurement data influence value of the measurement data of the magnetic sensor to obtain compensated measurement data.

[0095] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0096] Figure 8 8 is a block diagram of a device 800 for determining magnetic sensor measurement data according to an exemplary embodiment of the present disclosure. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0097] Reference Figure 8, the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0098] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0099] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0100] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0101] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0102] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0103] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0104] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0105] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0106] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0107] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0108] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0109] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0110] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0111] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0112] 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 variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include 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 following claims.

[0113] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for determining magnetic sensor measurement data, characterized in that: Applied to a terminal, the terminal is equipped with a magnetic sensor, and the method includes: In response to the magnetic sensor being in a working state, determining an interfering component that interferes with the measurement data of the magnetic sensor, and determining a working scenario of the interfering component, wherein the interfering component is a component installed in the terminal that interferes with the measurement data of the magnetic sensor; Determine, based on the correspondence between the interference components, the working scenario and the measurement data impact value, the measurement data impact value of the interference components measuring the data in the working scenario; There are multiple interfering components interfering with the measurement data of the magnetic sensor, and multiple measurement data influence value measurement data of the interference caused by the multiple interfering components on the measurement data of the magnetic sensor are respectively determined; Determining the measurement data influence value for compensating the measurement data of the magnetic sensor according to the magnitudes of the multiple measurement data influence values; The measurement data of the magnetic sensor is compensated based on the determined measurement data influence value for compensating the measurement data of the magnetic sensor to obtain compensated measurement data.

2. The method for determining magnetic sensor measurement data according to claim 1, characterized in that: The correspondence between the interference components, the working scenarios and the impact values ​​of the measured data is predetermined in the following manner: Determining one or more interfering components within a first area of ​​the magnetic sensor installation location; Controlling the magnetic sensor to enter a working state, and independently controlling each of the one or more interfering components to enter a working state, and controlling the interfering components that enter a working state to be in different working scenarios; The measured data impact value of each interfering component causing interference to the measured data of the magnetic sensor in different working scenarios is recorded to obtain a corresponding relationship between the interfering component, the working scenario and the measured data impact value.

3. The method for determining magnetic sensor measurement data according to claim 1, characterized in that: Determining, according to the magnitudes of the plurality of measurement data influence values, a measurement data influence value for compensating the measurement data of the magnetic sensor, comprises: In the descending order of the plurality of measurement data influence values, one or more measurement data influence values ​​are selected from the plurality of measurement data influence values ​​as measurement data influence values ​​for compensating the measurement data of the magnetic sensor.

4. The method for determining magnetic sensor measurement data according to claim 1, characterized in that: Compensating the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data includes: The measurement data of the magnetic sensor is reversely compensated for the measurement data influence value to obtain compensated measurement data.

5. A device for determining measurement data of a magnetic sensor, characterized in that: Applied to a terminal, the terminal is equipped with a magnetic sensor, and the device comprises: A determination module, configured to determine, in response to the magnetic sensor being in a working state, an interfering component interfering with the measurement data of the magnetic sensor, and determine a working scenario of the interfering component, wherein the interfering component is a component installed in the terminal that interferes with the measurement data of the magnetic sensor; and based on the corresponding relationship between the interfering component, the working scenario and the measurement data influence value, determine the measurement data influence value of the measurement data of the interfering component in the working scenario; if the number of interfering components interfering with the measurement data of the magnetic sensor is multiple, respectively determine the measurement data of the multiple measurement data influence values ​​of the multiple interfering components interfering with the measurement data of the magnetic sensor; The compensation module is used to determine the measurement data influence value for compensating the measurement data of the magnetic sensor according to the magnitude of the multiple measurement data influence values; and compensate the measurement data of the magnetic sensor based on the measurement data influence value to obtain compensated measurement data.

6. The device for determining magnetic sensor measurement data according to claim 5, characterized in that: The determination module determines the corresponding relationship between the interference components, the working scene and the impact value of the measurement data in the following manner: Determining one or more interfering components within a first area of ​​the magnetic sensor installation location; Controlling the magnetic sensor to enter a working state, and independently controlling each of the one or more interfering components to enter a working state, and controlling the interfering components that enter a working state to be in different working scenarios; The measured data impact value of each interfering component causing interference to the measured data of the magnetic sensor in different working scenarios is recorded to obtain a corresponding relationship between the interfering component, the working scenario and the measured data impact value.

7. The device for determining magnetic sensor measurement data according to claim 6, characterized in that: The determination module determines the measurement data influence value for compensating the measurement data of the magnetic sensor according to the magnitudes of the multiple measurement data influence values ​​in the following manner: In the descending order of the plurality of measurement data influence values, one or more measurement data influence values ​​are selected from the plurality of measurement data influence values ​​as measurement data influence values ​​for compensating the measurement data of the magnetic sensor.

8. The device for determining magnetic sensor measurement data according to claim 5, characterized in that: The compensation module compensates the measurement data of the magnetic sensor based on the measurement data influence value in the following manner to obtain compensated measurement data: The measurement data of the magnetic sensor is reversely compensated for the measurement data influence value to obtain compensated measurement data.

9. A device for determining measurement data of a magnetic sensor, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to: execute the method for determining magnetic sensor measurement data as described in any one of claims 1 to 4. 10 . A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute the method for determining magnetic sensor measurement data according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Compass positioning optimization method and system for mobile terminal

    CN104135576A

  • Method and device for eliminating interference on electronic compass

    CN105091872A

  • Interference compensation method and device of geomagnetic sensor

    CN105277995A

  • Magnetic intensity calibration method and device and terminal device

    CN106918790A

  • Terminal

    CN109737938A