Magnetism sensor calibration method, magnetism sensor calibration device and storage medium
By determining the correspondence between the movement distance and the magnetic compensation coefficient in the rollable screen terminal, and calculating the current magnetic compensation coefficient to compensate for the detection results of the magnetic sensor, the problem of inaccurate magnetic detection caused by the rollable screen's telescopic movement is solved, and the accuracy of the detection results is improved.
Patent Information
- Application Number
- CN202111011455.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2041-08-31
AI Technical Summary
During the use of the rollable screen terminal, the magnetic detection results are affected by the changes in the magnetic environment caused by the stretching and contracting motion, resulting in inaccurate detection results.
By determining the correspondence between the movement distance of the scroll screen and the magnetic compensation coefficient, the current magnetic compensation coefficient is calculated based on the current movement position, and the detection results of the magnetic sensor are compensated to obtain accurate magnetic detection results.
This reduces the adverse effects of changes in the magnetic environment caused by the expansion and contraction of the roll-up screen on the magnetic detection results, thereby improving the accuracy of the magnetic detection results.
Smart Images

Figure CN115728676B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of terminals, and particularly relates to a magnetism sensor calibration method, a magnetism sensor calibration device and a storage medium. BACKGROUND
[0002] With the continuous development of technology, mobile terminals are increasingly popular, developing towards intelligence, convenience and multi-functionality, and their forms are increasingly rich. On the basis of the increasingly perfect flexible screen technology, terminals in the form of application of scroll screens appear, realizing storage of larger display screens in limited storage space.
[0003] Terminals applying scroll screens hide the screen in the terminal, and when the scroll is closed, the appearance is similar to that of ordinary mobile devices. When used, the scroll is stretched, and the mobile terminal brings a motor or external force to completely unfold the curved screen from the body, avoiding the creases generated by folding screens, and realizing the display effect of screen multiplied in use relative to ordinary devices. In the process of stretching and retracting the scroll screen, interference will be generated to the magnetic environment of the terminal, affecting the magnetic detection result of the magnetic sensor. SUMMARY
[0004] To overcome the problems in the related art, the present disclosure provides a magnetism sensor calibration method, a magnetism sensor calibration device and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a magnetism sensor calibration method is provided, applied to a terminal, the terminal being provided with a magnetism sensor and a scroll screen, the method comprising: in response to the scroll screen occurring stretching and retracting motion in the process of the magnetism sensor performing magnetism detection, determining a current motion position of the scroll screen occurring stretching and retracting motion; determining a current magnetism compensation coefficient corresponding to the current motion position based on the corresponding relationship between the motion distance of the scroll screen and the magnetism compensation coefficient; the motion distance is the distance between the edges of the terminal at the current position of the scroll screen, relative to the distance between the edges when the scroll screen is in a completely closed state; based on the current magnetism compensation coefficient, compensating the magnetism detection result of the magnetism sensor to obtain a compensated magnetism detection result.
[0006] In some embodiments, the correspondence between the movement distance of the roller screen and the magnetic compensation coefficient is determined in the following manner: the roller screen is controlled to perform extension and contraction movement, and the magnetic detection result of the magnetic sensor is determined during the extension and contraction movement of the roller screen; in response to the difference between the magnetic detection result and the magnetic detection reference value exceeding the threshold range, a first movement distance of the extension and contraction movement of the roller screen is determined, and the magnetic detection result is compensated for magnetism to obtain a first magnetic compensation coefficient, the first magnetic compensation coefficient satisfies that the difference between the compensated magnetic detection result and the magnetic detection reference value is within the threshold range; the correspondence between the first movement distance and the first magnetic compensation coefficient is established; the above process is repeatedly performed until the extension and contraction movement of the roller screen in the maximum extension and contraction range is completed.
[0007] In some embodiments, based on the correspondence between the movement distance of the roller screen and the magnetic compensation coefficient, the current magnetic compensation coefficient corresponding to the current movement position is determined, comprising: determining a starting position of the extension and contraction movement of the roller screen, and determining a second movement distance range to which the starting position belongs, the second movement distance range and the magnetic compensation coefficient have a corresponding relationship; based on the second movement distance range and the current movement position, the current magnetic compensation coefficient corresponding to the current movement position is determined.
[0008] In some embodiments, based on the second movement distance range and the current movement position, the current magnetic compensation coefficient corresponding to the current movement position is determined, comprising: in response to the current movement position being within the second movement distance range, the magnetic compensation coefficient corresponding to the second movement distance range is determined as the current magnetic compensation coefficient corresponding to the current movement position; in response to the current movement position exceeding the second movement distance range, a third movement distance range to which the current movement position belongs is determined, and the magnetic compensation coefficient corresponding to the third movement distance range is determined as the current magnetic compensation coefficient corresponding to the current movement position, the third movement distance range and the magnetic compensation coefficient have a corresponding relationship, and is adjacent to the second movement distance range.
[0009] In some embodiments, the movement distance of the roller screen during the extension and contraction movement is determined based on the Hall sensor set by the terminal.
[0010] According to a second aspect of the embodiments of the present disclosure, a magnetism sensor calibration apparatus is provided, applied to a terminal, the terminal being provided with a magnetism sensor and a scroll screen, the magnetism sensor calibration apparatus comprising: a determination unit configured to determine a current motion position of the scroll screen in a telescopic motion, in response to the scroll screen in the telescopic motion during a magnetism detection process of the magnetism sensor, and determine a current magnetism compensation coefficient corresponding to the current motion position based on a corresponding relationship between a motion distance of the scroll screen and the magnetism compensation coefficient, the motion distance being a distance between edges of the terminal at the current position of the scroll screen, relative to a distance between the edges when the scroll screen is in a fully closed state; and a compensation unit configured to compensate a magnetism detection result of the magnetism sensor based on the current magnetism compensation coefficient, to obtain a compensated magnetism detection result.
[0011] In some embodiments, the corresponding relationship between the motion distance of the scroll screen and the magnetism compensation coefficient is determined in the following manner: controlling the scroll screen to be in the telescopic motion, and determining a magnetism detection result of the magnetism sensor during the telescopic motion of the scroll screen; in response to a difference between the magnetism detection result and a magnetism detection reference value being out of a threshold range, determining a first motion distance of the scroll screen in the telescopic motion, and compensating the magnetism detection result to obtain a first magnetism compensation coefficient, the first magnetism compensation coefficient satisfying a condition that a difference between the compensated magnetism detection result and the magnetism detection reference value is within the threshold range; establishing a corresponding relationship between the first motion distance and the first magnetism compensation coefficient; and repeating the above process until the scroll screen completes the telescopic motion in a maximum telescopic range.
[0012] In some embodiments, the determination unit determines the current magnetism compensation coefficient corresponding to the current motion position based on the corresponding relationship between the motion distance of the scroll screen and the magnetism compensation coefficient in the following manner: determining a starting position of the scroll screen in the telescopic motion, and determining a second motion distance to which the starting position belongs, the second motion distance being a motion distance having a corresponding relationship with the magnetism compensation coefficient; and determining the current magnetism compensation coefficient corresponding to the current motion position based on the second motion distance and the current motion position.
[0013] In some embodiments, the determining unit determines the current magnetism compensation coefficient corresponding to the current motion position in the following manner based on the second motion distance range and the current motion position: in response to the current motion position being located in the second motion distance range, determining the magnetism compensation coefficient corresponding to the second motion distance range as the current magnetism compensation coefficient corresponding to the current motion position; in response to the current motion position being located out of the second motion distance range, determining a third motion distance range to which the current motion position belongs, and determining the magnetism compensation coefficient corresponding to the third motion distance range as the current magnetism compensation coefficient corresponding to the current motion position, the third motion distance range and the magnetism compensation coefficient have a corresponding relationship and are adjacent to the second motion distance range.
[0014] In some embodiments, the determining unit determines the motion distance of the scroll screen in the following manner: determining the motion distance of the scroll screen based on the Hall sensor set by the terminal.
[0015] According to a further aspect of the embodiments of the present disclosure, a magnetism sensor calibration apparatus is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute any one of the aforementioned magnetism sensor calibration methods.
[0016] According to a further aspect of the embodiments of the present disclosure, a non-transitory computer readable storage medium is provided, when the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute any one of the aforementioned magnetism sensor calibration methods.
[0017] The technical solutions provided by the embodiments of the present disclosure can have the following beneficial effects: for a terminal provided with a scroll screen, when the scroll screen is in a telescopic motion, a current magnetism compensation coefficient corresponding to a current motion position is determined, and based on the current magnetism compensation coefficient, a magnetism detection result of a magnetism sensor is compensated to obtain an accurate magnetism detection result after compensation, thereby reducing the adverse effects of changes in a magnetism environment caused by the telescopic change of the scroll screen on the magnetism detection result, and improving the accuracy of the magnetism detection result.
[0018] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.
[0020] Figure 1is a schematic diagram of a movement distance generated when a scroll screen of a terminal according to an exemplary embodiment of the present disclosure is extended and retracted.
[0021] Figure 2 is a schematic diagram of a change in the earth's magnetic field vector when a magnetism sensor changes in a magnetism environment according to an exemplary embodiment of the present disclosure.
[0022] Figure 3 is a flowchart of a magnetism sensor calibration method according to an exemplary embodiment of the present disclosure.
[0023] Figure 4 is a flowchart of a method of determining a correspondence between a movement distance of a scroll screen and a magnetism compensation coefficient according to an exemplary embodiment of the present disclosure.
[0024] Figure 5 is a flowchart of a method of determining a current magnetism compensation coefficient corresponding to a current movement position based on a correspondence between a movement distance of a scroll screen and a magnetism compensation coefficient according to an exemplary embodiment of the present disclosure.
[0025] Figure 6 is a flowchart of a method of determining a current magnetism compensation coefficient corresponding to a current movement position based on a second movement distance range and the current movement position according to an exemplary embodiment of the present disclosure.
[0026] Figure 7 is a schematic diagram of a terminal structure to which a magnetism sensor calibration method according to the present disclosure is applied.
[0027] Figure 8 is a flowchart of a magnetism sensor calibration method according to another exemplary embodiment of the present disclosure.
[0028] Figure 9 is a block diagram of a magnetism sensor calibration apparatus according to an exemplary embodiment of the present disclosure.
[0029] Figure 10 is a block diagram of an apparatus for magnetism sensor calibration according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] The exemplary embodiments will now be described in detail with reference to the accompanying drawings. The following description, with reference to the drawings, is made in connection with the exemplary embodiments. The same reference numerals are used in different drawings to refer to the same or like elements. The following exemplary embodiments described in the detailed description are not meant to be limiting in any way. Rather, they are provided to illustrate some of the many possible embodiments consistent with the present disclosure.
[0031] With the continuous development of technology, on the basis of the increasingly perfect flexible screen technology, there appear terminals in the form of folding screen and scroll screen. The back of the screen of the scroll screen is of metal material. In the process of stretching and contracting, the distribution state of the metal material changes, and the relative position of the metal material and the magnetism sensor is also different, that is, the influence of the magnetic environment formed by the distribution of the metal material on the magnetism sensor is also changing.
[0032] Figure 1 is a schematic diagram of the motion distance generated when the scroll screen of the terminal according to an example embodiment of the present disclosure is stretched and contracted. Referring to Figure 1 , when the scroll screen is unfolded, the edge of the terminal is from Figure 1 the position where the scroll screen is completely closed at this time, and the corresponding motion distance of the scroll screen is 0. In the process of unfolding the scroll screen, stretching occurs to the right side, and the motion distance of the scroll screen at the i-th position is d i . As the scroll screen continues to unfold, the unfolding distance d i increases, and when the scroll screen is in a completely unfolded state, the corresponding motion distance is D. It can be understood that in the process of folding the scroll screen, the trend of change of the motion distance of the scroll screen is opposite to that in the above-mentioned unfolding process.
[0033] Figure 2 is a schematic diagram of the change of the earth magnetic field vector when the magnetism sensor changes in the magnetic environment, the earth magnetic field in the northern hemisphere is incident from south to north at a certain angle with a fixed vector, and the metal material on the back of the screen of the terminal scroll screen interferes with the earth magnetic field, referring to Figure 2 , when the earth magnetic field has no soft magnetic influence, its earth magnetic field vector in the three-dimensional coordinate system is represented as OT in the rectangular coordinate system O-XYZ. After the stretching and contracting of the scroll screen, that is, after the change of the magnetic environment, the earth magnetic field vector considering the soft magnetic influence is represented as OT' in the rectangular coordinate system O-X'Y'Z'. The process of compensating the magnetism detection result of the current magnetism sensor, that is, the process of compensating the earth magnetic field vector OT' in the rectangular coordinate system O-X'Y'Z' after interference to the vector OT in the rectangular coordinate system O-XYZ.
[0034] In the related art, the same magnetism compensation coefficient is used for the same magnetism sensor of the terminal to compensate the induced magnetism detection result. However, for the terminal applying the scroll screen, the distortion of the earth magnetic field at different stretching and contracting positions is changing with time, and in this process, the compensation coefficient of the magnetism detection result of the magnetism sensor also needs to be adjusted.
[0035] Therefore, the present disclosure provides a magnetism sensor calibration method, for a terminal provided with a scroll screen, the current magnetism compensation coefficient can be determined based on the current motion position of the scroll screen in the expansion and contraction motion, the magnetism detection result of the magnetism sensor is compensated, and accurate magnetism detection result is obtained.
[0036] Figure 3 is a flow chart of a magnetism sensor calibration method according to an exemplary embodiment of the present disclosure, the magnetism sensor calibration method is applied to a terminal, the terminal is provided with a magnetism sensor and a scroll screen, referring to Figure 3 , the magnetism sensor calibration method comprises the following steps.
[0037] In step S101, in response to the expansion and contraction motion of the scroll screen during the magnetism detection process of the magnetism sensor, the current motion position of the expansion and contraction motion of the scroll screen is determined.
[0038] In step S102, based on the corresponding relationship between the motion distance of the scroll screen and the magnetism compensation coefficient, the current magnetism compensation coefficient corresponding to the current motion position is determined.
[0039] In step S103, based on the current magnetism compensation coefficient, the magnetism detection result of the magnetism sensor is compensated, and the compensated magnetism detection result is obtained.
[0040] The magnetism sensor in the embodiment of the present disclosure can be a compass, in the embodiment of the present disclosure, the terminal provided with the scroll screen, the scroll screen can be in expansion and contraction motion, the scroll screen can be from the completely closed state to the state of completely unfolding, the screen can stop at any position in the above process, and can return to the folded state from the unfolded state. The motion distance of the scroll screen is the edge of the terminal at the current motion position of the scroll screen, relative to the distance between the edges of the terminal when the scroll screen is in the completely closed state, it can be understood that the motion distance gradually increases when the scroll screen is stretched from the completely closed state to the completely unfolded state. The motion distance gradually decreases when the scroll screen is retracted from the completely unfolded state.
[0041] The movement distance of the scroll screen corresponds to the magnetic compensation coefficient. Different movement distances correspond to different magnetic compensation coefficients. The magnetic sensor performs magnetic detection. The current movement position of the scroll screen is determined. Based on the correspondence between the movement distance of the scroll screen and the magnetic compensation coefficient, the current magnetic compensation coefficient corresponding to the current movement position is determined. The magnetic detection result of the magnetic sensor is compensated based on the current magnetic compensation coefficient, and the compensated magnetic detection result is obtained. For example, the scroll screen is stretched and contracted, and the current position is 2 cm away from the position of the fully closed scroll screen, that is, the current movement distance of the scroll screen is 2 cm. The movement distance of 2 cm corresponds to a magnetic compensation coefficient. The magnetic compensation coefficient corresponding to 2 cm is determined as the current magnetic compensation coefficient corresponding to the current movement position. The magnetic detection result of the magnetic sensor is compensated based on the current magnetic compensation coefficient, and the compensated magnetic detection result is obtained.
[0042] According to the embodiments of the present disclosure, for a terminal provided with a scroll screen, when the scroll screen is stretched and contracted, the current magnetic compensation coefficient corresponding to the current movement position is determined, the magnetic detection result of the magnetic sensor is compensated based on the current magnetic compensation coefficient, and the accurate magnetic detection result after compensation is obtained, thereby reducing the adverse effects of the change of the magnetic environment caused by the stretching and contraction of the scroll screen on the magnetic detection result and improving the accuracy of the magnetic detection result.
[0043] In the embodiments of the present disclosure, the magnetic detection result of the magnetic sensor is compensated based on the current magnetic compensation coefficient, and the compensated magnetic detection result is obtained. The magnetic compensation coefficient can be a compensation matrix, which can be the product of the magnetic compensation matrix and the magnetic detection result of the magnetic sensor, and is determined as the calibrated magnetic detection result. Wherein, corresponding to the process of unfolding the scroll screen, the movement distance of the scroll screen at the i-th position is di, and the magnetic compensation coefficient corresponding to the i-th position is Ci. i The magnetic compensation matrix corresponding to the i-th position can be represented as follows:
[0044]
[0045] Wherein, X xxi , X xyi and X xyi respectively represent that due to the change of the magnetic environment, the earth magnetic field vector changes from OT to OT i , OT i is located in the rectangular coordinate system O-X i Y i Z i , for the vector T i , compensation is performed based on x i , Y i , Z i .
[0046] Figure 4 is a flow chart of a method for determining the correspondence between the motion distance of a roller screen and the magnetic compensation coefficient according to an example embodiment of the present disclosure, with reference to Figure 4 The method comprises the following steps.
[0047] In step S201, the roller screen is controlled to perform the stretching and contracting motion, and the magnetic detection result of the magnetic sensor is determined during the stretching and contracting motion of the roller screen.
[0048] In step S202, in response to the difference between the magnetic detection result and the magnetic detection reference value exceeding the threshold range, the first motion distance of the stretching and contracting motion of the roller screen is determined, and the magnetic detection result is compensated to obtain the first magnetic compensation coefficient.
[0049] In step S203, the correspondence between the first motion distance and the first magnetic compensation coefficient is established.
[0050] In step S204, the above process is repeatedly performed until the stretching and contracting motion of the roller screen within the maximum stretching and contracting range is completed.
[0051] In the embodiments of the present disclosure, the correspondence between the movement distance of the scroll screen and the magnetic compensation coefficient can be determined in advance, the scroll screen is controlled to perform the expansion and contraction movement, and the magnetic detection result of the magnetic sensor is determined in the process of the expansion and contraction movement of the scroll screen. The magnetic detection result of the magnetic sensor can be determined in a test manner by using other measuring instruments to determine the magnetic detection reference value of the current movement position. It can be understood that the magnetic detection reference value of the current movement position is regarded as the error-free magnetic detection value, and the accuracy of the magnetic detection result of the magnetic sensor can be evaluated by the magnetic detection reference value. According to the use requirements, the threshold range of the deviation of the detection result can be set in advance, the magnetic detection result of the magnetic sensor is compared with the magnetic detection reference value, and if the difference between the magnetic detection result and the magnetic detection reference value exceeds the threshold range, the magnetic detection result of the magnetic sensor exceeds the threshold range of the magnetic detection reference value due to the magnetic field interference, and the magnetic compensation coefficient of the current position needs to be determined. The first movement distance of the current expansion and contraction movement of the scroll screen is determined, the magnetic detection result is compensated, and the first magnetic compensation coefficient is obtained. The difference between the compensated magnetic detection result and the magnetic detection reference value is within the threshold range. The correspondence between the first movement distance and the first magnetic compensation coefficient is established, and the above process is repeatedly performed, that is, the scroll screen is controlled to perform the expansion and contraction movement with different movement distances, and the correspondence between the movement distance of the scroll screen and the magnetic compensation coefficient is recorded until the scroll screen completes the expansion and contraction movement in the maximum expansion and contraction range. For example, the scroll screen is controlled to perform the expansion and contraction movement, and the magnetic detection result of the magnetic sensor is determined in real time in the process of the expansion and contraction movement of the scroll screen. If in the movement process, the magnetic detection result of the magnetic sensor is, for example, the magnetic declination is 30 degrees, the magnetic detection reference value is the magnetic declination 27 degrees, the difference between the magnetic detection result and the magnetic detection reference value is 3 degrees, and the threshold range is 27 degrees ± 2 degrees, that is, the difference between the magnetic detection result and the magnetic detection reference value exceeds the threshold range, the magnetic detection result of the magnetic sensor is compensated, the first magnetic compensation coefficient is obtained, and the first movement distance (2 cm) corresponding to the first magnetic compensation coefficient is recorded. The difference between the compensated magnetic detection result and the magnetic detection reference value is within the threshold range. By the above method, the correspondence between the different movement distances and the magnetic compensation coefficients of the scroll screen from the fully closed state to the maximum expansion state of the screen can be obtained.
[0052] In an embodiment of the present disclosure, the corresponding relationship between the motion distance range and the magnetic compensation coefficient can be determined based on a corresponding relationship between the first motion distance and the first magnetic compensation coefficient, i.e., motion distances corresponding to the same magnetic compensation coefficient are determined as a motion distance range, and distance values included in the motion distance range correspond to the same magnetic compensation coefficient, so as to establish the corresponding relationship between the motion distance range and the magnetic compensation coefficient.
[0053] Figure 5 FIG. 3 is a flowchart illustrating a method for determining a current magnetic compensation coefficient corresponding to a current motion position based on a corresponding relationship between a motion distance and a magnetic compensation coefficient of a scroll screen according to an exemplary embodiment of the present disclosure. Figure 5 The method includes the following steps.
[0054] In step S301, a starting position of a telescopic motion of the scroll screen is determined, and a second motion distance range to which the starting position belongs is determined, the second motion distance range and the magnetic compensation coefficient have a corresponding relationship.
[0055] In step S302, the current magnetic compensation coefficient corresponding to the current motion position is determined based on the second motion distance range and the current motion position.
[0056] In an embodiment of the present disclosure, when the current magnetic compensation coefficient corresponding to the current motion position is determined based on the corresponding relationship between the motion distance and the magnetic compensation coefficient of the scroll screen, the starting position of the current telescopic motion of the scroll screen is determined, and the second motion distance range to which the starting position belongs is determined, the second motion distance range and the magnetic compensation coefficient have a corresponding relationship, i.e., distance values included in the second motion distance range correspond to the same magnetic compensation coefficient.
[0057] In an embodiment of the present disclosure, the current magnetic compensation coefficient corresponding to the current motion position is determined based on the second motion distance range and the current motion position. For example, the starting position of the telescopic motion of the scroll screen is a position 3 cm away from the fully closed state of the scroll screen, the second motion distance range is 3 cm-6 cm, and the edge of the terminal at the current motion position of the scroll screen is within a range of 3 cm-6 cm away from the fully closed state of the scroll screen, corresponding to the same magnetic compensation coefficient. Then, the current magnetic compensation coefficient corresponding to the current motion position can be determined based on the current motion position and the second motion distance range.
[0058] According to the embodiment of the present disclosure, when the reel screen is in the telescopic motion, the corresponding current magnetism compensation coefficient of the current motion position is determined based on the corresponding relationship between the motion distance of the reel screen and the magnetism compensation coefficient, and the magnetism detection result of the magnetism sensor is compensated based on the current magnetism compensation coefficient to obtain an accurate magnetism detection result after compensation, thereby reducing the adverse effect of the change of the magnetism environment caused by the telescopic change of the reel screen on the magnetism detection result and improving the accuracy of the magnetism detection result.
[0059] Figure 6 is a flow chart of a method for determining a current magnetism compensation coefficient corresponding to a current motion position based on a second motion distance range and the current motion position according to an exemplary embodiment of the present disclosure, with reference to Figure 6 The method comprises the following steps.
[0060] In step S401, in response to the current motion position being located in the second motion distance range, the magnetism compensation coefficient corresponding to the second motion distance range is determined as the current magnetism compensation coefficient corresponding to the current motion position.
[0061] In step S402, in response to the current motion position being out of the second motion distance range, the third motion distance range to which the current motion position belongs is determined, the magnetism compensation coefficient corresponding to the third motion distance range is determined as the current magnetism compensation coefficient corresponding to the current motion position, the third motion distance range has a corresponding relationship with the magnetism compensation coefficient and is adjacent to the second motion distance range.
[0062] In the embodiment of the present disclosure, when the current magnetism compensation coefficient corresponding to the current motion position of the reel screen is determined, the starting position of the current telescopic motion of the reel screen is determined, and the second motion distance range to which the starting position belongs is determined, the distance values in the second motion distance range correspond to the same magnetism compensation coefficient. The current magnetism compensation coefficient corresponding to the current motion position is determined based on the second motion distance range and the current motion position. If the current motion position is located in the second motion distance range, the magnetism compensation coefficient corresponding to the second motion distance range is determined as the current magnetism compensation coefficient corresponding to the current motion position. If the current motion position is out of the second motion distance range, the third motion distance range to which the current motion position belongs is determined, the magnetism compensation coefficient corresponding to the third motion distance range is determined as the current magnetism compensation coefficient corresponding to the current motion position, the distance values included in the third motion distance range correspond to the same magnetism compensation coefficient, and the third motion distance range is adjacent to the second motion distance range.
[0063] For example, the second motion distance range is 3cm-6cm, and the third motion distance range is 6cm-8cm, that is, the motion distance of the scroll screen is in the range of 3cm-6cm, and the same magnetic compensation coefficient is corresponded. When the motion distance of the scroll screen is in the range of 6cm-8cm, the same magnetic compensation coefficient is corresponded, and the magnetic compensation coefficients corresponded by the second motion distance range and the third motion distance range are different. The starting position of the terminal scroll screen in the extension and contraction motion is the position of 3cm relative to the scroll screen in the completely closed state, the motion distance corresponding to the current motion position is 5cm, which is in the second motion distance range (3cm-6cm), and the magnetic compensation coefficient corresponded by the second motion distance range is determined as the current magnetic compensation coefficient corresponded by the current motion position. The motion distance corresponding to the current motion position is 7cm, which is out of the second motion distance range (3cm-6cm), and the third motion distance range (6cm-8cm) to which the position of the motion distance of 7cm belongs is determined, and the magnetic compensation coefficient corresponded by the third motion distance range (6cm-8cm) is determined as the current magnetic compensation coefficient corresponded by the current motion position.
[0064] According to the embodiments of the present disclosure, when the scroll screen is in the extension and contraction motion, the current magnetic compensation coefficient corresponded by the current motion position is determined based on the corresponding relationship between the motion distance of the scroll screen and the magnetic compensation coefficient, the magnetic detection result of the magnetic sensor is compensated based on the current magnetic compensation coefficient, the accurate magnetic detection result after compensation is obtained, the adverse influence of the change of the magnetic environment caused by the extension and contraction of the scroll screen on the magnetic detection result is reduced, and the accuracy of the magnetic detection result is improved.
[0065] Figure 7 A structure composition schematic diagram of a terminal applying the magnetic sensor calibration method in the present disclosure is shown, and the structure composition schematic diagram is shown in FIG. 1. Figure 7 The magnetic sensor is taken as a compass sensor as an example for description. The composition structure includes an application processor, a compass sensor, a micro processing unit, a motor, and a Hall sensor. When the method in the embodiments of the present disclosure is applied, the compass sensor detects the current magnetic declination angle of the terminal, the motor drives the scroll screen to perform the extension and contraction motion under the control of the micro processing unit, the micro processing unit detects the motion distance of the scroll screen in real time based on the Hall sensor, and sends the motion distance of the scroll screen to the application processor. The application processor determines the magnetic compensation coefficient corresponded by the current motion distance based on the corresponding relationship between the motion distance of the scroll screen and the magnetic compensation coefficient, compensates the magnetic detection result of the terminal current magnetic declination angle detected by the compass sensor, and obtains the magnetic declination angle after compensation.
[0066] Figure 8 A flow chart of a magnetic sensor calibration method according to another exemplary embodiment of the present disclosure is shown, and the flow chart is shown in FIG. 2. Figure 8 The magnetic sensor calibration method includes the following steps.
[0067] In step S501, in response to the retraction and expansion movement of the scroll screen during the magnetism detection process of the magnetism sensor, the movement distance of the scroll screen during the retraction and expansion movement is determined based on the Hall sensor set in the terminal.
[0068] In step S502, the current magnetism compensation coefficient corresponding to the current movement position is determined based on the corresponding relationship between the movement distance of the scroll screen and the magnetism compensation coefficient.
[0069] In step S503, the magnetism detection result of the magnetism sensor is compensated based on the current magnetism compensation coefficient to obtain the compensated magnetism detection result.
[0070] In the embodiment of the present disclosure, during the use of the terminal, the magnetism sensor performs magnetism detection, the terminal provided with the scroll screen is retracted and expanded, and the current movement position of the scroll screen during the retraction and expansion movement is determined. The movement distance of the scroll screen is the distance between the edges of the terminal at the current movement position of the scroll screen, relative to the distance between the edges of the terminal when the scroll screen is in a fully closed state. The Hall sensor configured in the terminal can be used to monitor the movement distance of the scroll screen during the retraction and expansion movement in real time. The Hall sensor can be one or multiple. Based on the corresponding relationship between the movement distance of the scroll screen and the magnetism compensation coefficient, the current magnetism compensation coefficient corresponding to the current movement position is determined, and the magnetism detection result of the magnetism sensor is compensated based on the current magnetism compensation coefficient to obtain the compensated magnetism detection result.
[0071] According to the embodiment of the present disclosure, for the terminal provided with the scroll screen, when the scroll screen is retracted and expanded, the current magnetism compensation coefficient corresponding to the current movement position is determined, the magnetism detection result of the magnetism sensor is compensated based on the current magnetism compensation coefficient, and the accurate magnetism detection result after compensation is obtained, thereby reducing the adverse effects of the change of the magnetism environment caused by the retraction and expansion of the scroll screen on the magnetism detection result and improving the accuracy of the magnetism detection result.
[0072] In an embodiment of the present disclosure, the change of the environment where the terminal is located and the influence of the external environment can cause the influence of the change of the hard magnet environment on the earth magnetic field. When the terminal detects the change of the hard magnet environment, the terminal can prompt the user to perform the recalibration of the magnetic field, for example, prompting the user to perform the movement of the terminal in the “8” shape track. During the movement in the “8” shape, the terminal collects the maximum value and the minimum value of the magnetic field vector components corresponding to the X, Y and Z directions in the three-dimensional coordinate system, and performs the hard magnet compensation based on the following formula to eliminate the influence of the change of the magnetism environment caused by the change of the hard magnet environment on the magnetism detection result.
[0073]
[0074] In the formula, XMIN X MAX Y MIN Y MAX Z MIN Z MAX respectively correspond to minimum and maximum values of magnetic field vector components of the magnetic field vector in the X, Y, and Z directions.
[0075] According to the embodiments of the present disclosure, when the scroll screen of the terminal is in a telescopic motion, a current magnetic compensation coefficient corresponding to a current motion position is determined, and a magnetic detection result of the magnetic sensor is compensated based on the current magnetic compensation coefficient to obtain an accurate magnetic detection result after compensation, thereby reducing the adverse effects of changes in the magnetic environment caused by the telescopic change of the scroll screen on the magnetic detection result and improving the accuracy of the magnetic detection result.
[0076] Based on the same concept, the embodiments of the present disclosure also provide a magnetic sensor calibration device.
[0077] It can be understood that the device provided by the embodiments of the present disclosure comprises a hardware structure and / or a software module corresponding to the execution of each function in order to achieve the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiments of the present disclosure, the embodiments of the present disclosure can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is driven by hardware or computer software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present disclosure.
[0078] Figure 9 is a block diagram of a magnetic sensor calibration device according to an exemplary embodiment of the present disclosure. Referring to Figure 9 , the magnetic sensor calibration device 100 is applied to a terminal, the terminal is provided with a magnetic sensor and a scroll screen, and the magnetic sensor calibration device 100 comprises a determination unit 101 and a compensation unit 102.
[0079] The determination unit 101 is configured to, in response to a telescopic motion of the scroll screen during a magnetic detection process of the magnetic sensor, determine a current motion position of the telescopic motion of the scroll screen, and determine a current magnetic compensation coefficient corresponding to the current motion position based on a corresponding relationship between a motion distance of the scroll screen and the magnetic compensation coefficient.
[0080] The motion distance is an edge of the terminal at the current position of the scroll screen, relative to the distance between the edges when the scroll screen is in a fully closed state.
[0081] The compensation unit 102 is configured to compensate a magnetic detection result of the magnetic sensor based on the current magnetic compensation coefficient to obtain a compensated magnetic detection result.
[0082] In some embodiments, the correspondence between the motion distance of the scroll screen and the magnetic compensation coefficient is determined in the following manner: the scroll screen is controlled to perform the telescopic motion, and the magnetic detection result of the magnetic sensor is determined during the telescopic motion of the scroll screen; in response to the difference between the magnetic detection result and the magnetic detection reference value exceeding the threshold range, a first motion distance of the telescopic motion of the scroll screen is determined, and the magnetic detection result is compensated magnetically to obtain a first magnetic compensation coefficient, the first magnetic compensation coefficient satisfies that the difference between the compensated magnetic detection result and the magnetic detection reference value is within the threshold range; a correspondence between the first motion distance and the first magnetic compensation coefficient is established; the above process is repeatedly performed until the scroll screen completes the telescopic motion within the maximum telescopic range.
[0083] In some embodiments, the determination unit 101 determines the current magnetic compensation coefficient corresponding to the current motion position based on the correspondence between the motion distance of the scroll screen and the magnetic compensation coefficient in the following manner: a starting position of the telescopic motion of the scroll screen is determined, and a second motion distance to which the starting position belongs is determined, the second motion distance is a motion distance having a correspondence with the magnetic compensation coefficient; based on the second motion distance and the current motion position, the current magnetic compensation coefficient corresponding to the current motion position is determined.
[0084] In some embodiments, the determination unit 101 determines the current magnetic compensation coefficient corresponding to the current motion position based on the second motion distance and the current motion position in the following manner: in response to the current motion position being within the second motion distance, the magnetic compensation coefficient corresponding to the second motion distance is determined as the current magnetic compensation coefficient corresponding to the current motion position; in response to the current motion position exceeding the second motion distance, a third motion distance to which the current motion position belongs is determined, and the magnetic compensation coefficient corresponding to the third motion distance is determined as the current magnetic compensation coefficient corresponding to the current motion position, the third motion distance is a motion distance having a correspondence with the magnetic compensation coefficient and adjacent to the second motion distance.
[0085] In some embodiments, the determination unit 101 determines the motion distance of the telescopic motion of the scroll screen in the following manner: the motion distance of the telescopic motion of the scroll screen is determined based on the Hall sensor set by the terminal.
[0086] As to the apparatus in the above embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and will not be described in detail here.
[0087] Figure 10is a block diagram of an apparatus for magnetism sensor calibration according to an example embodiment of the present disclosure. For example, the apparatus 200 can be a mobile phone, a computer, a digital broadcasting terminal, a message receiver, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, or the like.
[0088] Referring to Figure 10 The apparatus 200 can include one or more of the following components: a processing component 202, a memory 204, a power supply component 206, a multimedia component 208, an audio component 210, an input / output (I / O) interface 212, a sensor component 214, and a communication component 216.
[0089] The processing component 202 typically controls overall operations of the apparatus 200, such as operations associated with displaying, making phone calls, data communications, camera operations, and recording operations. The processing component 202 can include one or more processors 220 to execute instructions stored in the memory 204 to complete all or a part of steps of the methods described above. In addition, the processing component 202 can include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 can include a multimedia module to facilitate the interaction between the multimedia component 208 and the processing component 202.
[0090] The memory 204 is configured to store various types of data to support operations of the apparatus 200. Examples of these data include instructions for any applications or methods operating on the apparatus 200, contact data, phonebook data, messages, pictures, videos, and so on. The memory 204 can be implemented by any type of volatile or non-volatile storage devices 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 storage, flash memory, magnetic disk or optical disk.
[0091] The power supply component 206 supplies electrical power for the various components of the apparatus 200. The power supply component 206 can include a power supply management system, one or more power sources, and other components associated with generating, managing and distributing power for the apparatus 200.
[0092] The multimedia component 208 includes a screen providing an output interface between the device 200 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swiping, and gestures on the touch panel. The touch sensors can not only sense a boundary of a touching or swiping action, but also detect duration and pressure related to the touching or swiping action. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front and rear camera can be a fixed optical lens system or have a focal length and optical zooming capability.
[0093] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC) to receive an external audio signal when the device 200 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 204 or transmitted via the communication component 216. In some embodiments, the audio component 210 also includes a speaker to output audio signals.
[0094] The I / O interface 212 provides an interface between the processing component 202 and peripheral interface modules, such as a keypad, a click wheel, buttons, and so on. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0095] The sensor component 214 includes one or more sensors to provide various state assessments for the device 200. For example, the sensor component 214 can detect an open / closed position of the device 200, relative positioning of components, such as a display and a keypad of the device 200, a change in position of the device 200 or a component of the device 200, presence or absence of user contact with the device 200, a change in orientation of the device 200 or acceleration / deceleration of the device 200, and temperature changes of the device 200. The sensor component 214 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 214 can also include a light sensor, such as a CMOS or CCD image sensor, for use in an imaging application. In some embodiments, the sensor component 214 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0096] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 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 216 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 216 further 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.
[0097] In an exemplary embodiment, the device 200 can 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, micro-controllers, microprocessors or other electronic elements, for performing the above-described methods.
[0098] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 204 including instructions, is also provided, which can be executed by the processor 220 of the device 200 to complete the above-described methods. 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 disc, and an optical data storage device, etc.
[0099] It can be understood that "multiple" in the present disclosure refers to two or more, and other quantifiers are similar. The association relationship of "and / or" describing the associated objects means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship. The singular form "a", "said" and "the" are also intended to include the plural form, unless the context clearly indicates otherwise.
[0100] It can be further understood that the terms "first", "second", and the like are used to describe various information, but the 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 particular order or importance. In fact, the expressions "first", "second", and the like can be used interchangeably. For example, 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 without departing from the scope of the present disclosure.
[0101] It will be further understood that "connected" can include direct connection between two members or indirect connection between two members through other members.
[0102] It will be further understood that, unless otherwise specified, "connected" includes direct connection or indirect connection through others.
[0103] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the present disclosure cover any and all variations of the present disclosure including those variations that can be incorporated into other forms, methods and implementations of the present disclosure. It is intended that the scope of the present disclosure be defined by the following claims and their equivalents.
[0104] It is to be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings and that various modifications and changes can be made therein without departing from the scope thereof. The scope of the present disclosure is to be defined by the claims appended hereto.
Claims
1. A method for calibrating a magnetic sensor, characterized in that, Applied to a terminal equipped with a magnetic sensor and a scrollable screen, the method includes: In response to the telescopic movement of the roll screen during magnetic detection by the magnetic sensor, the current position of the roll screen during the telescopic movement is determined; Based on the movement distance and the correspondence between the movement distance of the rollable screen and the magnetic compensation coefficient, the current magnetic compensation coefficient corresponding to the current movement position is determined, wherein the movement distance is determined based on the current movement position of the rollable screen during the telescopic movement. Based on the current magnetic compensation coefficient, the magnetic detection result of the magnetic sensor is compensated to obtain the compensated magnetic detection result; The magnetic compensation coefficient is determined in the following manner: During the retractable movement of the scroll screen, the magnetic detection results of the magnetic sensor are determined; In response to the magnetic detection result, magnetic compensation is performed on the magnetic detection result to obtain the magnetic compensation coefficient.
2. The magnetic sensor calibration method according to claim 1, characterized in that, The relationship between the movement distance of the roll-up screen and the magnetic compensation coefficient is determined in the following way: Control the retractable movement of the scroll screen, and determine the magnetic detection result of the magnetic sensor during the retractable movement of the scroll screen; In response to the difference between the magnetic detection result and the magnetic detection reference value exceeding a threshold range, a first movement distance of the retractable screen is determined, and magnetic compensation is performed on the magnetic detection result to obtain a first magnetic compensation coefficient. The first magnetic compensation coefficient satisfies the condition that the difference between the compensated magnetic detection result and the magnetic detection reference value is within the threshold range. Establish the correspondence between the first movement distance and the first magnetic compensation coefficient; Repeat the above process until the scroll screen completes its telescopic movement within its maximum telescopic range.
3. The magnetic sensor calibration method according to claim 1 or 2, characterized in that, Based on the correspondence between the movement distance of the scroll screen and the magnetic compensation coefficient, the current magnetic compensation coefficient corresponding to the current movement position is determined, including: The starting position of the retractable movement of the scroll screen is determined, and the second movement distance range to which the starting position belongs is determined. The second movement distance range has a corresponding relationship with the magnetic compensation coefficient. Based on the second movement distance range and the current movement position, the current magnetic compensation coefficient corresponding to the current movement position is determined.
4. The magnetic sensor calibration method according to claim 3, characterized in that, Based on the second movement distance range and the current movement position, determine the current magnetic compensation coefficient corresponding to the current movement position, including: In response to the current movement position being within the second movement distance range, the magnetic compensation coefficient corresponding to the second movement distance range is determined as the current magnetic compensation coefficient corresponding to the current movement position; In response to the current movement position exceeding the second movement distance range, a third movement distance range to which the current movement position belongs is determined, and the magnetic compensation coefficient corresponding to the third movement distance range is determined as the current magnetic compensation coefficient corresponding to the current movement position. There is a correspondence between the third movement distance range and the magnetic compensation coefficient, and it is adjacent to the second movement distance range.
5. The magnetic sensor calibration method according to claim 1, characterized in that, Determining the movement distance of the scroll screen during its telescopic movement includes: Based on the Hall sensor installed in the terminal, the movement distance of the scroll screen during its retraction or extension is determined.
6. A magnetic sensor calibration device, characterized in that, Applied to a terminal, the terminal is equipped with a magnetic sensor and a scroll screen, and the magnetic sensor calibration device includes: A determining unit is configured to, in response to the telescopic movement of the roll screen during magnetic detection by the magnetic sensor, determine the current position of the telescopic movement of the roll screen, and determine the current magnetic compensation coefficient corresponding to the current position based on the movement distance and the correspondence between the movement distance of the roll screen and the magnetic compensation coefficient, wherein the movement distance is determined based on the current position of the roll screen during the telescopic movement. The compensation unit is used to compensate the magnetic detection result of the magnetic sensor based on the current magnetic compensation coefficient to obtain the compensated magnetic detection result. The magnetic compensation coefficient is determined in the following manner: During the retractable movement of the scroll screen, the magnetic detection results of the magnetic sensor are determined; In response to the magnetic detection result, magnetic compensation is performed on the magnetic detection result to obtain the magnetic compensation coefficient.
7. The magnetic sensor calibration device according to claim 6, characterized in that, The relationship between the movement distance of the roll-up screen and the magnetic compensation coefficient is determined in the following way: Control the retractable movement of the scroll screen, and determine the magnetic detection result of the magnetic sensor during the retractable movement of the scroll screen; In response to the difference between the magnetic detection result and the magnetic detection reference value exceeding a threshold range, a first movement distance of the retractable screen is determined, and magnetic compensation is performed on the magnetic detection result to obtain a first magnetic compensation coefficient. The first magnetic compensation coefficient satisfies the condition that the difference between the compensated magnetic detection result and the magnetic detection reference value is within the threshold range. Establish the correspondence between the first movement distance and the first magnetic compensation coefficient; Repeat the above process until the scroll screen completes its telescopic movement within its maximum telescopic range.
8. The magnetic sensor calibration device according to claim 6 or 7, characterized in that, The determining unit uses the following method to determine the current magnetic compensation coefficient corresponding to the current movement position based on the correspondence between the movement distance of the scroll screen and the magnetic compensation coefficient: The starting position of the retractable movement of the scroll screen is determined, and the second movement distance range to which the starting position belongs is determined. The second movement distance range has a corresponding relationship with the magnetic compensation coefficient. Based on the second movement distance range and the current movement position, the current magnetic compensation coefficient corresponding to the current movement position is determined.
9. The magnetic sensor calibration device according to claim 8, characterized in that, The determining unit determines the current magnetic compensation coefficient corresponding to the current movement position based on the second movement distance range and the current movement position in the following manner: In response to the current movement position being within the second movement distance range, the magnetic compensation coefficient corresponding to the second movement distance range is determined as the current magnetic compensation coefficient corresponding to the current movement position; In response to the current movement position exceeding the second movement distance range, a third movement distance range to which the current movement position belongs is determined, and the magnetic compensation coefficient corresponding to the third movement distance range is determined as the current magnetic compensation coefficient corresponding to the current movement position. There is a correspondence between the third movement distance range and the magnetic compensation coefficient, and it is adjacent to the second movement distance range.
10. The magnetic sensor calibration device according to claim 9, characterized in that, The determining unit determines the movement distance of the roll-up screen during its telescopic movement using the following method: Based on the Hall sensor installed in the terminal, the movement distance of the scroll screen during its retraction or extension is determined.
11. A magnetic sensor calibration device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the magnetic sensor calibration method according to any one of claims 1 to 5.
12. A storage medium, characterized in that, The storage medium stores instructions that, when executed by the terminal's processor, enable the terminal to perform the magnetic sensor calibration method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Brain magnetic resonance examination device
CN104688227A
Security screen
US5450888A