Calibration method and apparatus for electronic bubble level, and computer-readable medium
Patent Information
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- METTLER TOLEDO INSTR SHANGHAI
- Filing Date
- 2024-03-01
- Publication Date
- 2026-05-06
Smart Images

Figure CN2024079663_02012025_PF_FP_ABST
Abstract
Description
CALIBRATION METHOD AND APPARATUS FOR ELECTRONIC BUBBLE LEVEL, AND COMPUTER-READABLE MEDIUMBACKGROUND OF THE INVENTIONTechnical Field
[0001] The present invention mainly relates to the field of precision measurement instruments, and in particular, to a calibration method and apparatus for an electronic bubble level, and a computer-readable medium.
[0002] Background Art
[0003] Many precision measurement instruments need to be in a defined horizontal state for working properly. For example, a weighing error of an electronic balance (weighing instrument) that works based on a gravity method is increased when the balance is tilted, and when the balance is tilted to a larger degree, the error is larger. A bubble level (spirit level) is usually used to assist in determining whether the instrument is horizontally aligned. The bubble level includes a sealed housing, and is incompletely filled with a liquid, leaving a bubble. The housing is provided with a transparent window, and a bubble position may be observed by using the transparent window. When the balance is tilted, the bubble position is shifted to a higher side.
[0004] An electronic bubble level includes a physical bubble level, several photoelectric devices (alight-emitting device and a receiving device) , a signal processing unit, a calculation unit, a control unit, and the like. The light-emitting device and the receiving device are mounted around the physical bubble level. Light emitted by the light-emitting device is reflected and refracted after the light is irradiated on the bubble, and then is received by the receiving device. If the bubble position changes, an optical path between the light-emitting device and the receiving device also changes, so that a received photoelectric signal changes. The calculation unit may obtain a position of the bubble in the bubble level from the photoelectric signal through calculation based on a specific calculation model, and determine, based on the position, whether the bubble is located at a center position and a deviation degree to which the bubble is deviated from the center position, so that a tilt degree of a device configured with the electronic bubble level can be obtained. As the use time grows, the electronic bubble level has some drift, and therefore the electronic bubble level needs to be tuned and calibrated.
[0005] One method for recalibrating an electronic bubble level is to move the bubble to a center reference position, so that an electronic bubble level system records a photoelectric signal existing when the bubble is located at the center reference position, to adjust and calibrate a model parameter and restore precision of the electronic bubble level to a best state. However, in some instruments, no window is specially arranged for the electronic bubble level, and a cover of the instrument needs to be opened to see an exact position of the physical bubble, so as to complete a maintenance task of adjustment and calibration. An operation of opening the cover of the instrument usually needs to be performed by professional maintenance personnel, and the instrument even needs to be returned to an original manufacturer. The process is troublesome and costly.
[0006] Therefore, a method for adjusting and calibrating an electronic bubble level without opening a cover of an instrument equipped with the electronic bubble level and without observing a bubble position of a physical bubble level by using a window is required.SUMMARY
[0007] In view of the technical problem to be solved by the present invention, an easy-to-operate and low-cost calibration method and apparatus for an electronic bubble level, and a computer-readable medium are provided.
[0008] To solve the technical problem, the present invention provides a calibration method for an electronic bubble level, where the electronic bubble level has a housing, a liquid and a bubble are arranged inside a side wall of the housing, the side wall of the housing has at least two target positions, the at least two target positions include a first target position and a second target position, and the method includes: controlling a tilt state of the electronic bubble level, so that the electronic bubble level is in a first state, and in this state, the first target position is higher than the second target position, and the bubble comes into contact with the side wall; obtaining a first photoelectric signal of the electronic bubble level in the first state, where the first photoelectric signal corresponds to a first bubble position of the bubble; controlling the tilt state of the electronic bubble level, so that the electronic bubble level is in a second state, and in this state, the second target position is higher than the first target position, and the bubble comes into contact with the side wall; obtaining a second photoelectric signal of the electronic bubble level in the second state, where the second photoelectric signal corresponds to a second bubble position of the bubble; obtaining a third photoelectric signal existing when the electronic bubble level is in a third state, where the third photoelectric signal corresponds to a third bubble position of the bubble; and calibrating a bubble position calculation model of the electronic bubble level based on the first photoelectric signal, the second photoelectric signal, and the third photoelectric signal.
[0009] In an embodiment of the present application, the step of calibrating a bubble position calculation model of the electronic bubble level based on the first photoelectric signal, the second photoelectric signal, and the third photoelectric signal includes: establishing a first empirical formula for the third bubble position and a difference between the third photoelectric signal and the first photoelectric signal, where the first empirical formula has a first parameter; establishing a second empirical formula for the third bubble position and a difference between the third photoelectric signal and the second photoelectric signal, where the second empirical formula has a second parameter; and obtaining the first parameter and the second parameter through numerical calculation.
[0010] In an embodiment of the present application, the electronic bubble level has m light-emitting apparatuses and n receiving apparatuses, where both m and n are positive integers greater than or equal to 2, the first parameter includes a first x parameter and a first y parameter, and the first empirical formula is represented by using the following formula:
[0011] where i=1: m indicates a first to an mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates a first to an nth receiving apparatuses in the electronic bubble level; Uij indicates a third photoelectric signal of an ith light-emitting apparatus that is received by a jth receiving apparatus when the bubble is at the third bubble position; Uaij indicates a first photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the first bubble position; x3a represents an x coordinate that is of the third bubble position in a Cartesian coordinate system and that is obtained through calculation by using Uaij as a reference, and y3a represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Uaij as a reference; Kxaij represents the first x parameter; and Kyaij represents the first y parameter.
[0012] In an embodiment of the present application, the electronic bubble level has the m light-emitting apparatuses and the n receiving apparatuses, where both m and n are positive integers greater than or equal to 2, the second parameter includes a second x parameter and a second y parameter, and the second empirical formula is represented by using the following formula:
[0013] where i=1: m indicates the first to the mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates the first to the nth receiving apparatuses in the electronic bubble level; Uij indicates the third photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the third bubble position; Ubij indicates a second photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the second bubble position; x3b represents an x coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Ubij as a reference, and y3b represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Ubij as a reference; Kxbij represents the second x parameter; and Kybij represents the second y parameter.
[0014] In an embodiment of the present application, the method further includes: performing weighted averaging processing on (x3a, y3a) and (x3b, y3b) to obtain coordinates (x3, y3) used to represent the third bubble position.
[0015] In an embodiment of the present application, the method further includes: performing weighted averaging processing on the first photoelectric signal and the second photoelectric signal to obtain a photoelectric signal Udij existing when the bubble is located at a center position, and obtaining the third bubble position through calculation by using the following formula:
[0016] where i=1: m indicates a first to an mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates a first to an nth receiving apparatuses in the electronic bubble level; Uij indicates a third photoelectric signal of an ith light-emitting apparatus that is received by a jth receiving apparatus when the bubble is at the third bubble position; x3d represents an x coordinate that is of the third bubble position in a Cartesian coordinate system and that is obtained through calculation by using Udij as a reference, and y3d represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Udij as a reference; Kxdij represents a third x parameter; and Kydij represents a third y parameter.
[0017] In an embodiment of the present application, the at least two target positions are evenly distributed on a wall circumference of the side wall.
[0018] In an embodiment of the present application, the first target position and the second target position are symmetrically disposed.
[0019] In an embodiment of the present application, the method further includes: obtaining a current position of the bubble through calculation by using the calibrated bubble position calculation model.
[0020] In an embodiment of the present application, the method further includes: adjusting the tilt state of the electronic bubble level, so that a bubble position displayed on a display reaches a center position; in this case, obtaining a fourth photoelectric signal of the electronic bubble level, where the fourth photoelectric signal corresponds to a center bubble position at which the bubble is located in the center of the electronic bubble level; and obtaining the third bubble position through calculation based on the third photoelectric signal and the fourth photoelectric signal.
[0021] In an embodiment of the present application, the step of obtaining the third bubble position through calculation based on the third photoelectric signal and the fourth photoelectric signal includes: performing calculation by using the following formula:
[0022] where i=1: m indicates the first to the mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates the first to the nth receiving apparatuses in the electronic bubble level; Uij indicates the third photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the third bubble position; Uoij indicates a fourth photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the center bubble position; x3o represents an x coordinate of the third bubble position in the Cartesian coordinate system, and y3o represents a y coordinate of the third bubble position in the Cartesian coordinate system; Kxoij represents a fourth x parameter; and Kyoij represents a fourth y parameter.
[0023] In an embodiment of the present application, the method further includes performing confidence level check on a model parameter, where the step of performing confidence level check on a model parameter includes: obtaining a confidence level by checking whether redundant data conflicts with each other, and determining, based on the confidence level, to partially calibrate, fully calibrate, or skip calibrating a model parameter of the bubble position calculation model, where the redundant data includes a photoelectric signal that does not need to participate in calculation of the first parameter and the second parameter.
[0024] In an embodiment of the present application, the method further includes performing confidence level check on a model parameter, where the step of performing confidence level check on a model parameter includes: obtaining a confidence level by checking whether redundant data conflicts with each other, and determining, based on the confidence level, to partially calibrate, fully calibrate, or skip calibrating a model parameter of the bubble position calculation model, where the redundant data includes a photoelectric signal that does not need to participate in calculation of the third x parameter and the third y parameter.
[0025] In an embodiment of the present application, the method further includes performing confidence level check on a model parameter, where the step of performing confidence level check on a model parameter includes: obtaining a confidence level by checking whether redundant data conflicts with each other, and determining, based on the confidence level, to partially calibrate, fully calibrate, or skip calibrating a model parameter of the bubble position calculation model, where the redundant data includes a photoelectric signal that does not need to participate in calculation of the fourth x parameter and the fourth y parameter.
[0026] To solve the technical problem, the present application further provides a calibration apparatus for an electronic bubble level, where the electronic bubble level has a housing including a side wall, a liquid and a bubble are arranged inside the side wall, the side wall of the housing has at least two target positions, the at least two target positions include a first target position and a second target position, and the apparatus includes: a memory configured to store instructions executable by a processor; a controller configured to control a tilt state of the electronic bubble level; and the processor configured to execute the instructions to implement the calibration method described above.
[0027] In an embodiment of the present application, the apparatus further includes a tilt sensor configured to detect a tilt degree of the electronic bubble level, and feed back the tilt degree to the controller, to instruct the controller to control the tilt state of the electronic bubble level.
[0028] In an embodiment of the present application, the tilt sensor includes a MEMS accelerometer.
[0029] In an embodiment of the present application, the electronic bubble level is disposed in an electronic device, and the controller is configured to control the tilt state of the electronic bubble level by controlling a tilt state of the electronic device.
[0030] To solve the technical problem, the present application further provides a computer-readable medium storing computer program code, where when the computer program code is executed by a processor, the calibration method described above is implemented.
[0031] In the calibration method in the present application, an electronic bubble level inside an instrument can be calibrated at any time without opening a cover of the instrument, so that a user of the instrument can perform maintenance, adjustment, and calibration, or the electronic bubble level can be calibrated in a production process of the instrument. The method has advantages of simplicity, reliability, and low costs.BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are included to provide a further understanding of the present application and are incorporated in and constitute a part of the present application, show the embodiments of the present application, and serve to, together with this specification, explain the principles of the present invention. In the accompanying drawings:
[0033] FIG. 1A is a schematic diagram of a three-dimensional structure of an electronic bubble level;
[0034] FIG. 1B is a schematic side view of the electronic bubble level shown in FIG. 1A;
[0035] FIG. 2 is an exemplary flowchart of a calibration method according to an embodiment of the present application;
[0036] FIG. 3A and FIG. 3B are schematic diagrams in which an electronic bubble level is in a first state in a calibration method according to an embodiment of the present application;
[0037] FIG. 4A and FIG. 4B are schematic diagrams in which an electronic bubble level is in a second state in a calibration method according to an embodiment of the present application;
[0038] FIG. 5A and FIG. 5B are schematic diagrams in which an electronic bubble level is in a third state in a calibration method according to an embodiment of the present application; and
[0039] FIG. 6 is a schematic block diagram of a calibration apparatus for an electronic bubble level according to an embodiment of the present application.
[0040] BRIEF DESCRIPTION OF EMBODIMENTS
[0041] To describe the technical solutions in embodiments of the present application more clearly, the accompanying drawings required for describing the embodiments will be briefly described below. Apparently, the accompanying drawings in the following description show merely some examples or embodiments of the present application, and those of ordinary skill in the art would apply the present application to other similar scenarios according to these drawings without any creative effort. Unless it is obvious from the context or otherwise stated, the same reference numerals in the accompanying drawings represent the same structure or operation.
[0042] As shown in the present application and the claims, unless the context expressly indicates otherwise, the words “a” , “an” , “said” , and / or “the” do not specifically refer to the singular, but may also include the plural. Generally, the terms “include” and “comprise” only suggest that the expressly identified steps and elements are included, but these steps and elements do not constitute an exclusive list, and the method or device may further include other steps or elements.
[0043] Unless specifically stated otherwise, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application. In addition, it should be understood that, for ease of description, the sizes of various parts shown in the drawings are not drawn to scale. The technologies, methods, and devices known to those of ordinary skill in the related art may not be discussed in detail, but where appropriate, the technologies, methods, and devices should be regarded as part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiment may have different values. It should be noted that similar reference signs and letters refer to similar items in the following drawings. Therefore, once a specific item is defined in one of the drawings, it need not be further discussed in subsequent drawings.
[0044] In the description of the present application, it should be understood that, an orientation or position relationship indicated by orientation terms such as “front, rear, upper, lower, left, and right” , “transverse, longitudinal, vertical, and horizontal” , and “top and bottom” is usually based on an orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description. Unless otherwise stated, these orientation terms do not indicate or imply that an apparatus or element referred to must have a specific orientation or be constructed and operated in a specific orientation, so that the orientation terms cannot be understood as a limitation of the protection scope of the present application; and the orientation terms “inner and outer” refer to the inside and outside relative to the contour of each component itself.
[0045] For convenience of description, spatially relative terms such as “on” , “above” , “on the top surface” , and “upper” can be used herein to describe a spatial position relationship between a device or a feature shown in the figure and other devices or features. It should be understood that spatially relative terms are intended to include different orientations in use or operation in addition to the orientation of the device described in the figure. For example, if the device in the figure is inverted, the device described as “on other devices or structures” or “above other devices or structures” will then be positioned as “under other devices or structures” or “below other devices or structures” . Therefore, the exemplary term “above” may include two orientations “above” and “below” . The device may also be positioned in other different manners (rotated by 90 degrees or in other orientations) , and spatially relative description used here is explained accordingly.
[0046] In addition, it should be noted that the use of words such as “first” and “second” to define parts is merely for the convenience of distinguishing between corresponding parts. Unless otherwise stated, the above words have no special meaning and therefore cannot be understood as limitation of the protection scope of the present application. Furthermore, although the terms used in the present application are selected from well-known common terms, some of the terms mentioned in the specification of the present application may have been selected by the applicant according to his or her determination, and the detailed meaning thereof is described in the relevant section described herein. Furthermore, the present application must be understood, not simply by the actual terms used but also by the meanings encompassed by each term.
[0047] In the present application, a flowchart is used to illustrate the operations performed by a system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed exactly in order. Instead, the various steps may be processed in reverse order or simultaneously. In addition, other operations are added to these processes, or a certain step or several operations are removed from these processes.
[0048] Acalibration method and apparatus for an electronic bubble level in the present application are applicable to any electronic bubble level including a light-emitting apparatus and a receiving apparatus. For the electronic bubble level, a bubble position is obtained through calculation by using a photoelectric signal and a calculation model. An electronic device on which the electronic bubble level is mounted is not limited in the present application. It should be noted that the photoelectric signal in the present application refers to a type of signal that can be converted from an optical signal to an electrical signal. The present application does not limit a specific type of the optical signal, including but not limited to infrared light, visible light, laser light, etc. Taking infrared light as an example, the light-emitting apparatus is an apparatus that emits infrared light, and the receiving apparatus is an apparatus that can receive infrared light and convert the received optical signal into an electrical signal. FIG. 1A is a schematic diagram of a three-dimensional structure of an electronic bubble level. FIG. 1B is a schematic side view of the electronic bubble level shown in FIG. 1A. It should be noted that FIG. 1A and FIG. 1B show only some but not all structures of the electronic bubble level 100. As shown in FIG. 1A and FIG. 1B, the electronic bubble level 100 is cylindrical on the whole, and has a specific height h. From the perspective shown in FIG. 1B, the height h is less than a diameter of the electronic bubble level. The electronic bubble level 100 has a housing 110. The housing 110 has a top part 111, a bottom part 112, and a side wall 113. Some liquid is filled in internal space 120 of the housing 110, and a bubble 130 is formed. In other words, the internal space 120 is filled with the liquid and the bubble 130. The housing 110 and the liquid and the bubble 130 inside the housing form a physical bubble level. It may be understood that the housing 110 is a sealed housing.
[0049] As shown in FIG. 1A, two light-emitting apparatuses D1 and D2 and two receiving apparatuses Q1 and Q2 are disposed at intervals on an upper circumference of the top part 111, and are configured to detect a bubble position. During use, light emitted by the light-emitting apparatuses D1 and D2 is reflected and / or refracted by the bubble 130, and is reflected by the bottom part 112. The reflected and refracted light is received by the receiving apparatuses Q1 and Q2 and converted into an electrical signal. The electrical signal is processed to obtain a position of the bubble 130 through calculation.
[0050] As shown in FIG. 1A, a mark ring 140 is further disposed on the top part 111 to assist in determining whether the bubble 130 is deviated from the center and a deviation degree. In some cases, when the bubble 130 comes into contact with the mark ring 140, a control unit of the electronic bubble level 100 sends an alarm to notify a user that the deviation degree of the bubble 130 reaches a degree to which attention needs to be paid.
[0051] FIG. 1A and FIG. 1B are merely examples of an electronic bubble level to which a calibration method according to the present application can be applied, and are not used to limit a specific structure, a quantity of photoelectric devices, and the like of the electronic bubble level.
[0052] As shown in FIG. 1A, the side wall 113 has at least two target positions 113a and 113b, one target position is referred to as a first target position 113a, and the other target position is referred to as a second target position 113b. In the embodiments shown in FIG. 1A and FIG. 1B, a contour of the side wall 113 is a circle, the first target position 113a and the second target position 113b are symmetrically distributed on a circumference of the side wall 113, and an included angle between the first target position 113a and the second target position 113b is 180 degrees. In another embodiment, the included angle between the first target position 113a and the second target position 113b may be 45 degrees, 90 degrees, 135 degrees, or the like. This is not limited in the present application. In the specification of the present application, the first target position 113a and the second target position 113b shown in FIG. 1A are used as an example for description.
[0053] In some embodiments, when there are more than two target positions, a plurality of target positions are evenly distributed on the circumference of the side wall 113.
[0054] When the contour of the side wall 113 is not a circle, for example, is a rectangle, the plurality of target positions may be respectively located on different sides of the rectangle. For example, during symmetric distribution, the first target position and the second target position are respectively disposed on two opposite sides.
[0055] FIG. 2 is an exemplary flowchart of a calibration method according to an embodiment of the present application. As shown in FIG. 2, the calibration method of this embodiment includes the following steps:
[0056] step S210: controlling a tilt state of an electronic bubble level, so that the electronic bubble level is in a first state, and in this state, a first target position is higher than a second target position, and a bubble comes into contact with a side wall;
[0057] step S220: obtaining a first photoelectric signal of the electronic bubble level in the first state, where the first photoelectric signal corresponds to a first bubble position of the bubble;
[0058] step S230: controlling the tilt state of the electronic bubble level, so that the electronic bubble level is in a second state, and in this state, the second target position is higher than the first target position, and the bubble comes into contact with the side wall;
[0059] step S240: obtaining a second photoelectric signal of the electronic bubble level in the second state, where the second photoelectric signal corresponds to a second bubble position of the bubble;
[0060] step S250: obtaining a third photoelectric signal existing when the electronic bubble level is in a third state, where the third photoelectric signal corresponds to a third bubble position of the bubble; and
[0061] step S260: calibrating a bubble position calculation model of the electronic bubble level based on the first photoelectric signal, the second photoelectric signal, and the third photoelectric signal.
[0062] The following describes the above steps S210 to S260 with reference to FIG. 3A to FIG. 5B.
[0063] FIG. 3A and FIG. 3B are schematic diagrams in which an electronic bubble level is in a first state in a calibration method according to an embodiment of the present application. FIG. 3A is a three-dimensional schematic diagram of an electronic bubble level 310. In this embodiment, the electronic bubble level 310 has four light-emitting apparatuses D1, D2, D3, and D4 and four receiving apparatuses Q1, Q2, Q3, and Q4, and the eight apparatuses are evenly distributed on a circumference of the housing. In the present application, the example is used for description, and is not used to limit a quantity of light-emitting apparatuses and a quantity of receiving apparatuses, a disposition position of the apparatus, and the like.
[0064] In some embodiments, the electronic bubble level 310 includes at least one light-emitting apparatus and at least three receiving apparatuses.
[0065] In some embodiments, the electronic bubble level 310 includes at least three light-emitting apparatuses and at least one receiving apparatus.
[0066] In some embodiments, the electronic bubble level 310 includes at least two light-emitting apparatuses and at least two receiving apparatuses.
[0067] FIG. 3B is a side view of an electronic bubble level 310. As shown in FIG. 3A and FIG. 3B, the side wall 331 has the first target position 331a and the second target position 331b that are symmetrically disposed.
[0068] In step S210, the tilt state of the electronic bubble level 310 is actively controlled. In this case, in orientations shown in FIG. 3A and FIG. 3B, the left of the electronic bubble level 310 is higher than the right thereof, that is, the first target position 331a of the electronic bubble level 310 is higher than the second target position 331b in a vertical direction. It may be understood that the left and right herein are only a relative relationship.
[0069] How to control the tilt state of the electronic bubble level 310 is not limited in the present application. In some embodiments, the electronic bubble level 310 is disposed in an electronic device. The electronic device may be manually moved to control the tilt state of the electronic bubble level 310, or a control unit may be disposed, for example, a control unit that includes structures such as a motor and a height-adjustable support foot is disposed. The left of the electronic device is lifted and / or the right of the electronic device is lowered, so that the electronic bubble level 310 is in the first state Pa shown in FIG. 3B. It should be noted that when the tilt state of the electronic bubble level 310 is changed, its spatial position is roughly unchanged, that is, its projection position on the horizontal plane is roughly unchanged, but its projection area may be changed. However, the present application does not rule out the case that the spatial position of the electronic bubble level 310 is changed during a tilting process such that its projection position is changed significantly. However, such a change does not affect the implementation of the calibration method of the present application.
[0070] After a large amount of observation, test, and research, the inventor of the present application finds that when precision of a photoelectric system of the electronic bubble level is already untrustworthy, if a bubble position of a physical bubble level is not directly observed, it is impossible or difficult to determine a position at which the physical bubble is in the center, and consequently a center reference position cannot be directly used for adjustment and calibration. The inventor of the present application further observes that when the electronic bubble level is tilted to a specific degree, the bubble comes into contact with the side wall of the housing, and if the electronic bubble level is further tilted, the bubble still comes into contact with the side wall. A shape of the bubble is almost unchanged, and a photoelectric signal is almost the same. Therefore, in step S210, the first target position 331a is higher than the second target position 331b to a degree that the bubble 320 can be in contact with the inner wall of the side wall 331. When the bubble position no longer changes, the photoelectric signal also remains unchanged. Therefore, it may also be learned, by detecting the photoelectric signal, that the bubble has come into contact with the side wall.
[0071] As shown in FIG. 3B, in some embodiments, a tilt degree of the electronic bubble level 310 is detected by using a tilt sensor 350. It is assumed that tangent tanα of an included angle α between an upper surface of the electronic bubble level 310 and a horizontal line is used as a measure of the tilt degree. When tanα reaches 3 / 1000, the bubble 320 comes into contact with an inner side of the side wall located at the first target position 331a. This tilt degree is very small and unrecognizable to the naked eye. A high-precision tilt sensor 350 may be used to determine that the electronic bubble level 310 is already in the required first state Pa.
[0072] Because the high-precision tilt sensor 350 has high costs, when tanα reaches 50 / 1000 to 200 / 1000, it is easy to observe with the naked eye that the left of the electronic device is higher than the right thereof. In this case, there is no need to add the additional tilt sensor 350 to determine that the electronic bubble level 310 is in the first state Pa. In addition, in this case, if a low-precision tilt sensor 350 is used, the tilt degree may also be detected, so that it can be determined that the bubble 320 comes into contact with the inner side of the side wall located at the first target position 331a. In this case, the electronic bubble level 310 is also in the required first state Pa. The low-precision tilt sensor 350 has an advantage of low costs.
[0073] In some embodiments, the tilt sensor 350 includes a MEMS accelerometer.
[0074] It can be learned from the foregoing embodiment that the first state Pa may indicate a placement state of the electronic bubble level, and is not limited to one unique spatial position, but may be some spatial positions.
[0075] As shown in FIG. 3B, in some other embodiments, a display 340 is electrically connected to the electronic bubble level 310 by using a processor 360, and the display 340 is further electrically connected to the tilt sensor 350 by using the processor 360. The bubble position can be obtained through conversion based on the tilt angle and thus displayed on the display 340, for example, a bubble image 341. Based on these embodiments, in step S210, a first state indication mark 342 may be further disposed on the display 340. When the bubble image 341 is located in the first state indication mark 342, it indicates that the electronic bubble level 310 is already in the first state Pa. As shown in FIG. 3B, the first state indication mark 342 is a contour line that can accommodate the bubble image 341. Clearly, the first state indication mark 342 is close to a side wall contour 343, or comes into contact with a side wall contour 343. A shape and a size of the contour line are not limited in the present application.
[0076] In step S220, a quantity of obtained first photoelectric signals is related to a quantity of light-emitting apparatuses and a quantity of receiving apparatuses. It is assumed that the electronic bubble level 310 has m light-emitting apparatuses and n receiving apparatuses, where both m and n are positive integers greater than or equal to 2. The step of obtaining a first photoelectric signal includes the following: When each light-emitting apparatus is turned on, a signal of each receiving apparatus is recorded, and after each light-emitting apparatus is turned on once, m*n (the quantity m of light-emitting apparatuses is multiplied by the quantity n of receiving apparatuses) photoelectric signals are obtained.
[0077] Given that the first photoelectric signal obtained in step S220 is Uaij, where i=1: m, j=1: n, Uaij indicates a first photoelectric signal of an ith light-emitting apparatus that is received by a jth receiving apparatus, and there are m*n first photoelectric signals in total.
[0078] Step S230 is similar to step S210, and a difference lies in that the electronic bubble level 310 is in the second state Pb different from the first state Pa. In this case, the second target position 331b is higher than the first target position 331a in a vertical direction, and the bubble 320 comes into contact with the side wall. Clearly, a part in which the bubble 320 comes into contact with the side wall 331 in this case is different from the contact part in step S210. The second state Pb may also indicate a placement state of the electronic bubble level, and is not limited to one unique spatial position, but may be some spatial positions.
[0079] FIG. 4A and FIG. 4B are schematic diagrams in which an electronic bubble level is in a second state in a calibration method according to an embodiment of the present application. As shown in FIG. 4A and FIG. 4B, in this embodiment, the electronic bubble level 310 is in a tilt state in which the left is lower than the right, and the second target position 331b is higher than the first target position 331a.
[0080] As shown in FIG. 4B, in an embodiment having a display 340, the display 340 may further display a second state indication mark 344. When the bubble image 341 is located in the second state indication mark 344, it indicates that the electronic bubble level 310 is already in the second state Pb. As shown in FIG. 4B, the second state indication mark 344 is a contour line that can accommodate the bubble image 341. Clearly, the second state indication mark 344 is close to the side wall contour 343, or comes into contact with the side wall contour 343.
[0081] Both the first state indication mark 342 and the second state indication mark 344 may be displayed on the display 340 only when required, and may not be displayed when not required. For example, when step S210 is performed, the first state indication mark 342 is displayed. When step S230 is performed, the second state indication mark 344 is displayed.
[0082] In step S240, the step of obtaining a second photoelectric signal is similar to step S220. Given that the second photoelectric signal obtained in step S240 is Ubij, where i=1: m, j=1: n, Ubij indicates a second photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus, and there are m*n second photoelectric signals in total.
[0083] In step S250, the electronic bubble level 310 is in the third state P3, where the third state P3 is any tilt state, and the any tilt state includes the first state Pa and the second state Pb. Similarly, the third state P3 may also indicate a placement state of the electronic bubble level, and is not limited to one unique spatial position, but may be some spatial positions. In the present application, after the first photoelectric signal and the second photoelectric signal are obtained by using steps S210 to S240, any bubble position may be obtained through calculation by using the first photoelectric signal and the second photoelectric signal, and the bubble position calculation model is calibrated in this process.
[0084] FIG. 5A and FIG. 5B are schematic diagrams in which an electronic bubble level is in a third state in a calibration method according to an embodiment of the present application. As shown in FIG. 5A and FIG. 5B, in the third state P3, the bubble is almost a center position of the housing, but the third state P3 is not limited to the center position. As shown in FIG. 5B, in some embodiments, in this case, a third state indication mark 345 is displayed on the display 340. When the bubble image 341 is located in the third state indication mark 345, it indicates that the electronic bubble level 310 is already in the third state P3. As shown in FIG. 5B, the third state indication mark 345 is located in the middle of the bubble level, and does not come into contact with the side wall contour 343.
[0085] In some embodiments, in step S250, the electronic bubble level 310 is restored to an initial position thereof, which is an initial position existing before step S210 is performed. The initial position represents an actual position at which the electronic bubble level 310 is located during actual use. After the first photoelectric signal and the second photoelectric signal are separately obtained by using steps S210 to S240, the electronic bubble level 310 is restored to the initial position, and then the third photoelectric signal existing when the electronic bubble level 310 is in the third state P3 is obtained.
[0086] In some embodiments, step S250 may be performed before step S210.
[0087] In some embodiments, step S250 may be performed after steps S210 and S220 and before steps S230 and S240.
[0088] Given that the third photoelectric signal obtained in step S250 is Uij, where i=1: m, j=1: n, Uij indicates a third photoelectric signal of an ith light-emitting apparatus that is received by a jth receiving apparatus, and there are m*n third photoelectric signals in total.
[0089] In some embodiments, step S260 further includes the following steps:
[0090] step S261: establishing a first empirical formula for the third bubble position (x3a, y3a) and a difference (Uij-Uaij) between the third photoelectric signal and the first photoelectric signal, where the first empirical formula has a first parameter (Kxaij, Kyaij) ;
[0091] step S272: establishing a second empirical formula for the third bubble position (x3b, y3b) and a difference (Uij-Ubij) between the third photoelectric signal and the second photoelectric signal, where the second empirical formula has a second parameter (Kxbij, Kybij) ; and
[0092] step S273: obtaining the first parameter (Kxaij, Kyaij) and the second parameter (Kxbij, Kybij) through numerical calculation.
[0093] It should be noted that the bubble position calculation model of the electronic bubble level 310 may be set based on experience. This is not limited in the present application.
[0094] The position of the bubble 320 may be represented in a Cartesian coordinate system by using an x coordinate and a y coordinate, or may be represented in a polar coordinate system by using a polar radius R and a polar angle Theta. In the present application, the position of the bubble 320 is represented by using the Cartesian coordinate system. A corresponding formula in polar coordinates may be derived based on a formula provided in the following specific embodiment, and details are not described herein.
[0095] In some embodiments, the bubble position calculation model is a linear model. For example, the following formula is used to represent the first empirical formula:
[0096] where i=1: m indicates a first to an mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates a first to an nth receiving apparatuses in the electronic bubble level; Uij indicates a third photoelectric signal of an ith light-emitting apparatus that is received by a jth receiving apparatus when the bubble 320 is at the third bubble position; Uaij indicates a first photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble 320 is at the first bubble position Pa; x3a represents an x coordinate that is of the third bubble position in a Cartesian coordinate system and that is obtained through calculation by using Uaij as a reference, and y3a represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Uaij as a reference; Kxaij represents the first x parameter; and Kyaij represents the first y parameter.
[0097] The first empirical formula (1) is a system of linear equations in two unknowns. As a mathematical model, an input of the model is Uij and Uaij, and an output of the model is (x3a, y3a) . Kxaij means that when the bubble position is shifted by 1 mm in an x direction, Uaij changes by 1 / Kxaij volts. Kyaij means that when the bubble position is shifted by 1 mm in a y direction, Uaij changes by 1 / Kyaij volts. The first parameter (Kxaij, Kyaij) may be obtained by using a test and a numerical calculation method such as a least square method.
[0098] Correspondingly, the second empirical formula under the linear model is as follows:
[0099] where i=1: m indicates the first to the mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates the first to the nth receiving apparatuses in the electronic bubble level; Uij indicates the third photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble 320 is at the third bubble position; Ubij indicates a second photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble 320 is at the second bubble position; x3b represents an x coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Ubij as a reference, and y3b represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Ubij as a reference; Kxbij represents the second x parameter; and Kybij represents the second y parameter. Similar to the first empirical formula (1) , the second parameter (Kxbij, Kybij) may be obtained according to the second empirical formula (2) and by using a numerical calculation method such as a least square method. In some embodiments, after step S260, the method further includes:
[0100] step S270: obtaining a current position of the bubble through calculation by using the calibrated bubble position calculation model. That is, when the electronic bubble level is in any third state, coordinates (x3a, y3a) and (x3b, y3b) of the third bubble position are obtained.
[0101] Based on the steps, the first empirical formula and the second empirical formula with update parameters may be obtained, so that the bubble position calculation model in the electronic bubble level 310 is updated. When a new photoelectric signal is subsequently obtained, an accurate current position of the bubble may be obtained.
[0102] In another embodiment, there are, for example, three target positions that are separated from each other by 120 degrees. Based on such a target position, a calculation model is slightly more complex than the model with two target positions, but has better precision. In some other embodiments, there are, for example, four target positions that are separated from each other by 90 degrees, so that precision is higher, but a modeling process may be more complex.
[0103] In some embodiments, after (x3a, y3a) and (x3b, y3b) are obtained, the calibration method in the present application further includes: performing weighted averaging processing on (x3a, y3a) and (x3b, y3b) to obtain coordinates (x3, y3) used to represent the third bubble position. (x3a, y3a) obtained through calculation by using formula (1) may be different from (x3b, y3b) obtained through calculation by using formula (2) . Through weighted averaging, an error may be further eliminated to obtain coordinates (x3, y3) with higher precision.
[0104] In some embodiments, the calibration method in the present application further includes: performing weighted averaging processing on the first photoelectric signal and the second photoelectric signal to obtain a photoelectric signal Udij existing when the bubble is located at a center position, and obtaining the third bubble position through calculation by using the following formula (3) :
[0105] Meanings of i, j, m, n, and Uij are the same as those in formula (1) and formula (2) . x3d represents an x coordinate that is of the third bubble position in a Cartesian coordinate system and that is obtained through calculation by using Udij as a reference, and y3d represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Udij as a reference; Kxdij represents a third x parameter; and Kydij represents a third y parameter. Similar to the first parameter and the second parameter, the third parameter (Kxdij, Kydij) may be obtained by using a numerical calculation method, and the third bubble position (x3d, y3d) may be obtained through calculation according to formula (3) .
[0106] How to perform weighted averaging processing on the first photoelectric signal and the second photoelectric signal is not limited in the present application. For example, same or different weight coefficients may be allocated to the first photoelectric signal and the second photoelectric signal, and then summation is performed. The sum of the weight coefficients may be 1.
[0107] Further, in an embodiment including a display, the calibration method in the present application further includes the following steps:
[0108] step S610: adjusting a position of the electronic bubble level, so that a bubble position displayed on a display reaches a center position;
[0109] step S620: in this case, obtaining a fourth photoelectric signal of the electronic bubble level, where the fourth photoelectric signal corresponds to a center bubble position at which the bubble is located in the center of the electronic bubble level; and
[0110] step S630: obtaining the third bubble position through calculation based on the third photoelectric signal and the fourth photoelectric signal.
[0111] In step S610, a horizontal state of an electronic device in which the electronic bubble level is disposed may be adjusted, so that the bubble position is adjusted to (0, 0) . The fourth photoelectric signal Uoij in this case is recorded, and is used as a photoelectric signal existing when the bubble is located at the center reference position. Then, the third bubble position (x3o, y3o) of the bubble is obtained through calculation by using a difference between the third photoelectric signal Uij and the fourth photoelectric signal Uoij. For example, the third bubble position (x3o, y3o) is obtained through calculation by using the following formula (4) :
[0112] where i=1: m indicates the first to the mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates the first to the nth receiving apparatuses in the electronic bubble level; Uij indicates the third photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the third bubble position; Uoij indicates a fourth photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble 320 is at the center bubble position; x3o represents an x coordinate of the third bubble position in the Cartesian coordinate system, and y3o represents a y coordinate of the third bubble position in the Cartesian coordinate system; Kxoij represents a fourth x parameter; and Kyoij represents a fourth y parameter. Similar to the first parameter, the second parameter, and the third parameter, the fourth parameter (Kxoij, Kyoij) may be obtained by using a numerical calculation method.
[0113] Based on the third bubble position (x3o, y3o) obtained through calculation in steps S610 to S630, the electronic bubble level can have higher precision and better long-term stability in a whole range.
[0114] In actual application, depending on different requirements for precision and different acceptable levels of operation complexity, and considering a preference of a technician, different solutions may be used based on the ideas of the foregoing embodiments to adjust and calibrate the electronic bubble level, so as to remove impact of drift on precision of the electronic bubble level, update a calculation model parameter of the electronic bubble level, and obtain a bubble position with better precision. Alternatively, the model can be non-linear, which is related to an actual precision requirement, the experience and preference of the technician, and the like.
[0115] Further, in the embodiment shown in FIG. 3A to FIG. 5B, m=3 and n=3. In this case, nine first photoelectric signals Uaij, nine second photoelectric signals Ubij, and nine third photoelectric signals Uij may be obtained based on the calibration method in the present application. For solving the above formula (1) or (2) , these signals have some redundant data. Therefore, the calibration method in the present application further includes: performing confidence level check on a model parameter, where the step of performing confidence level check on a model parameter includes: obtaining a confidence level by checking whether redundant data conflicts with each other, and determining, based on the confidence level, to partially calibrate, fully calibrate, or skip calibrating a model parameter of the bubble position calculation model, where the redundant data includes a photoelectric signal that does not need to participate in calculation of the first parameter and the second parameter. Partial calibration means that weighted averaging is performed by using a newly obtained model parameter together with an old parameter in an original model, to obtain a new model parameter. Likewise, in an embodiment in which the third bubble position is obtained through calculation by using formula (3) , the redundant data includes a photoelectric signal that does not need to participate in calculation of the third x parameter and the third y parameter. In an embodiment in which the third bubble position is obtained through calculation by using formula (4) , the redundant data includes a photoelectric signal that does not need to participate in calculation of the fourth x parameter and the fourth y parameter.
[0116] In the calibration method in the present application, an electronic bubble level inside an instrument can be calibrated at any time without opening a cover (such as an upper cover or a side cover) of the instrument, so that a user of the instrument can perform maintenance, adjustment, and calibration, or the electronic bubble level can be calibrated in a production process of the instrument. The method has advantages of simplicity, reliability, and low costs.
[0117] FIG. 6 is a schematic block diagram of a calibration apparatus for an electronic bubble level according to an embodiment of the present application. The calibration apparatus 600 includes: a memory 601 configured to store instructions executable by a processor 602; a controller 603 configured to control a tilt state of an electronic bubble level 604; and the processor 602 configured to execute the instructions to implement the calibration method described above.
[0118] With reference to FIG. 3B, FIG. 4B, and FIG. 5B, a processor 360 is shown. The processor 360 may be the processor 602 in FIG. 6, and is configured to receive a photoelectric signal from the electronic bubble level 310 or the electronic bubble level 604, receive an electrical signal from the tilt sensor, process the photoelectric signal and the electrical signal, obtain a bubble position through calculation, and send the bubble position to the display 340 for display.
[0119] Referring to FIG. 6, the calibration apparatus 600 may further include an internal communications bus 606 and a communications port 605. The memory 601 may be specifically a program storage unit and a data storage unit in different forms such as a hard disk, a read-only memory (ROM) , and a random access memory (RAM) , and can store various data files used for computer processing and / or communication, and possible program instructions executed by the processor 602. The internal communications bus 606 can implement data communication between components of the calibration apparatus 600. The processor 602 can perform determination and give a prompt. In some embodiments, the processor 602 may include one or more processors. The communications port 605 can implement data communication between the calibration apparatus 600 and the outside. In some embodiments, the calibration apparatus 600 can send information and data to and receive information and data from a network through the communications port 605. A processing result of the processor 602 is transferred to user equipment through the communications port 605, and is displayed in a user interface. The user interface herein is, for example, the display 340 in FIG. 3B.
[0120] The above calibration method may be implemented as a computer program, stored in the hard disk, and can be loaded into the processor 602 for execution, so as to implement the calibration method in the present application.
[0121] In some embodiments, the calibration apparatus 600 further includes a tilt sensor configured to detect a tilt degree of the electronic bubble level, and feed back the tilt degree to the controller 603, to instruct the controller 603 to control the tilt state of the electronic bubble level.
[0122] In some embodiments, the electronic bubble level 604 is disposed in an electronic device, and the controller 603 controls the tilt state of the electronic bubble level 604 by controlling a tilt state of the electronic device. For example, an adjustable foot of the electronic device is adjusted, so that a bubble position on the display 340 reaches a required position.
[0123] In some embodiments, the tilt sensor includes a MEMS accelerometer. In the present application, a low-precision MEMS accelerometer is used, which is greatly different from the electronic bubble level in terms of precision, measurement range, volume, and costs. A bubble level with a bubble has very high precision (resolution) , for example, the resolution is 0.01 / 1000, but has a very small measurement range, for example, ±3 / 1000. A tilt sensor made of the MEMS accelerometer has low precision (resolution) , for example, the resolution is 1 / 1000, but has a very large measurement range, for example, ±600 / 1000. The tilt sensor made of the MEMS accelerometer has a very small volume and very low costs.
[0124] Clearly, the tilt sensor made of the MEMS accelerometer cannot replace the bubble level with a bubble when high precision is required. The tilt sensor made of the MEMS accelerometer cannot confirm and ensure whether the bubble in the bubble level is at a center position. However, the tilt sensor made of the MEMS accelerometer can confirm and ensure whether the left of the bubble level is higher than the right thereof, and that the bubble level has an enough tilt degree to ensure that the bubble is already on the left. Therefore, in the present application, the bubble level with a bubble and the MEMS accelerometer cooperate with and complement each other.
[0125] The present invention further includes a computer-readable medium storing computer program code, where when the computer program code is executed by a processor, the calibration method for an electronic bubble level described above is implemented.
[0126] The calibration method for an electronic bubble level may also be stored, as an article of manufacture, in the computer-readable storage medium when implemented as the computer program. For example, the computer-readable storage media may include, but are not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk, and a magnetic stripe) , an optical disc (e.g., a compact disc (CD) , and a digital versatile disc (DVD) ) , a smart card, and a flash memory device (e.g., an electrically erasable programmable read-only memory (EPROM) , a card, a stick, and a key driver) . In addition, various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term “machine-readable medium” may include, but is not limited to, wireless channels and various other media (and / or storage media) capable of storing, containing, and / or carrying code and / or instructions and / or data.
[0127] It should be understood that the embodiments described above are merely illustrative. The embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processor can be implemented in one or more application-specific integrated circuits (ASIC) , digital signal processors (DSP) , digital signal processing devices (DSPD) , programmable logic devices (PLD) , field programmable gate arrays (FPGA) , processors, controllers, microcontrollers, microprocessors, and / or other electronic units designed to perform the functions described herein, or a combination thereof.
[0128] Some aspects of the present application may be completely executed by hardware, or may be completely executed by software (including firmware, resident software, microcode, etc. ) , or may be executed by a combination of hardware and software. The hardware or software described above may all be referred to as “data block” , “module” , “engine” , “unit” , “component” , or “system” . The processor may be one or more application-specific integrated circuits (ASIC) , digital signal processors (DSP) , digital signal processing devices (DSPD) , programmable logic devices (PLD) , field-programmable gate arrays (FPGA) , processors, controllers, microcontrollers, microprocessors, or a combination thereof. In addition, various aspects of the present application may be embodied as a computer product in one or more computer-readable media, and the product includes computer-readable program code. For example, the computer-readable media may include, but are not limited to, a magnetic storage device (for example, a hard disk, a floppy disk, a tape... ) , an optical disc (for example, a compact disc (CD) , a digital versatile disc (DVD) ... ) , a smart card, and a flash memory device (for example, a card, a stick, a key drive... ) .
[0129] The computer-readable medium may include a propagation data signal containing computer program code, for example, on a baseband or as a part of a carrier. The propagation signal may take various forms, including an electromagnetic form, an optical form, etc., or a suitable combination form. The computer-readable medium may be any computer-readable medium other than a computer-readable storage medium. The medium may be connected to an instruction execution system, apparatus, or device to implement communication, propagation, or transmission of a program for use. The program code located on the computer-readable medium can be propagated through any suitable medium, including radio, a cable, a fiber-optic cable, a radio frequency signal, or a similar medium, or any combination of the foregoing media.
[0130] The basic concepts have been described above. Obviously, for those skilled in the art, the foregoing disclosure of the present invention is merely an example, and does not constitute a limitation to the present application. Those skilled in the art may make various modifications, improvements, and amendments to the present application, although it is not explicitly stated here. Such modifications, improvements, and amendments are suggested in the present application, and therefore, such modifications, improvements, and amendments still fall within the spirit and scope of exemplary embodiments of the present application.
[0131] Also, the present application uses specific words to describe embodiments of the present application. For example, “one embodiment” , “an embodiment” , and / or “some embodiments” mean a certain feature, structure, or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that “an embodiment” or “one embodiment” or “an alternative embodiment” mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of the present application can be appropriately combined.
[0132] Similarly, it should be noted that, in order to simplify the expressions disclosed in the present application to facilitate the understanding of one or more embodiments of the present invention, in the foregoing description of the embodiments of the present application, various features may be sometimes incorporated into one embodiment, figure or the description thereof. However, such a method disclosed does not mean that the subject of the present application requires more features than those mentioned in the claims. In fact, the features of the embodiments are fewer than all the features of a single embodiment disclosed above.
[0133] In some embodiments, numbers for describing the number of compositions and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifier “about” , “approximately” , or “substantially” in some examples. Unless otherwise stated, “about” , “approximately” , or “substantially” indicates that the number is allowed to vary by ±20%. Correspondingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, and the approximate values can be changed according to the required characteristics of individual embodiments. In some embodiments, for the numerical parameters, the specified significant digits should be taken into consideration and a general digit reservation method should be used. Although the numerical ranges and parameters used to confirm the breadth of the ranges of the numerical parameters in some embodiments of the present application are approximate values, such numerical values need to be set as precisely as possible within a feasible range in specific embodiments.
Claims
1.A calibration method for an electronic bubble level, wherein the electronic bubble level has a housing, wherein a liquid and a bubble are arranged inside a side wall of the housing, the side wall of the housing has at least two target positions, and the at least two target positions comprise a first target position and a second target position, characterized in that the method comprises:controlling a tilt state of the electronic bubble level, so that the electronic bubble level is in a first state, and in this state, the first target position is higher than the second target position, and the bubble comes into contact with the side wall;obtaining a first photoelectric signal of the electronic bubble level in the first state, wherein the first photoelectric signal corresponds to a first bubble position of the bubble;controlling the tilt state of the electronic bubble level, so that the electronic bubble level is in a second state, and in this state, the second target position is higher than the first target position, and the bubble comes into contact with the side wall;obtaining a second photoelectric signal of the electronic bubble level in the second state, wherein the second photoelectric signal corresponds to a second bubble position of the bubble;obtaining a third photoelectric signal existing when the electronic bubble level is in a third state, wherein the third photoelectric signal corresponds to a third bubble position of the bubble; andcalibrating a bubble position calculation model of the electronic bubble level based on the first photoelectric signal, the second photoelectric signal, and the third photoelectric signal.2.The calibration method according to claim 1, characterized in that the step of calibrating a bubble position calculation model of the electronic bubble level based on the first photoelectric signal, the second photoelectric signal, and the third photoelectric signal comprises:establishing a first empirical formula for the third bubble position and a difference between the third photoelectric signal and the first photoelectric signal, wherein the first empirical formula has a first parameter;establishing a second empirical formula for the third bubble position and a difference between the third photoelectric signal and the second photoelectric signal, wherein the second empirical formula has a second parameter; andobtaining the first parameter and the second parameter through numerical calculation.3.The calibration method according to claim 2, characterized in that the electronic bubble level has m light-emitting apparatuses and n receiving apparatuses, wherein both m and n are positive integers greater than or equal to 2, the first parameter comprises a first x parameter and a first y parameter, and the first empirical formula is represented by using the following formula: wherein i=1: m indicates a first to an mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates a first to an nth receiving apparatuses in the electronic bubble level; Uij indicates a third photoelectric signal of an ith light-emitting apparatus that is received by a jth receiving apparatus when the bubble is at the third bubble position; Uaij indicates a first photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the first bubble position; x3a represents an x coordinate that is of the third bubble position in a Cartesian coordinate system and that is obtained through calculation by using Uaij as a reference, and y3a represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Uaij as a reference; Kxaij represents the first x parameter; and Kyaij represents the first y parameter.4.The calibration method according to claim 3, characterized in that the electronic bubble level has the m light-emitting apparatuses and the n receiving apparatuses, wherein both m and n are positive integers greater than or equal to 2, the second parameter comprises a second x parameter and a second y parameter, and the second empirical formula is represented by using the following formula: wherein i=1: m indicates the first to the mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates the first to the nth receiving apparatuses in the electronic bubble level; Uij indicates the third photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the third bubble position; Ubij indicates a second photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the second bubble position; x3b represents an x coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Ubij as a reference, and y3b represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Ubij as a reference; Kxbij represents the second x parameter; and Kybij represents the second y parameter.5.The calibration method according to claim 4, characterized by further comprising: performing weighted averaging processing on (x3a, y3a) and (x3b, y3b) to obtain coordinates (x3, y3) used to represent the third bubble position.6.The calibration method according to claim 1, characterized by further comprising: performing weighted averaging processing on the first photoelectric signal and the second photoelectric signal to obtain a photoelectric signal Udij existing when the bubble is located at a center position, and obtaining the third bubble position through calculation by using the following formula: wherein i=1: m indicates a first to an mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates a first to an nth receiving apparatuses in the electronic bubble level; Uij indicates a third photoelectric signal of an ith light-emitting apparatus that is received by a jth receiving apparatus when the bubble is at the third bubble position; x3d represents an x coordinate that is of the third bubble position in a Cartesian coordinate system and that is obtained through calculation by using Udij as a reference, and y3d represents a y coordinate that is of the third bubble position in the Cartesian coordinate system and that is obtained through calculation by using Udij as a reference; Kxdij represents a third x parameter; and Kydij represents a third y parameter.7.The calibration method according to any one of claims 1 to 6, characterized in that the at least two target positions are evenly distributed on a wall circumference of the side wall.8.The calibration method according to any one of claims 1 to 7, characterized in that the first target position and the second target position are symmetrically disposed.9.The calibration method according to any one of claims 1 to 8, characterized by further comprising: obtaining a current position of the bubble through calculation by using the calibrated bubble position calculation model.10.The calibration method according to any one of claims 1 to 9, characterized by further comprising:adjusting the tilt state of the electronic bubble level, so that a bubble position displayed on a display reaches a center position;in this case, obtaining a fourth photoelectric signal of the electronic bubble level, wherein the fourth photoelectric signal corresponds to a center bubble position at which the bubble is located in the center of the electronic bubble level; andobtaining the third bubble position through calculation based on the third photoelectric signal and the fourth photoelectric signal.11.The calibration method according to claim 10, characterized in that the step of obtaining the third bubble position through calculation based on the third photoelectric signal and the fourth photoelectric signal comprises: performing calculation by using the following formula: wherein i=1: m indicates the first to the mth light-emitting apparatuses in the electronic bubble level; j=1: n indicates the first to the nth receiving apparatuses in the electronic bubble level; Uij indicates the third photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the third bubble position; Uoij indicates a fourth photoelectric signal of the ith light-emitting apparatus that is received by the jth receiving apparatus when the bubble is at the center bubble position; x3o represents an x coordinate of the third bubble position in the Cartesian coordinate system, and y3o represents a y coordinate of the third bubble position in the Cartesian coordinate system;Kxoij represents a fourth x parameter; and Kyoij represents a fourth y parameter.12.The calibration method according to claim 4, characterized by further comprising performing confidence level check on a model parameter, wherein the step of performing confidence level check on a model parameter comprises: obtaining a confidence level by checking whether redundant data conflicts with each other, and determining, based on the confidence level, to partially calibrate, fully calibrate, or skip calibrating a model parameter of the bubble position calculation model, wherein the redundant data comprises a photoelectric signal that does not need to participate in calculation of the first parameter and the second parameter.13.The calibration method according to claim 6, characterized by further comprising performing confidence level check on a model parameter, wherein the step of performing confidence level check on a model parameter comprises: obtaining a confidence level by checking whether redundant data conflicts with each other, and determining, based on the confidence level, to partially calibrate, fully calibrate, or skip calibrating a model parameter of the bubble position calculation model, wherein the redundant data comprises a photoelectric signal that does not need to participate in calculation of the third x parameter and the third y parameter.14.The calibration method according to claim 11, characterized by further comprising performing confidence level check on a model parameter, wherein the step of performing confidence level check on a model parameter comprises: obtaining a confidence level by checking whether redundant data conflicts with each other, and determining, based on the confidence level, to partially calibrate, fully calibrate, or skip calibrating a model parameter of the bubble position calculation model, wherein the redundant data comprises a photoelectric signal that does not need to participate in calculation of the fourth x parameter and the fourth y parameter.15.A calibration apparatus for an electronic bubble level, wherein the electronic bubble level has a housing comprising a side wall, wherein a liquid and a bubble are arranged inside the side wall, the side wall of the housing has at least two target positions, and the at least two target positions comprise a first target position and a second target position, characterized in that the apparatus comprises:a memory configured to store instructions executable by a processor;a controller configured to control a tilt state of the electronic bubble level; andthe processor configured to execute the instructions to implement the calibration method according to any one of claims 1 to 14.16.The calibration apparatus according to claim 15, characterized by further comprising a tilt sensor configured to detect a tilt degree of the electronic bubble level, and feed back the tilt degree to the controller, to instruct the controller to control the tilt state of the electronic bubble level.17.The calibration apparatus according to claim 16, characterized in that the tilt sensor comprises a MEMS accelerometer.18.The calibration apparatus according to any one of claim 15 to 17, characterized in that the electronic bubble level is disposed in an electronic device, and the controller is configured to control the tilt state of the electronic bubble level by controlling a tilt state of the electronic device.19.A computer-readable medium storing computer program code, wherein when the computer program code is executed by a processor, a calibration method according to any one of claims 1 to 14 is implemented.