CN114877793B - Electronic equipment, electronic equipment state determining method and related equipment - Google Patents
Electronic equipment, electronic equipment state determining method and related equipment Download PDFInfo
- Publication number
- CN114877793B CN114877793B CN202210522413.0A CN202210522413A CN114877793B CN 114877793 B CN114877793 B CN 114877793B CN 202210522413 A CN202210522413 A CN 202210522413A CN 114877793 B CN114877793 B CN 114877793B
- Authority
- CN
- China
- Prior art keywords
- magnetic field
- value
- target
- threshold
- electronic device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000005358 geomagnetic field Effects 0.000 claims abstract description 16
- 238000001514 detection method Methods 0.000 abstract description 24
- 230000008569 process Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 230000004907 flux Effects 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 4
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000003466 welding Methods 0.000 description 2
- 229910000831 Steel Inorganic materials 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000000696 magnetic material Substances 0.000 description 1
- 230000005389 magnetism Effects 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 230000000149 penetrating effect Effects 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B7/00—Measuring arrangements characterised by the use of electric or magnetic techniques
- G01B7/003—Measuring arrangements characterised by the use of electric or magnetic techniques for measuring position, not involving coordinate determination
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C17/00—Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
- G01C17/02—Magnetic compasses
- G01C17/28—Electromagnetic compasses
- G01C17/32—Electron compasses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
- G06F1/1613—Constructional details or arrangements for portable computers
- G06F1/1633—Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
- G06F1/1684—Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Remote Sensing (AREA)
- Radar, Positioning & Navigation (AREA)
- Human Computer Interaction (AREA)
- Theoretical Computer Science (AREA)
- Electromagnetism (AREA)
- General Engineering & Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Switches That Are Operated By Magnetic Or Electric Fields (AREA)
Abstract
The application discloses an electronic device, a method for determining the state of the electronic device and related devices, wherein the electronic device comprises the following components: the device comprises a shell, a mute control piece, a magnet, a Hall sensor and an electronic compass, wherein a chute is formed in the shell; the mute control part is at least partially arranged in the chute and can move along the chute; the magnet is arranged on the mute control piece and moves along with the mute control piece; the Hall sensor is arranged in the shell and is used for detecting a first magnetic field generated by the magnet; the electronic compass is arranged in the shell and is used for detecting a second magnetic field generated by superposition of the magnet and the geomagnetic field; and detecting the target position of the mute control member according to the first magnetic field and the second magnetic field to determine the target state of the electronic equipment, wherein the target position corresponds to the target state one by one, and the target state comprises a mute state or an unmuted state. In this way, the accuracy of the detection result is improved.
Description
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to electronic equipment, an electronic equipment state determining method and related equipment.
Background
With the development of electronic technology, a mute control for controlling the electronic device to switch between a mute state and an unmuted state is generally disposed on the electronic device, and in the process of implementing the present application, the applicant finds that at least the following problems exist in the prior art: currently, a hall sensor is generally used for detecting the position of a mute control member so as to detect the state of the electronic equipment, but the hall sensor is easily interfered by an external magnetic field, so that the accuracy of a detection result is low.
Disclosure of Invention
The application aims to provide electronic equipment, an electronic equipment state determining method and related equipment, and solves the problem of low accuracy of detection results.
In order to solve the technical problems, the application is realized as follows:
in a first aspect, an embodiment of the present application provides an electronic device, including:
the shell is provided with a chute;
the mute control piece is at least partially arranged in the chute and can move along the chute;
The magnet is arranged on the mute control member and moves along with the mute control member;
The Hall sensor is arranged in the shell and is used for detecting a first magnetic field generated by the magnet;
The electronic compass is arranged in the shell and is used for detecting a second magnetic field generated by superposition of the magnet and the geomagnetic field;
and detecting the target position of the mute control member according to the first magnetic field and the second magnetic field to determine the target state of the electronic equipment, wherein the target position corresponds to the target state one by one, and the target state comprises a mute state or an unmuted state.
In a second aspect, an embodiment of the present application proposes a method for determining a state of an electronic device, which is applied to the electronic device in the first aspect, where the method includes:
Acquiring a first magnetic field and a second magnetic field;
and detecting target positions of mute control parts included in the electronic equipment according to the first magnetic field and the second magnetic field to determine target states of the electronic equipment, wherein the target positions correspond to the target states one by one, and the target states comprise mute states or non-mute states.
In a third aspect, an embodiment of the present application provides an electronic device state determining apparatus, which is applied to the electronic device in the first aspect, where the electronic device state determining apparatus includes:
the acquisition module is used for acquiring the first magnetic field and the second magnetic field;
And the determining module is used for detecting the target position of the mute control element included in the electronic equipment according to the first magnetic field and the second magnetic field so as to determine the target state of the electronic equipment, wherein the target position corresponds to the target state one by one, and the target state comprises a mute state or an unmuted state.
In a fourth aspect, an embodiment of the present application proposes an electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions implementing the steps of the method according to the second aspect when executed by the processor.
In a fifth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps of the method according to the second aspect.
In a sixth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the second aspect.
In an embodiment of the present application, an electronic apparatus includes: the device comprises a shell, a mute control piece, a magnet, a Hall sensor and an electronic compass, wherein a chute is formed in the shell; the mute control part is at least partially arranged in the chute and can move along the chute; the magnet is arranged on the mute control piece and moves along with the mute control piece; the Hall sensor is arranged in the shell and is used for detecting a first magnetic field generated by the magnet; the electronic compass is arranged in the shell and is used for detecting a second magnetic field generated by superposition of the magnet and the geomagnetic field; and detecting the target position of the mute control member according to the first magnetic field and the second magnetic field to determine the target state of the electronic equipment, wherein the target position corresponds to the target state one by one, and the target state comprises a mute state or an unmuted state.
Therefore, the target position of the mute control element can be detected by detecting the first magnetic field and the second magnetic field so as to determine the target state of the electronic equipment, the interference of the external magnetic field on the detection result of the target state of the electronic equipment can be reduced, and the accuracy of the detection result is improved.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of magnetic field detection of a Hall sensor and an electronic compass of an electronic device according to an embodiment of the present application;
FIG. 3 is a flow chart of a method of determining a status of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device state determining apparatus according to an embodiment of the present application;
FIG. 5 is a second schematic diagram of an electronic device according to an embodiment of the application;
Fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements throughout or elements having like or similar functionality. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where, as shown in fig. 1, the electronic device includes:
the shell 10, the said shell 10 has slide grooves 11;
A mute control member 20, wherein the mute control member 20 is at least partially disposed in the chute 11 and is movable along the chute 11;
A magnet 21, the magnet 21 being disposed on the mute control member 20 and moving with the mute control member 20;
a hall sensor 30, wherein the hall sensor 30 is disposed in the housing 10, and is used for detecting the first magnetic field generated by the magnet 21;
An electronic compass 40, wherein the electronic compass 40 is disposed in the housing 10, and is used for detecting a second magnetic field generated by superposition of the magnet 21 and the geomagnetic field;
Wherein, the target position of the mute control 20 is detected according to the first magnetic field and the second magnetic field to determine the target state of the electronic device, the target position corresponds to the target state one by one, and the target state includes a mute state or an un-mute state.
The working principle of the embodiment of the application can be seen in the following expression:
by detecting the first magnetic field and the second magnetic field, the target position of the mute control member 20 can be detected to determine the target state of the electronic device, and compared with the direction of detecting the state of the electronic device by only adopting the hall sensor 30, the embodiment can reduce the interference of the external magnetic field on the detection result of the target state of the electronic device, thereby improving the accuracy of the detection result.
Referring to fig. 2, fig. 2 shows that the hall sensor 30 may detect the magnetic field of the magnet 21 to obtain a first magnetic field, and the electronic compass 40 may detect the magnetic field generated by the magnet 21 and the magnetic field generated by the superposition of the geomagnetic fields to obtain a second magnetic field.
It should be noted that, the electronic compass 40 may also be referred to as a digital compass, and the electronic compass 40 may be used for detecting a geomagnetic field for navigation or gesture detection, so that by simultaneously providing the electronic device and the hall sensor 30 on the electronic device, the accuracy of the detection result of the state of the electronic device is increased, and meanwhile, the diversity of functions that the electronic device can realize is increased. Compared with the mode of arranging a plurality of Hall sensors 30, the method can increase the functions of the electronic equipment, reduce the layout difficulty, the whole stacking difficulty and the cost of the printed circuit board of the electronic equipment, and reduce the requirements of structural tolerance.
The first magnetic field and the second magnetic field corresponding to each position of the mute control member 20 may be detected in advance, and a correspondence between the first magnetic field and the second magnetic field detected at each position of the mute control member 20 and the state of the electronic device may be preset, where the correspondence may be stored in the electronic device or on the server, so when the hall sensor 30 detects the first magnetic field and the electronic compass 40 detects the second magnetic field, the position of the current mute control member 20 may be accurately determined according to the correspondence, and the state of the electronic device may be determined according to the position.
For example: when the mute control member 20 is located at a position in the chute 11 near the hall sensor 30, the detected first magnetic field is a first value, the detected second magnetic field is a second value, and the electronic device is in a non-mute state; when the mute control member 20 is located in the chute 11 near the electronic compass 40, the first magnetic field detected at this time is a third value, the second magnetic field detected is a fourth value, and the electronic device is in a mute state. The above correspondence may be stored in the electronic device or in the server in advance, so that when the value of the first magnetic field detected by the electronic device through the hall sensor 30 at the target moment is the first value and the second magnetic field detected by the electronic compass 40 is the second value, the position of the mute control member 20 in the chute 11 near the hall sensor 30 can be quickly and accurately determined according to the above correspondence, and the electronic device is in the non-mute state.
The mute control member 20 may at least partially protrude out of the chute 11, so that a user can conveniently press and push the mute control member 20 to move along the chute 11 to control the state of the electronic device to switch.
Wherein, magnet 21 and silence control 20 can fixed connection, for example: the magnet 21 and the mute control member 20 may be fixedly connected by welding, bonding, or clamping.
In addition, the magnet 21 and the mute control member 20 may be integrally formed, and at this time, the magnet 21 may be understood as a part of the mute control member 20, i.e. the mute control member 20 may be made of a magnetic material, so as to enhance the connection strength between the magnet 21 and the mute control member 20, reduce the volume of the electronic device, and enhance the magnetism of the magnet 21.
It should be noted that the position where the mute control member 20 can move in the chute 11 is not limited herein, for example: the mute control member 20 moves among a plurality of preset sliding positions in the chute 11, each preset sliding position can correspond to a state of one electronic device, and the states of the electronic devices corresponding to each preset sliding position can be different, so that the electronic devices can be controlled to switch among a plurality of different states through the movement of the mute control member 20 among the plurality of preset sliding positions, and the switching effect of the states of the electronic devices is improved.
As an alternative embodiment, the target position includes a first position and a second position, when the mute control member 20 is in the first position, the projection of the magnet 21 on the surface of the housing 10 coincides with the projection of the hall sensor 30 on the surface of the housing 10, and when the mute control member 20 is in the second position, the projection of the magnet 21 on the surface of the housing 10 is offset from the projection of the hall sensor 30 on the surface of the housing 10.
Wherein the first position may be referred to as a position within the chute 11 near the hall sensor 30 and the second position may be referred to as a position away from the hall sensor 30.
The projection of the magnet 21 onto the surface of the housing 10 is understood to be the front projection of the magnet 21 onto the surface of the housing 10, and likewise the projection of the hall sensor 30 onto the surface of the housing 10 is understood to be the front projection of the hall sensor 30 onto the surface of the housing 10.
The surface of the housing 10 described above may refer to the surface of the housing 10 facing the mute control member 20 and the hall sensor 30.
In the embodiment of the present invention, when the mute control member 20 is located at the first position, the projection of the magnet 21 on the surface of the housing 10 coincides with the projection of the hall sensor 30 on the surface of the housing 10, so that the hall sensor 30 can be ensured to detect the maximum magnetic flux of the magnet 21, and the accuracy of the detected first magnetic field is high.
As an alternative embodiment, when the mute control 20 is in the second position, the projection of the magnet 21 on the surface of the housing 10 is also offset from the projection of the electronic compass 40 on the surface of the housing 10, that is to say: the projection of the magnet 21 onto the surface of the housing 10 is offset from the projection of the hall sensor 30 onto the surface of the housing 10 and the projection of the electronic compass 40 onto the surface of the housing 10, respectively.
In this way, compared with the manner in which the projection of the magnet 21 on the surface of the housing 10 coincides with the projection of the electronic compass 40 on the surface of the housing 10 when the mute control member 20 is in the second position, the present embodiment can avoid the magnetic flux of the magnet 21 detected by the electronic compass 40 from being too large, resulting in the occurrence of the phenomenon that the electronic compass 40 is full-scale, and thus, the reading of the electronic compass 40 is inaccurate, that is, the pointer of the electronic compass 40 is always located within the range, thereby improving the accuracy of the second magnetic field detected by the electronic compass 40.
As an alternative embodiment, the hall sensor 30 and the electronic compass 40 are spaced apart, and when the mute control member 20 is located at the second position, the orthographic projection position of the magnet 21 on the target plane is located at a position between the hall sensor 30 and the electronic compass 40, and the target plane is a plane in which the hall sensor 30 and the electronic compass 40 are located.
The orthographic projection position of the magnet 21 on the target plane may be located at a midpoint of a line between the hall sensor 30 and the electronic compass 40.
In this way, the magnetic flux of the magnet 21 detected by the electronic compass 40 is further prevented from being too large, so that the electronic compass 40 is full-scale, and the phenomenon of inaccurate reading of the electronic compass 40 is further avoided, namely, the pointer of the electronic compass 40 is always located within the range of the range, so that the accuracy of the second magnetic field detected by the electronic compass 40 is improved.
It should be noted that, in the above embodiment, it is understood that the electronic compass 40 may be located at a position other than the position where the movement of the mute control member 20 is formed, so that the phenomenon of full range of the electronic compass 40 may be avoided.
Note that the specific structure of the mute control member 20 is not limited herein.
As an alternative embodiment, referring to fig. 1, the electronic device further includes a slider 22, a first surface of the slider 22 is fixedly connected with the mute control member 20, the magnet 21 is disposed on a second surface of the slider 22, the second surface is a surface facing the hall sensor 30 and the electronic compass 40, and the first surface and the second surface are opposite surfaces.
The sliding block 22 and the mute control member 20 may be fixedly connected by clamping, welding or bonding. For example: the sliding block 22 can be said to be provided with a protruding portion, the mute control member 20 is provided with a through hole, and the protruding portion can be arranged in the through hole in a penetrating manner and in interference fit with the inner wall of the through hole, so that the sliding block 22 and the mute control member 20 can be fixedly connected.
In addition, referring to fig. 1, a fixing frame 23 may also be disposed on the slider 22, and the mute control member 20 may be disposed in the fixing frame 23, so as to achieve a fixed connection between the slider 22 and the mute control member 20.
In the embodiment of the application, the sliding block 22 is arranged, and the sliding block 22 can be all arranged in the sliding groove 11, so that the sliding block 22 is driven to slide by the mute control piece 20, and then the magnet 21 is driven to slide, the effect that the mute control piece 20 drives the magnet 21 to slide is enhanced, and meanwhile, the magnet 21 can be arranged on the surface of the sliding block 22 facing the Hall sensor 30 and the electronic compass 40, so that the magnetic flux detected by the Hall sensor 30 and the electronic compass 40 is larger, and the detection effect of the Hall sensor 30 and the electronic compass 40 on the magnetic field is better.
It should be noted that, in order to enhance the sliding effect of the sliding block 22, a sliding rail may be disposed on the inner wall of the sliding slot 11, and the sliding block 22 may slide along the sliding rail, so as to reduce the resistance applied when the sliding block 22 slides, and further enhance the sliding effect of the sliding block 22.
As an alternative embodiment, referring to fig. 1, a carrier plate 12 is disposed in the housing 10, the hall sensor 30 and the electronic compass 40 are both disposed on the carrier plate 12, the electronic device further includes a reset element 50, one end of the reset element 50 is fixedly connected with the second surface, and the other end of the reset element 50 is fixedly connected with the carrier plate 12.
The carrier plate 12 may be referred to as a middle frame or a back plate, and various components may be disposed on the carrier plate 12, for example: the carrier plate 12 may be provided with a printed circuit board, which may also be referred to as a motherboard of the electronic device.
The specific type of the reset element 50 is not limited herein, for example: the return member 50 may be a spring, rubber or memory metal member or the like.
In the embodiment of the application, the reset piece 50 is arranged, so that the slider 22 can be driven to reset (namely, move to the position before the state switching of the electronic equipment) under the driving of the reset piece 50, namely, the automatic reset of the slider 22 can be realized, the intelligent degree of the reset is enhanced, the slider 22 is not required to be manually controlled by a user to reset, and the user experience is enhanced.
It should be noted that, when the preset condition is satisfied, the reset element 50 may drive the slider 22 to reset, and the specific content of the preset condition is not limited herein, for example: the preset condition may include at least one of: when the duration of the electronic equipment in the current state exceeds the preset duration, when the number of face images of the environment where the electronic equipment is detected to be smaller than the preset number, and when the audio playing application program or the video playing application program on the electronic equipment is detected to be started, the electronic equipment is started.
As an alternative embodiment, referring to fig. 1, the electronic device further includes a limiting member 60, and the reset member 50 is fixedly connected to the second surface through the limiting member 60.
The specific structure of the limiting member 60 is not limited herein, for example: the limiting member 60 may be a limiting steel ball or a limiting rod.
In the embodiment of the present application, the limiting member 60 can limit the sliding block 22, so as to avoid the phenomenon that the mute control member 20 exceeds the sliding slot 11 when sliding, and simultaneously, avoid the phenomenon that the mute control member 20 exceeds the preset position to cause the full range of the electronic compass 40, thereby enhancing the accuracy and reliability of the detection result of the electronic compass 40 on the magnetic field.
In the embodiment of the application, the target position of the mute control member 20 can be detected by detecting the first magnetic field and the second magnetic field to determine the target state of the electronic device, so that the interference of the external magnetic field on the detection result of the target state of the electronic device can be reduced, and the accuracy of the detection result can be further improved.
Referring to fig. 3, fig. 3 is a schematic diagram of a method for determining a state of an electronic device according to an embodiment of the present application, which is applied to the electronic device in the foregoing embodiment, as shown in fig. 3, and includes:
step 301, acquiring a first magnetic field and a second magnetic field.
The first magnetic field and the second magnetic field may refer to the relevant expressions in the above embodiments, and are not described herein in detail.
Step 302, detecting a target position of a mute control element included in the electronic device according to the first magnetic field and the second magnetic field, so as to determine a target state of the electronic device, wherein the target position corresponds to the target state one by one, and the target state includes a mute state or an unmuted state.
The target position and the target state may be referred to the relevant expressions in the above embodiments, and will not be described herein.
As an alternative embodiment, the target position includes a first position and a second position, when the mute control member is located at the first position, the projection of the magnet 21 on the surface of the housing 10 included in the electronic device coincides with the projection of the hall sensor 30 on the surface of the housing 10, and when the mute control member is located at the second position, the projection of the magnet 21 on the surface of the housing 10 is offset from the projection of the hall sensor 30 on the surface of the housing 10;
The detecting a target position of a mute control included in the electronic device according to the first magnetic field and the second magnetic field to determine a target state of the electronic device includes:
When the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is larger than a first geomagnetic threshold, and the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is smaller than the second geomagnetic threshold, and the value of the first magnetic field is larger than the first threshold, determining that the mute control is located at the first position so as to determine that the electronic equipment is in a non-mute state;
And determining that the mute control is positioned at the second position under the condition that the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is larger than the first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is smaller than the second geomagnetic threshold and the value of the first magnetic field is smaller than the second threshold so as to determine that the electronic equipment is in a mute state.
The value of the second magnetic field may be represented by H D, the value of the first magnetic field may be represented by H B, the first superimposed magnetic field threshold may be represented by H 1D, H 1D is a standard value detected by the electronic compass 40 when the mute control is located at the first position and the electronic device is in the non-mute state, the second superimposed magnetic field threshold may be represented by H 2D, and H 2D is a standard value detected by the electronic compass 40 when the mute control is located at the second position and the electronic device is in the mute state.
In addition, the first geomagnetic threshold may be represented by H geomagnetism (Earth) 1, H geomagnetism (Earth) 1 may represent that the mute control is located at the first position, and when the electronic device is in the non-mute state, the standard value of geomagnetism detected by the electronic compass 40, the second geomagnetic threshold may be represented by H geomagnetism (Earth) 2, and H geomagnetism (Earth) 2 may represent that the mute control is located at the second position, and when the electronic device is in the mute state, the standard value of geomagnetism detected by the electronic compass 40.
In addition, the first threshold may be represented by H b, where H b is a standard value detected by the hall sensor 30 when the mute control is located at the first position and the electronic device is in the non-mute state; the second threshold may be denoted by H a, where H a is a standard value detected by the hall sensor 30 when the mute control is in the second position and the electronic device is in the mute state, and the first threshold may be greater than the second threshold.
According to the embodiment of the application, the position of the mute control element can be accurately and quickly determined by the mode, so that the state of the electronic equipment can be determined.
As another alternative embodiment, the first superimposed magnetic field is the product of a predicted ground magnetic value and a first coefficient, and the second superimposed magnetic field is the product of the predicted ground magnetic value and a second coefficient, the first coefficient being greater than the second coefficient. In this way, the flexibility of the determination modes of the first superimposed magnetic field and the second superimposed magnetic field can be further enhanced by adjusting the values of the first coefficient and the second coefficient, and the accuracy and the flexibility of the detection results of the values of the first magnetic field and the second magnetic field can be further enhanced.
The predicted geomagnetic value may be represented by H geomagnetism (Earth) , and since the electronic compass 40 and the hall sensor 30 are both disposed on the electronic device, the two positions may be considered to be the same position, and the values of the geomagnetic fields of the two positions may be the predicted geomagnetic value, that is, the detected geomagnetic values of the two positions are the same. The predicted geomagnetic value may be represented by H geomagnetism (Earth) , the first coefficient may be represented by x, the second coefficient may be represented by y, and x is greater than y. That is to say: h geomagnetism (Earth) 1=x*H geomagnetism (Earth) ;H geomagnetism (Earth) 2=y*H geomagnetism (Earth) .
Therefore, the purpose of adjusting the values of the first superimposed magnetic field and the second superimposed magnetic field is achieved by adjusting the values of the first coefficient and the second coefficient, and the determination mode of the values of the first superimposed magnetic field and the second superimposed magnetic field is more flexible.
It should be noted that, when the mute control member moves between the first position and the second position, the value of the first magnetic field and the value of the second magnetic field also change dynamically, and the value of the first magnetic field and the value of the second magnetic field can be simply understood as a negative correlation, that is, when the value of the first magnetic field becomes larger, the value of the second magnetic field becomes smaller, and when the value of the first magnetic field becomes smaller, the value of the second magnetic field becomes larger.
In this way, the position of the mute control can also be determined by detecting the trend of the variation of the values of the first magnetic field and the second magnetic field. In the above embodiment, the moving direction and the moving trend of the mute control member may be detected by detecting the value of the first magnetic field and the value of the second magnetic field multiple times, and according to the changing trend of the value of the first magnetic field and the value of the second magnetic field, the position of the mute control member and the state of the electronic device may be determined, so that the accuracy of the detection result of the state of the electronic device may be further enhanced.
As an alternative embodiment, this embodiment differs from the above-described embodiment in that: when the mute control is in the first position, the electronic device may be determined to be in a mute state; when the mute control member is at the second position, the electronic equipment can be determined to be in a non-mute state, so that the state of the electronic equipment corresponding to the first position and the second position can be exchanged, and the diversity and the flexibility of the state detection mode of the electronic equipment are further enhanced.
As an alternative embodiment, the method further comprises:
Displaying a first prompt message for prompting to calibrate at least one of the first superimposed magnetic field threshold value, the second superimposed magnetic field threshold value, the first threshold value and the second threshold value under the condition that the first magnetic field and the second magnetic field meet a first preset condition or a second preset condition;
wherein the first preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is smaller than or equal to a first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is larger than or equal to a second geomagnetic threshold, and the value of the first magnetic field is smaller than or equal to a first threshold;
The second preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is smaller than or equal to the first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is larger than or equal to the second geomagnetic threshold, and the value of the first magnetic field is larger than or equal to the second threshold.
In the embodiment of the application, the first prompt message is displayed when the first magnetic field and the second magnetic field meet the first preset condition or the second preset condition, at this time, the numerical value of at least one of the first superimposed magnetic field threshold value, the second superimposed magnetic field threshold value, the first threshold value and the second threshold value can be considered unreasonable, and the user can be prompted to calibrate the numerical value and then re-detect the numerical value, so that the occurrence of misjudgment is reduced, and the accuracy of the detection result is further improved.
It should be noted that, for a specific process of calibrating the above values, reference may be made to the following expression: the mute control can be slid to a certain position (e.g., a third position or a fourth position) at which time the values detected by the electronic compass 40 and the hall sensor 30 can be recorded, and the detected values are determined as corresponding thresholds.
For example: as an alternative embodiment, the method further comprises:
the mute control piece is controlled to be positioned at a third position, a first target magnetic field generated by the magnet is detected by the Hall sensor, and a second target magnetic field generated by superposition of the magnet and the geomagnetic field is detected by the electronic compass;
Determining the first target magnetic field as the first threshold value and the second target magnetic field as the first superimposed magnetic field;
the mute control piece is controlled to be located at a fourth position, a third target magnetic field generated by the magnet is detected by the Hall sensor, and a fourth target magnetic field generated by superposition of the magnet and the geomagnetic field is detected by the electronic compass;
determining the third target magnetic field as the second threshold value and the fourth target magnetic field as the second superimposed magnetic field;
Wherein the third position is located between the first position and the second position and is close to the first position, and the fourth position is located between the third position and the second position and is close to the second position.
In this way, the position of the mute control member is adjusted, and then the corresponding threshold value is corrected according to the magnetic fields detected by the Hall sensor and the electronic compass at different positions, so that when the threshold value is in error, the correction can be performed, and the accuracy of the threshold value is improved.
As another alternative embodiment, the method further comprises:
And displaying a second prompt message under the condition that the value of the first magnetic field is larger than a second threshold value and smaller than the first threshold value, wherein the second prompt message is used for indicating that the second magnetic field is interfered by the outside.
In the embodiment of the application, when the value of the first magnetic field is larger than the second threshold and smaller than the first threshold, the second prompting message is displayed, and the second prompting message is used for indicating that the second magnetic field is interfered by the outside, and the accuracy of the detection result is lower, so that a user can determine the state of the electronic equipment in other modes.
For example: the value of the first magnetic field detected at the first moment is greater than the second threshold and less than the first threshold, and the state of the electronic device detected at the second moment may be determined as the state of the electronic device at the first moment, where the second moment may be the moment corresponding to the state of the electronic device detected last time before the first moment.
In the embodiment of the present application, by detecting the first magnetic field and the second magnetic field in steps 301 to 302, the target position of the mute control element can be detected, so as to determine the target state of the electronic device, and the interference of the external magnetic field on the detection result of the target state of the electronic device can be reduced, thereby improving the accuracy of the detection result.
For example: each of the above embodiments is illustrated below in one specific example.
① When (|h D-H1D|>x*H geomagnetism (Earth) )&(|HD-H2D|<y*H geomagnetism (Earth) ), and H B>Hb, both the hall sensor 30 and the electronic compass 40 determine that the mute control is in state 1.
② When (|h D-H2D|>x*H geomagnetism (Earth) )&(|HD-H1D|<y*H geomagnetism (Earth) ) and H B<Ha), both the hall sensor 30 and the electronic compass 40 determine that the mute control is in state 2.
It should be noted that, the state 1 may be one of a mute state and an unmute state, and the state 2 may be the other of the mute state and the unmute state.
③ When H D does not meet at least one of (|h D-H1D|>x*H geomagnetism (Earth) )&(|HD-H2D|<y*H geomagnetism (Earth) ) and (|h D-H2D|>x*H geomagnetism (Earth) )&(|HD-H1D|<y*H geomagnetism (Earth) ), the electronic device displays a first prompting message for prompting the user to calibrate the mute key and the electronic compass 40 to calibrate the thresholds.
④ When H a<HB<Hb, the state of the mute control is unchanged, as is the state detected at the previous time. A second prompting message for prompting that the electronic compass 40 may be subject to external disturbance may be displayed at this time.
In the embodiment of the present application, the electronic device may be a Mobile phone, a tablet Computer (Tablet Personal Computer), a Laptop (Laptop Computer), a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA for short), a Mobile internet device (Mobile INTERNET DEVICE, MID), or a wearable device (Wearable Device), etc.
It should be noted that, in the method for determining the state of the electronic device according to the embodiment of the present application, the execution body may be an electronic device state determining apparatus, or a control module in the electronic device state determining apparatus for executing the method for determining the state of the electronic device. In the embodiment of the present application, an electronic device state determining device executes an electronic device state determining method as an example, and the electronic device state determining device provided in the embodiment of the present application is described.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device state determining apparatus according to an embodiment of the present application, which is applied to the above electronic device, where the electronic device state determining apparatus 400 includes:
an acquisition module 401 for acquiring a first magnetic field and a second magnetic field;
The determining module 402 is configured to detect, according to the first magnetic field and the second magnetic field, a target position of a mute control element included in the electronic device, so as to determine a target state of the electronic device, where the target position corresponds to the target state one by one, and the target state includes a mute state or an unmuted state.
Optionally, the target position includes a first position and a second position, when the mute control member is located at the first position, the projection of the magnet on the surface of the housing coincides with the projection of the hall sensor on the surface of the housing, and when the mute control member is located at the second position, the projection of the magnet on the surface of the housing and the projection of the hall sensor on the surface of the housing are arranged in a staggered manner;
The determining module 402 includes:
A first determining submodule, configured to determine that the mute control is located at the first position to determine that the electronic device is in a non-mute state when an absolute value of a difference between the value of the second magnetic field and the first superimposed magnetic field threshold is greater than a first geomagnetic threshold, the absolute value of the difference between the value of the second magnetic field and the second superimposed magnetic field threshold is less than a second geomagnetic threshold, and the value of the first magnetic field is greater than a first threshold;
And the second determining submodule is used for determining that the mute control piece is positioned at the second position under the condition that the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is larger than the first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is smaller than the second geomagnetic threshold and the value of the first magnetic field is smaller than the second threshold so as to determine that the electronic equipment is in a mute state.
Optionally, the determining module 402 further includes:
a first display sub-module, configured to display a first prompting message when the first magnetic field and the second magnetic field meet a first preset condition or a second preset condition, where the first prompting message is used to prompt to calibrate at least one of the first superimposed magnetic field threshold value, the second superimposed magnetic field threshold value, the first threshold value and the second threshold value;
wherein the first preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is smaller than or equal to a first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is larger than or equal to a second geomagnetic threshold, and the value of the first magnetic field is smaller than or equal to a first threshold;
The second preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is smaller than or equal to the first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is larger than or equal to the second geomagnetic threshold, and the value of the first magnetic field is larger than or equal to the second threshold.
Optionally, the determining module 402 further includes:
The second display sub-module is used for displaying a second prompt message when the value of the first magnetic field is larger than a second threshold value and smaller than the first threshold value, and the second prompt message is used for indicating that the second magnetic field is interfered by the outside.
Optionally, the determining module 402 further includes:
The first control sub-module is used for controlling the mute control element to be positioned at a third position, acquiring a first target magnetic field generated by the magnet and detected by the Hall sensor, and acquiring a second target magnetic field generated by the magnet and geomagnetic field superposition and detected by the electronic compass;
A third determining sub-module for determining the first target magnetic field as the first threshold value and the second target magnetic field as the first superimposed magnetic field;
the second control sub-module is used for controlling the mute control element to be positioned at a fourth position, acquiring a third target magnetic field generated by the magnet and detected by the Hall sensor, and acquiring a fourth target magnetic field generated by the superposition of the magnet and the geomagnetic field and detected by the electronic compass;
A fourth determination submodule configured to determine the third target magnetic field as the second threshold value and determine the fourth target magnetic field as the second superimposed magnetic field;
Wherein the third position is located between the first position and the second position and is close to the first position, and the fourth position is located between the third position and the second position and is close to the second position.
The electronic device state determining device in the embodiment of the application can be a device, and can also be a component, an integrated circuit or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), etc., and the non-mobile electronic device may be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a Television (TV), a teller machine, a self-service machine, etc., and the embodiments of the present application are not limited in particular.
The electronic device state determining device in the embodiment of the application may be a device having an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The electronic device state determining apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiment of fig. 3, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 5, an embodiment of the present application further provides an electronic device 500, including a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and capable of being executed on the processor 501, where the program or the instruction implements each process of the embodiment of the method for determining a state of an electronic device when executed by the processor 501, and the process can achieve the same technical effect, and for avoiding repetition, a description is omitted herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 600 includes, but is not limited to: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.
Those skilled in the art will appreciate that the electronic device 600 may further include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 610 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the processor 610 is configured to acquire a first magnetic field and a second magnetic field; and detecting target positions of mute control parts included in the electronic equipment according to the first magnetic field and the second magnetic field to determine target states of the electronic equipment, wherein the target positions correspond to the target states one by one, and the target states comprise mute states or non-mute states.
Optionally, the target position includes a first position and a second position, when the mute control is located at the first position, a projection of the magnet on the surface of the housing of the electronic device coincides with a projection of the hall sensor on the surface of the housing, and when the mute control is located at the second position, the projection of the magnet on the surface of the housing is offset from the projection of the hall sensor on the surface of the housing;
The processor 610, executing the detecting a target position of a mute control included in the electronic device based on the first magnetic field and the second magnetic field, to determine a target state of the electronic device, includes:
When the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is larger than a first geomagnetic threshold, and the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is smaller than the second geomagnetic threshold, and the value of the first magnetic field is larger than the first threshold, determining that the mute control is located at the first position so as to determine that the electronic equipment is in a non-mute state;
And determining that the mute control is positioned at the second position under the condition that the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is larger than the first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is smaller than the second geomagnetic threshold and the value of the first magnetic field is smaller than the second threshold so as to determine that the electronic equipment is in a mute state.
Optionally, the processor 610 is further configured to:
Displaying a first prompt message for prompting to calibrate at least one of the first superimposed magnetic field threshold value, the second superimposed magnetic field threshold value, the first threshold value and the second threshold value under the condition that the first magnetic field and the second magnetic field meet a first preset condition or a second preset condition;
wherein the first preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is smaller than or equal to a first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is larger than or equal to a second geomagnetic threshold, and the value of the first magnetic field is smaller than or equal to a first threshold;
The second preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is smaller than or equal to the first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is larger than or equal to the second geomagnetic threshold, and the value of the first magnetic field is larger than or equal to the second threshold.
Optionally, the processor 610 is further configured to: and displaying a second prompt message under the condition that the value of the first magnetic field is larger than a second threshold value and smaller than the first threshold value, wherein the second prompt message is used for indicating that the second magnetic field is interfered by the outside.
Optionally, the first superimposed magnetic field is a product of a predicted ground magnetic value and a first coefficient, and the second superimposed magnetic field is a product of the predicted ground magnetic value and a second coefficient, and the first coefficient is greater than the second coefficient.
Optionally, the processor 610 is further configured to:
the mute control piece is controlled to be positioned at a third position, a first target magnetic field generated by the magnet is detected by the Hall sensor, and a second target magnetic field generated by superposition of the magnet and the geomagnetic field is detected by the electronic compass;
Determining the first target magnetic field as the first threshold value and the second target magnetic field as the first superimposed magnetic field;
the mute control piece is controlled to be located at a fourth position, a third target magnetic field generated by the magnet is detected by the Hall sensor, and a fourth target magnetic field generated by superposition of the magnet and the geomagnetic field is detected by the electronic compass;
determining the third target magnetic field as the second threshold value and the fourth target magnetic field as the second superimposed magnetic field;
Wherein the third position is located between the first position and the second position and is close to the first position, and the fourth position is located between the third position and the second position and is close to the second position.
In the embodiment of the application, the target position of the mute control element can be detected by detecting the first magnetic field and the second magnetic field so as to determine the target state of the electronic equipment, and the interference of the external magnetic field on the detection result of the target state of the electronic equipment can be reduced so as to improve the accuracy of the detection result.
It should be appreciated that in embodiments of the present application, the input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, with the graphics processor 6041 processing image data of still pictures or video obtained by an image capturing apparatus (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein. The memory 609 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 610 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements each process of the above embodiment of the method for determining the state of an electronic device, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the application further provides a chip, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the embodiment of the method for determining the state of the electronic equipment are realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.
In the description of the present specification, reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Claims (13)
1. An electronic device, comprising:
the shell is provided with a chute;
the mute control piece is at least partially arranged in the chute and can move along the chute;
The magnet is arranged on the mute control member and moves along with the mute control member;
The Hall sensor is arranged in the shell and is used for detecting a first magnetic field generated by the magnet;
The electronic compass is arranged in the shell and is used for detecting a second magnetic field generated by superposition of the magnet and the geomagnetic field;
Detecting target positions of the mute control parts according to the first magnetic field and the second magnetic field to determine target states of the electronic equipment, wherein the target positions correspond to the target states one by one, and the target states comprise mute states or non-mute states;
The target position comprises a first position and a second position, the first position is a position of the chute close to the Hall sensor, and the second position is a position far away from the Hall sensor;
When the mute control part is positioned at the second position, the projection of the magnet on the surface of the shell is also staggered with the projection of the electronic compass on the surface of the shell;
The Hall sensor is arranged at intervals with the electronic compass, when the mute control piece is positioned at the second position, the orthographic projection position of the magnet on the target plane is positioned between the Hall sensor and the electronic compass, and the target plane is the plane where the Hall sensor and the electronic compass are positioned.
2. The electronic device of claim 1, wherein a projection of the magnet onto the surface of the housing coincides with a projection of the hall sensor onto the surface of the housing when the mute control is in the first position, and wherein a projection of the magnet onto the surface of the housing is offset from a projection of the hall sensor onto the surface of the housing when the mute control is in the second position.
3. The electronic device of any one of claims 1-2, further comprising a slider having a first surface fixedly connected to the mute control member, the magnet being disposed on a second surface of the slider, the second surface being a surface facing the hall sensor and the electronic compass, the first surface and the second surface being oppositely disposed surfaces.
4. The electronic device of claim 3, wherein a carrier plate is disposed in the housing, the hall sensor and the electronic compass are both disposed on the carrier plate, the electronic device further comprises a reset member, one end of the reset member is fixedly connected with the second surface, and the other end of the reset member is fixedly connected with the carrier plate.
5. The electronic device of claim 4, further comprising a stop member, wherein the reset member is fixedly coupled to the second surface via the stop member.
6.A method of determining a status of an electronic device, applied to the electronic device of any one of claims 1 to 5, the method comprising:
Acquiring a first magnetic field and a second magnetic field;
and detecting target positions of mute control parts included in the electronic equipment according to the first magnetic field and the second magnetic field to determine target states of the electronic equipment, wherein the target positions correspond to the target states one by one, and the target states comprise mute states or non-mute states.
7. The method of claim 6, wherein the target position comprises a first position and a second position, wherein when the mute control is in the first position, a projection of the magnet on a surface of a housing included in the electronic device coincides with a projection of the hall sensor on the surface of the housing, and wherein when the mute control is in the second position, the projection of the magnet on the surface of the housing is offset from the projection of the hall sensor on the surface of the housing;
The detecting a target position of a mute control included in the electronic device according to the first magnetic field and the second magnetic field to determine a target state of the electronic device includes:
When the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is larger than a first geomagnetic threshold, and the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is smaller than the second geomagnetic threshold, and the value of the first magnetic field is larger than the first threshold, determining that the mute control is located at the first position so as to determine that the electronic equipment is in a non-mute state;
determining that the mute control is located at the second position to determine that the electronic device is in a mute state when the absolute value of the difference between the value of the second magnetic field and the second superimposed magnetic field threshold is greater than the first geomagnetic threshold, the absolute value of the difference between the value of the second magnetic field and the first superimposed magnetic field threshold is less than the second geomagnetic threshold, and the value of the first magnetic field is less than the second threshold;
The first superimposed magnetic field is the product of a predicted ground magnetic value and a first coefficient, and the second superimposed magnetic field is the product of the predicted ground magnetic value and a second coefficient, and the first coefficient is larger than the second coefficient.
8. The method of claim 7, wherein the method further comprises:
Displaying a first prompt message for prompting to calibrate at least one of the first superimposed magnetic field threshold value, the second superimposed magnetic field threshold value, the first threshold value and the second threshold value under the condition that the first magnetic field and the second magnetic field meet a first preset condition or a second preset condition;
wherein the first preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is smaller than or equal to a first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is larger than or equal to a second geomagnetic threshold, and the value of the first magnetic field is smaller than or equal to a first threshold;
The second preset condition includes at least one of the following conditions: the absolute value of the difference value between the value of the second magnetic field and the second superimposed magnetic field threshold is smaller than or equal to the first geomagnetic threshold, the absolute value of the difference value between the value of the second magnetic field and the first superimposed magnetic field threshold is larger than or equal to the second geomagnetic threshold, and the value of the first magnetic field is larger than or equal to the second threshold.
9. The method of claim 7, wherein the method further comprises:
And displaying a second prompt message under the condition that the value of the first magnetic field is larger than a second threshold value and smaller than the first threshold value, wherein the second prompt message is used for indicating that the second magnetic field is interfered by the outside.
10. The method of claim 8, wherein the method further comprises:
the mute control piece is controlled to be positioned at a third position, a first target magnetic field generated by the magnet is detected by the Hall sensor, and a second target magnetic field generated by superposition of the magnet and the geomagnetic field is detected by the electronic compass;
Determining the first target magnetic field as the first threshold value and the second target magnetic field as the first superimposed magnetic field;
the mute control piece is controlled to be located at a fourth position, a third target magnetic field generated by the magnet is detected by the Hall sensor, and a fourth target magnetic field generated by superposition of the magnet and the geomagnetic field is detected by the electronic compass;
determining the third target magnetic field as the second threshold value and the fourth target magnetic field as the second superimposed magnetic field;
Wherein the third position is located between the first position and the second position and is close to the first position, and the fourth position is located between the third position and the second position and is close to the second position.
11. An electronic device state determining apparatus applied to the electronic device of any one of claims 1 to 5, the electronic device state determining apparatus comprising:
the acquisition module is used for acquiring the first magnetic field and the second magnetic field;
And the determining module is used for detecting the target position of the mute control element included in the electronic equipment according to the first magnetic field and the second magnetic field so as to determine the target state of the electronic equipment, wherein the target position corresponds to the target state one by one, and the target state comprises a mute state or an unmuted state.
12. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the electronic device state determination method of any of claims 6-10.
13. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the electronic device state determining method according to any of claims 6-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210522413.0A CN114877793B (en) | 2022-05-13 | 2022-05-13 | Electronic equipment, electronic equipment state determining method and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210522413.0A CN114877793B (en) | 2022-05-13 | 2022-05-13 | Electronic equipment, electronic equipment state determining method and related equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114877793A CN114877793A (en) | 2022-08-09 |
CN114877793B true CN114877793B (en) | 2024-07-26 |
Family
ID=82675028
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210522413.0A Active CN114877793B (en) | 2022-05-13 | 2022-05-13 | Electronic equipment, electronic equipment state determining method and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114877793B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117970084A (en) * | 2022-10-24 | 2024-05-03 | Oppo广东移动通信有限公司 | State detection method of electronic equipment, electronic equipment and computer readable medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110139018A (en) * | 2019-06-26 | 2019-08-16 | 维沃移动通信有限公司 | Camera controls the control method for movement and terminal of mould group, camera |
CN215644239U (en) * | 2021-08-25 | 2022-01-25 | 维沃移动通信有限公司 | Electronic device |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE3803284A1 (en) * | 1988-02-04 | 1989-08-17 | Diehl Gmbh & Co | ELECTRIC SWITCH |
KR102058220B1 (en) * | 2013-09-03 | 2019-12-20 | 삼성전자주식회사 | An electroinc device including a key button |
CN108700916B (en) * | 2016-11-03 | 2021-06-01 | 华为技术有限公司 | Terminal control method, protective shell and terminal |
CN110311999B (en) * | 2018-03-20 | 2022-07-12 | Oppo广东移动通信有限公司 | Control method and device of electronic equipment |
CN108845836A (en) * | 2018-06-12 | 2018-11-20 | Oppo广东移动通信有限公司 | Control method and device of sliding mechanism and electronic equipment |
DE102019104936A1 (en) * | 2019-02-27 | 2020-08-27 | Wabco Europe Bvba | Device for generating a control signal of a brake-by-wire brake system of a motor vehicle |
CN113390440B (en) * | 2020-03-11 | 2023-10-20 | 深圳绿米联创科技有限公司 | Method, device and storage medium for detecting position state of target object |
KR20220004345A (en) * | 2020-07-03 | 2022-01-11 | 삼성전자주식회사 | An electronic device including a magnetic sensor and a method for detecting magnetism |
CN112558695A (en) * | 2020-12-22 | 2021-03-26 | 维沃移动通信有限公司 | Electronic device and state detection method |
CN214336606U (en) * | 2021-04-19 | 2021-10-01 | 深圳市万普拉斯科技有限公司 | Key structure and electronic product |
-
2022
- 2022-05-13 CN CN202210522413.0A patent/CN114877793B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110139018A (en) * | 2019-06-26 | 2019-08-16 | 维沃移动通信有限公司 | Camera controls the control method for movement and terminal of mould group, camera |
CN215644239U (en) * | 2021-08-25 | 2022-01-25 | 维沃移动通信有限公司 | Electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN114877793A (en) | 2022-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11474645B2 (en) | Method and apparatus for force sensing | |
US20120169236A1 (en) | Terminal and brightness control method thereof | |
KR101259883B1 (en) | Mobile electronic device | |
EP3627730A1 (en) | Radio frequency interference processing method and electronic device | |
JP2010165337A (en) | Information processing apparatus, information processing method and program | |
US7821500B2 (en) | Inductive joystick | |
EP4064714A1 (en) | Screen display control method and electronic device | |
US10444953B2 (en) | View angle switching method and apparatus | |
CN114877793B (en) | Electronic equipment, electronic equipment state determining method and related equipment | |
US7724244B2 (en) | Slide-type input device, portable device having the input device and method and medium using the input device | |
CN112738886B (en) | Positioning method, positioning device, storage medium and electronic equipment | |
US11789470B2 (en) | Method and apparatus for calibrating sliding of sliding component | |
US11933933B2 (en) | Event detection method, event detection system, and non-transitory computer-readable recording medium | |
KR20130017872A (en) | Portable terminal and method for driving the same | |
WO2020221164A1 (en) | Motion control method, apparatus and system | |
EP3629318B1 (en) | Method and apparatus for compensating operating parameter of display circuit | |
KR20100018125A (en) | Method and apparatus for pointing in portable terminal | |
US20120127218A1 (en) | Method and apparatus for reducing power consumption in terminal using self-emitting type display | |
CN112333318B (en) | Key function response method and device and electronic equipment | |
WO2023169422A1 (en) | Electronic compass calibration method and apparatus, electronic device, and storage medium | |
CN110311999B (en) | Control method and device of electronic equipment | |
EP4329273A1 (en) | Electronic device, control method for electronic device, and control apparatus | |
CN114088121A (en) | Wearable device and control method | |
CN113873157B (en) | Shooting method, shooting device, electronic equipment and readable storage medium | |
CN112947808B (en) | Unread message display method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |