Control method of electronic equipment, electronic equipment and computer readable storage medium
By introducing vibration instructions into electronic devices to restore the normal state of the sensor, the problem of detection accuracy of Hall sensors and MEMS sensors under external magnetic fields and external stress is solved, ensuring the accuracy of angle detection and rapid switching of the folded state.
Patent Information
- Application Number
- CN202310301566.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2024-09-24
AI Technical Summary
In electronic equipment, the detection accuracy of Hall sensors is easily interfered by external magnetic fields, and acceleration or gyroscope sensors made with MEMS technology may have sticky short circuits under the action of external stress, resulting in abnormal detection results.
By setting a vibration command on the electronic device, the sensor vibrates when in an abnormal state, thereby eliminating the short circuit between the plates and returning to normal state.
It ensures the accuracy of angle detection of electronic devices, supports rapid switching of folding states, and avoids detection errors caused by abnormal sensor conditions.
Smart Images

Figure CN118694835A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a control method of an electronic equipment, an electronic equipment, and a computer-readable storage medium. Background Art
[0002] With the development of mobile terminals, more and more mobile phones are gradually emerging, such as electronic devices that can be folded. This type of electronic device generally has a folding angle detection function.
[0003] Generally speaking, electronic devices can obtain the folding angle of the electronic device through the relative position change between the Hall sensor and the magnet. However, the detection accuracy of the Hall sensor is easily affected by the external magnetic field environment, so it is necessary to cooperate with the detection data of other sensors such as accelerometers or gyroscopes to ensure the detection accuracy of the folding angle.
[0004] However, sensors such as accelerometers or gyroscopes made by the Micro-Electro-Mechanical System (MEMS) process obtain the folding angle by detecting the capacitance between the plates. However, when the above sensors are subjected to external stress, a sticky short circuit may occur between the detection plates of the sensors, resulting in abnormal detection results. Summary of the invention
[0005] In one aspect, an embodiment of the present application provides a control method of an electronic device, wherein the electronic device includes a first body, a second body, and a sensor, wherein the first body and the second body can rotate relative to each other, and the sensor is disposed on the first body or the second body and is configured to obtain an angle between the first body and the second body;
[0006] The control method comprises:
[0007] Determining whether the state of the sensor is an abnormal state;
[0008] In response to an abnormal state of the sensor, a vibration instruction is triggered to cause the sensor to vibrate; wherein the sensor can recover to a normal state through the vibration.
[0009] On the other hand, an embodiment of the present application further provides an electronic device, the electronic device comprising a first body, a second body, and a sensor, wherein the first body and the second body can rotate relative to each other, and the sensor is disposed on the first body or the second body and is configured to obtain an angle between the first body and the second body;
[0010] When the sensor is in an abnormal state, the first electrode plate and the second electrode plate of the sensor are short-circuited; the sensor can release the short circuit between the first electrode plate and the second electrode plate by vibrating, thereby restoring the sensor to a normal state.
[0011] Another aspect of the embodiments of the present application further provides an electronic device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions and execute the control method described in the above embodiments.
[0012] Another aspect of the embodiments of the present application further provides a computer-readable storage medium, which stores a computer program including program instructions, and when the program instructions are executed by a processor, the processor executes the control method described in the above embodiments.
[0013] The control method of the electronic device, the electronic device, and the computer-readable storage medium provided in the embodiments of the present application can quickly restore the sensor to a normal state through vibration when it is determined that the sensor is in an abnormal state, thereby ensuring the accuracy of the angle detection of the electronic device, which is conducive to the rapid switching of the folding state of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 is a schematic diagram of the structure of an electronic device in some embodiments of the present application when it is flattened;
[0016] Figure 2 yes Figure 1 A schematic diagram of the structure of the electronic device when folded in the embodiment;
[0017] Figure 3 is a schematic diagram of the structure of an electronic device in some other embodiments of the present application;
[0018] Figure 4 is a schematic diagram of the structure of an electronic device in some other embodiments of the present application;
[0019] Figure 5 is a schematic diagram of the structure of a sensor in some embodiments of the present application;
[0020] Figure 6 is a schematic diagram of the structure of an electronic device in some other embodiments of the present application;
[0021] Figure 7 is a schematic block diagram of the structure of an electronic device in some embodiments of the present application;
[0022] Figure 8 is a flowchart of a control method of an electronic device in some embodiments of the present application;
[0023] Fig. 9 is a flowchart of a control method of an electronic device in some other embodiments of the present application;
[0024] Fig.10 is a flowchart of a control method of an electronic device in some other embodiments of the present application;
[0025] Fig.11 is a flowchart of a control method of an electronic device in some other embodiments of the present application;
[0026] Fig.12 is a flowchart of a control method of an electronic device in some other embodiments of the present application;
[0027] Fig.13 It is a flowchart of a control method of an electronic device in some other embodiments of the present application. DETAILED DESCRIPTION
[0028] The present application is further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present application, but are not intended to limit the scope of the present application. Similarly, the following examples are only some embodiments of the present application rather than all embodiments, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0030] As used herein, "electronic devices" (or simply "terminals") include, but are not limited to, devices configured to receive / send communication signals via a wireline connection (e.g., via a public switched telephone network (PSTN), a digital subscriber line (DSL), a digital cable, a direct cable connection, and / or another data connection / network) and / or via a wireless interface (e.g., for a cellular network, a wireless local area network (WLAN), a digital television network such as a DVB-H network, a satellite network, an AM-FM broadcast transmitter, and / or another communication terminal). Communication terminals configured to communicate via a wireless interface may be referred to as "wireless communication terminals", "wireless terminals" or "mobile terminals". Examples of mobile terminals include, but are not limited to, satellite or cellular phones; personal communication system (PCS) terminals that may combine cellular radiotelephones with data processing, fax, and data communication capabilities; PDAs that may include radiotelephones, pagers, Internet / intranet access, web browsers, organizers, calendars, and / or global positioning system (GPS) receivers; and conventional laptop and / or palmtop receivers or other electronic devices that include radiotelephone transceivers. A mobile phone is an electronic device equipped with a cellular communication module.
[0031] See also Figure 1 and Figure 2 , Figure 1 is a schematic diagram of the structure of the electronic device 100 when it is flattened in some embodiments of the present application, Figure 2 yes Figure 1 A schematic diagram of the structure of the electronic device 100 when folded in the embodiment.
[0032] The electronic device 100 may include a first body 110 and a second body 120 that can rotate relative to each other, that is, the first body 110 and the second body 120 are rotatably connected. The joint between the first body 110 and the second body 120 may be made of a foldable material, so that the first body 110 and the second body 120 can rotate relative to each other.
[0033] In one embodiment, the electronic device 100 may further include a rotating assembly 130, and the first body 110 and the second body 120 are respectively connected to two sides of the rotating assembly 130. The second body 120 can be folded or unfolded relative to the first body 110 through the rotating assembly 130. When the electronic device 100 is in a folded state, the volume is relatively small, which is convenient for storage and carrying.
[0034] like Figure 1 and Figure 2 As shown, the angle between the first body 110 and the second body 120 may range from 0° to 180°. When the angle between the first body 110 and the second body 120 is 180°, the electronic device 100 is as shown in FIG. Figure 1When the angle between the first body 110 and the second body 120 is 0°, the electronic device 100 is in the flattened state as shown. Figure 2 Shown in folded state.
[0035] The rotating assembly 130 may be a hinge assembly, a shaft assembly, or an elastic assembly, etc. The first body 110 and the second body 120 connected to both sides of the rotating assembly 130 may realize relative rotation through the rotating assembly 130. The specific structural and technical features of the rotating assembly 130 are within the scope of understanding of those skilled in the art, so they will not be described in detail.
[0036] It should be noted that the terms "first", "second", etc. in the embodiments of the present application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second", etc. may explicitly or implicitly include at least one of the features.
[0037] As mentioned above, the electronic device provided by the present application is a foldable electronic device, such as but not limited to: mobile phones, tablet computers, smart watches and other electronic devices, which mainly have the advantages of combining entertainment and office work, and are easy to carry, catering to the current consumer demand for portability and multifunctional unity. Foldable electronic devices can use Hall sensors to sense continuously changing magnetic fields, and then obtain the folding angle of the electronic device.
[0038] Among them, the Hall sensor is a magnetic field sensor made based on the Hall effect. The Hall effect is a type of magnetoelectric effect. The Hall voltage changes with the change of magnetic field strength. The stronger the magnetic field, the higher the voltage, and the weaker the magnetic field, the lower the voltage. Therefore, the Hall sensor cannot directly detect the folding angle, and the magnetic field strength and the folding angle need to be matched one by one. During the debugging process of electronic equipment, the initial correspondence between the magnetic field strength and the folding angle is generally written through a calibration operation, and the correspondence can be directly called during subsequent use.
[0039] See also Figure 3 and Figure 4 , Figure 3 is a schematic diagram of the structure of the electronic device 100 in some other embodiments of the present application, Figure 4 1 is a schematic diagram of the structure of the electronic device 100 in some other embodiments of the present application. Figure 3 and Figure 4 The difference between the electronic device 100 in the embodiment is: Figure 3 The electronic device 100 in the embodiment has a rotating assembly 130; Figure 4 In the embodiment, the electronic device 100 eliminates the rotating assembly 130 , that is, the first body 110 and the second body 120 are directly rotatably connected.
[0040] The electronic device 100 may further include a Hall sensor 140 and a first magnet 150, and the Hall sensor 140 and the first magnet 150 move relative to each other as the first body 110 and the second body 120 rotate relative to each other. That is, when the first body 110 and the second body 120 rotate relative to each other so that the electronic device 100 is folded or flattened, the Hall sensor 140 and the first magnet 150 move relative to each other so that the distance between them changes.
[0041] When the first body 110 and the second body 120 rotate relative to each other, the magnetic induction intensity of the first magnet 150 sensed by the Hall sensor 140 gradually changes.
[0042] like Figure 3 As shown, one of the Hall sensor 140 and the first magnet 150 is disposed on the rotating assembly 130, and the other is disposed on the first body 110 or the second body 120. Figure 4 As shown, one of the Hall sensor 140 and the first magnet 150 is disposed on the first body 110, and the other is disposed on the second body 120. Further, when the angle between the first body 110 and the second body 120 changes, the magnetic induction intensity of the first magnet 150 sensed by the Hall sensor 140 changes, thereby obtaining the folding angle between the first body 110 and the second body 120.
[0043] As mentioned above, the Hall sensor 140 itself cannot directly obtain the folding angle, and the corresponding relationship between the magnetic induction intensity of the first magnet 150 and the folding angle needs to be pre-stored in the electronic device 100. Then, when the electronic device 100 is in use, the electronic device 100 can obtain the above folding angle based on the magnetic induction intensity of the first magnet 150 sensed by the Hall sensor 140.
[0044] Specifically, the first magnet 150 has a first magnetic field. When the angle between the first body 110 and the second body 120 changes, the intensity of the first magnetic field sensed by the Hall sensor 140 will change, thereby obtaining the folding angle between the first body 110 and the second body 120 based on the corresponding relationship between the magnetic induction intensity of the first magnet 150 and the folding angle.
[0045] That is, the electronic device provided in the embodiment of the present application can be provided with a first magnet and a Hall sensor on the electronic device, and the first magnet and the Hall sensor can be relatively moved with the relative rotation of the first body and the second body, thereby obtaining the angle between the first body and the second body through the intensity of the first magnetic field sensed by the Hall sensor, and the folding angle between the first body and the second body can be quickly obtained. It can be understood that the relative positions of the first magnet and the Hall sensor are only exemplarily illustrated in the illustrations of the present application, but are not limited to this.
[0046] The applicant has found through research that obtaining the angle between the first body and the second body through the Hall sensor requires the use of a first magnet that can move relative to the Hall sensor, that is, the Hall sensor can sense the changing magnetic field through the relative movement of the first magnet and the Hall sensor. However, in actual use, when there is a magnetic field other than the first magnet, the detection accuracy of the Hall sensor will be affected.
[0047] Based on this, the applicant proposed to set up non-magnetic detection sensors such as accelerometers or gyroscopes on electronic devices to cooperate with the Hall sensor to obtain the folding angle.
[0048] Due to the limited space layout of electronic equipment, the above-mentioned non-magnetic detection sensors can be manufactured using MEMS technology to save layout space. However, non-magnetic detection sensors such as accelerometers or gyroscopes manufactured using MEMS technology usually obtain the folding angle through the capacitance between the plates. However, when the above-mentioned sensors are subjected to external stress, a sticky short circuit may occur between the detection plates of the sensor, resulting in abnormal detection results.
[0049] See also Figure 5 , Figure 5 2 is a schematic diagram of the structure of the sensor 200 in some embodiments of the present application. The sensor 200 can be made by MEMS technology, so that the sensor 200 has the characteristics of small size, low power consumption, compact internal structure, low cost of mass production, high precision and sensitivity, etc. Among them, the sensor 200 can be an acceleration sensor, a gyroscope sensor or other sensors.
[0050] The sensor 200 may include a first mass block 210 provided with a first electrode plate 201, and a second mass block 220 provided with a second electrode plate 202. The first mass block 210 and the second mass block 220 can move relative to each other, so that the first electrode plate 201 and the second electrode plate 202 can move relative to each other, so that the capacitance between the first electrode plate 201 and the second electrode plate 202 changes, and the acceleration value can be obtained. The first electrode plate 201 can be distributed on the first mass block 210 in a comb-teeth shape, and the second electrode plate 202 can be distributed on the second mass block 220 in a comb-teeth shape. The comb teeth of the first electrode plate 201 and the second electrode plate 202 are staggered and leave a certain movable gap.
[0051] It should be noted that the technical features of the sensor 200 that are not described in detail are within the scope of understanding of those skilled in the art and will not be described in detail.
[0052] See also Figure 6 , Figure 6 1 is a schematic diagram of the structure of the electronic device 100 in other embodiments of the present application, and the electronic device 100 may include a first body 110, a second body 120, and a sensor 200. The first body 110 and the second body 120 can rotate relative to each other, and the sensor 200 is provided on the first body 110 or the second body 120 and is configured to obtain the angle between the first body 110 and the second body 120. Among them, the sensor 200 may be an acceleration sensor, a gyroscope sensor, or other non-magnetic detection sensor, which can avoid interference from an external magnetic field, and cooperate with a Hall sensor to ensure the accuracy of the obtained folding angle.
[0053] However, when the electronic device 100 is subjected to external force, such as when it is dropped or bumped, the sensor 200 may be in an abnormal state. Figure 5 As shown, when the sensor 200 is subjected to external stress, adhesion / contact short circuit may occur between the first electrode plate 201 and the second electrode plate 202, thereby causing the sensor 200 to be in an abnormal state.
[0054] The applicant discovered in the study that the above abnormal state is reversible, that is, when the external stress on the sensor 200 is released, the first electrode plate 201 and the second electrode plate 202 can be separated from each other to release the short-circuit state, thereby restoring the sensor 200 to a normal state. Further, the applicant proposed that when the sensor 200 is in an abnormal state, that is, the first electrode plate 201 and the second electrode plate 202 are short-circuited, the sensor 200 can vibrate so that the first electrode plate 201 and the second electrode plate 202 can be separated from each other to release the short-circuit state, thereby restoring the sensor 200 to a normal state.
[0055] Based on this, an embodiment of the present application provides a control method for an electronic device, so that a sensor on the electronic device can be restored to a normal state in a timely manner after an abnormal state occurs.
[0056] See also Figure 7 , Figure 7 1 is a schematic block diagram of the structure of the electronic device 100 in some embodiments of the present application. The electronic device may be a mobile electronic device, and the electronic device may include: a memory 901, a processor (Central Processing Unit, CPU) 902, a circuit board (not shown in the figure), a power circuit and a microphone 913. The circuit board is placed inside the space surrounded by the shell; the CPU 902 and the memory 901 are arranged on the circuit board; the power circuit is used to supply power to various circuits or devices of the electronic device; the memory 901 is used to store executable program codes; the CPU 902 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 901, so as to recognize the above-mentioned identification information to realize the unlocking and wake-up functions.
[0057] The electronic device may also include: a peripheral interface 903, an RF (Radio Frequency) circuit 905, an audio circuit 906, a speaker 911, a power management chip 908, other input / control devices of the input / output (I / O) subsystem, a touch screen 912, other input / control devices 910 and an external port 904 (which may be the first terminal 103 in the aforementioned embodiment), and these components communicate through one or more communication buses or signal lines 907.
[0058] The memory 901 can be accessed by the CPU 902, the peripheral interface 903, etc. The memory 901 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other volatile solid-state storage devices. The peripheral interface 903 can connect the input and output peripherals of the device to the CPU 902 and the memory 901.
[0059] The I / O subsystem 909 can connect the input and output peripherals on the device, such as a touch screen 912 and other input / control devices 910, to the peripheral interface 903. The I / O subsystem 909 may include a display controller 9091 and one or more input controllers 9092 for controlling other input / control devices 910. Among them, the one or more input controllers 9092 receive electrical signals from other input / control devices 910 or send electrical signals to other input / control devices 910, and other input / control devices 910 may include physical buttons (press buttons, rocker buttons, etc.), dials, slide switches, joysticks, and click wheels. It is worth noting that the input controller 9092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
[0060] The touch screen 912 is an input interface and an output interface between the user electronic device and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, etc.
[0061] The display controller 9091 in the I / O subsystem 909 receives an electrical signal from the touch screen 912 or sends an electrical signal to the touch screen 912. The touch screen 912 detects contact on the touch screen, and the display controller 9091 converts the detected contact into interaction with a user interface object displayed on the touch screen 912, that is, realizes human-computer interaction. The user interface object displayed on the touch screen 912 may be an icon for running a game, an icon for connecting to a corresponding network, etc.
[0062] The RF circuit 905 is mainly used to establish communication between the mobile phone and the wireless network (i.e., the network side) to realize data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, etc. Specifically, the RF circuit 905 receives and sends RF signals, which are also called electromagnetic signals. The RF circuit 905 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with the communication network and other devices through the electromagnetic signals. The RF circuit 905 may include known circuits for performing these functions, including but not limited to antenna systems, RF transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, CODEC (Coder-Decoder) chipsets, Subscriber Identity Module (SIM), etc.
[0063] The audio circuit 906 is mainly used to receive audio data from the peripheral interface 903, convert the audio data into an electrical signal, and send the electrical signal to the speaker 911. The speaker 911 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 905 to sound and play the sound to the user. The power management chip 908 is used to provide power supply and power management for the CPU 902, the I / O subsystem and the hardware connected to the peripheral interface.
[0064] See also Figure 8 , Figure 8 1 is a flow chart of a control method of an electronic device in some embodiments of the present application. The memory of the electronic device can store a computer program for electronic data exchange, and the computer program enables the processor of the electronic device to execute the control method. The electronic device can be the electronic device 100 in the aforementioned embodiment, so it will not be described in detail.
[0065] The control method of the electronic device may include the following steps:
[0066] Step S801: Determine whether the state of the sensor is abnormal.
[0067] Specifically, the sensor will report the detection value to the processor in real time when working, and the processor determines whether the state of the sensor is abnormal based on the received detection value of the sensor. During the folding process of the electronic device, if the detection value reported by the sensor changes continuously and is within the range, the sensor can be considered to be in a normal state. During the folding process of the electronic device, if the detection value reported by the sensor changes suddenly, or continues to be full scale, or exceeds the range, the sensor can be considered to be in an abnormal state, that is, the sensor has a stuck shaft phenomenon. As mentioned above, when the first plate and the second plate of the sensor are short-circuited, the sensor is in a stuck shaft state, that is, an abnormal state.
[0068] Step S802: In response to the abnormal state of the sensor, trigger a vibration instruction to make the sensor vibrate. As mentioned above, when the processor determines that the sensor is in an abnormal state according to the received detection value of the sensor, it triggers a vibration instruction to make the sensor vibrate. The sensor can recover to a normal state through vibration, that is, the sensor causes the first electrode plate and the second electrode plate to separate from each other through vibration, thereby eliminating the short circuit and recovering to a normal state.
[0069] As mentioned above, when an electronic device is subjected to an external force, such as when it is dropped or bumped, a sticking / contact short circuit may occur between the first electrode plate and the second electrode plate of the sensor, thereby causing the sensor to present an abnormal state. The sticking / contact short circuit state between the first electrode plate and the second electrode plate can be removed by vibration, so that the sensor returns to a normal state.
[0070] Optionally, the electronic device may be pre-set with a vibration instruction, and when the processor determines that the sensor is in an abnormal state, the vibration instruction may be triggered directly or indirectly in response to the abnormal state. For example, when the processor determines that the sensor is in an abnormal state, the processor directly triggers the vibration instruction. For another example, when the processor determines that the sensor is in an abnormal state, the processor issues a prompt instruction to the user and triggers the vibration instruction according to the user's instructions.
[0071] Among them, the vibration instruction can be configured to cause the sensor to vibrate. The vibration instruction includes an instruction that can produce a vibration result that can be felt by the user. The instruction can be stored in a memory. When the processor calls the vibration instruction, the electronic device or the internal structure of the electronic device can vibrate, thereby driving the sensor to vibrate. Of course, in other embodiments, the vibration instruction can also act directly on the sensor to cause the sensor to vibrate. Optionally, the processor calls the vibration instruction to cause a vibrating member provided on the electronic device to vibrate, and the vibration can be conducted on the electronic device to cause the sensor to vibrate. Among them, the vibrating member can be a structural member such as a motor that can vibrate under the action of the vibration instruction.
[0072] The control method of the electronic device provided in the embodiment of the present application can quickly restore the sensor to a normal state through vibration when it is determined that the sensor is in an abnormal state, thereby ensuring the accuracy of the angle detection of the electronic device, which is conducive to the rapid switching of the folding state of the electronic device.
[0073] See also Fig. 9 , Fig. 9 is a flow chart of a control method of an electronic device in some other embodiments of the present application. The control method may include the following steps:
[0074] Step S901: Determine whether the state of the sensor is abnormal.
[0075] Among them, step S901 can refer to step S801, so it will not be repeated here.
[0076] Step S902: respond to the abnormal state of the sensor and determine whether the duration of the abnormal state of the sensor exceeds a first time threshold.
[0077] Step S903: If the first time threshold is exceeded, a vibration instruction is triggered to make the sensor vibrate, wherein the sensor can recover to a normal state through vibration.
[0078] Step S904: If the first time threshold is not exceeded, the vibration instruction is not triggered.
[0079] Specifically, it is possible to determine whether the abnormal state of the sensor can recover by itself by presetting a first time threshold. If it can recover by itself, there is no need to trigger a vibration instruction, that is, there is no need to restore the sensor to a normal state by vibration. When the sensor cannot recover to a normal state by itself, the sensor is restored to a normal state by vibration. Therefore, the processor can decide whether to trigger a vibration instruction by determining whether the duration of the abnormal state of the sensor exceeds the first time threshold. When the duration of the abnormal state of the sensor does not exceed the first time threshold, it indicates that the sensor has recovered to a normal state, and there is no need to trigger a vibration instruction. When the duration of the abnormal state of the sensor exceeds the first time threshold, it indicates that the sensor cannot recover to a normal state by itself, and at this time, it is necessary to trigger a vibration instruction to restore the sensor to a normal state by vibration.
[0080] The first time threshold can be flexibly selected according to actual needs, and is generally not more than 1 second to achieve a quick judgment response. For example, the first time threshold can be within 0.5 seconds, which can quickly determine whether the vibration instruction needs to be triggered, so that it can be restored to a normal state as soon as possible.
[0081] It should be noted that the technical features of the control method not fully described in the embodiments of the present application can be referred to the specific description in the aforementioned embodiments, so they will not be repeated here.
[0082] See also Fig.10 , Fig.10 It is a flow chart of the control method of the electronic device in other embodiments of the present application. Among them, the vibration instruction may include a first vibration instruction, which can cause the sensor to vibrate when the first vibration instruction is triggered, and the duration of the sensor vibration generally does not exceed the second time threshold. Specifically, the first vibration instruction can trigger the vibration scene of the electronic device itself, such as the incoming call vibration scene, the information prompt vibration scene, etc. The vibration duration of the vibration scene of the electronic device itself can generally be set, that is, generally does not exceed the second time threshold, so that when the above-mentioned vibration scene occurs, the duration of the sensor vibration does not exceed the second time threshold accordingly. That is, this embodiment drives the sensor to vibrate when the sensor is in an abnormal state through the inherent vibration scene of the electronic device itself so that the sensor returns to a normal state. Among them, the second time threshold can be 0.5s-1min, for example, it can be 1s, 10s, or 30s.
[0083] Furthermore, the control method may include the following steps:
[0084] Step S1001, preset a first vibration instruction.
[0085] Step S1002: Determine whether the state of the sensor is abnormal.
[0086] Step S1003: In response to the abnormal state of the sensor, trigger a first vibration instruction to make the sensor vibrate, wherein the sensor can recover to a normal state through vibration.
[0087] The control method of the electronic device provided in the embodiment of the present application can quickly restore the sensor to a normal state through vibration when the sensor is judged to be in an abnormal state, thereby ensuring the accuracy of the angle detection of the electronic device, thereby facilitating the rapid switching of the folding state of the electronic device. Among them, the inherent vibration scene of the electronic device itself is triggered by presetting the first vibration instruction, thereby driving the sensor to vibrate so that the sensor can be restored to a normal state.
[0088] It should be noted that the technical features of the control method not fully described in the embodiments of the present application can be referred to the specific description in the aforementioned embodiments, so they will not be repeated here.
[0089] See also Fig.11 , Fig.11 1 is a flow chart of a control method of an electronic device in some other embodiments of the present application. The vibration instruction may include a second vibration instruction, which can cause a vibrating member of the electronic device to vibrate when triggered, and the vibration of the vibrating member can cause the sensor to vibrate. Specifically, the electronic device can drive the sensor to vibrate by setting a separate vibrating member, for example, the vibrating member can be a motor, etc. The second vibration instruction can trigger the vibrating member of the electronic device to vibrate so as to cause the sensor to vibrate.
[0090] Furthermore, the control method may include the following steps:
[0091] Step S1101: Determine whether the state of the sensor is abnormal.
[0092] Among them, step S1101 can refer to step S801, so it will not be repeated here.
[0093] Step S1102: In response to the abnormal state of the sensor, a prompt instruction is issued.
[0094] Step S1103: In response to the prompt instruction, trigger a second vibration instruction to make the sensor vibrate, wherein the sensor can recover to a normal state through vibration.
[0095] Specifically, when the processor determines that the sensor is in an abnormal state, a prompt instruction may be issued to prompt the user that the sensor is in an abnormal state at this time, and the sensor may be restored to a normal state by vibration, and the user is asked whether the vibrator needs to vibrate. The prompt method may be to prompt the user by displaying a dialog box, a pop-up window, or a voice broadcast on the electronic device, and the user operates based on the above prompt instruction to trigger the second vibration instruction.
[0096] Of course, in other embodiments, the steps of issuing a prompt instruction and responding to the prompt instruction may be cancelled, that is, in response to an abnormal state of the sensor, the second vibration instruction may be directly triggered to cause the sensor to vibrate. This step may refer to step S802, so it will not be repeated.
[0097] In one embodiment, the processor may further determine whether the duration of the vibration of the vibrating member exceeds a third time threshold. If the third time threshold is exceeded, the vibrating member stops vibrating; if the third time threshold is not exceeded, the vibrating member continues to vibrate. The third time threshold may be adapted to the second vibration instruction to characterize the vibration duration of the vibrating member. In other words, the processor may monitor whether the vibrating member continues to vibrate for the required duration to ensure that the sensor can return to a normal state. The applicant has found through research that when the duration of the vibration of the vibrating member exceeds the third time threshold, the sensor can generally return to a normal state. The third time threshold may be 0.5s-1min, for example, 1s, 10s, or 30s.
[0098] See also Fig.12 , Fig.12 1 is a flow chart of a control method of an electronic device in some other embodiments of the present application. The control method may include the following steps:
[0099] Step S1201: Determine whether the state of the sensor is abnormal.
[0100] Among them, step S1201 can refer to step S801, so it will not be repeated here.
[0101] Step S1202: In response to the abnormal state of the sensor, trigger a second vibration instruction to make the sensor vibrate. When the second vibration instruction is triggered, a vibration element of the electronic device can vibrate, and the vibration of the vibration element can cause the sensor to vibrate.
[0102] Step S1203, determine whether the duration of the vibration of the vibrating part exceeds the fourth time threshold. The processor can monitor whether the vibrating part continues to vibrate for the required time to ensure that the sensor can return to a normal state. After research, the applicant found that when the duration of the vibration of the vibrating part exceeds the fourth time threshold, the sensor can generally return to a normal state. Among them, the fourth time threshold can be 0.5s-1min, for example, it can be 1s, 10s, or 30s. However, in some application scenarios, when the duration of the vibration of the vibrating part exceeds the fourth time threshold, the sensor may not return to a normal state. This situation may occur due to insufficient vibration frequency / amplitude of the vibrating part or the inability of the sensor to return to a normal state.
[0103] If the fourth time threshold is exceeded, the process proceeds to step S1204; if the fourth time threshold is not exceeded, the process proceeds to step S1207.
[0104] Step S1204: If the fourth time threshold is exceeded, determine whether the sensor returns to normal.
[0105] Specifically, the sensor will report the detection value to the processor in real time when working, and the processor determines whether the state of the sensor is abnormal based on the received detection value of the sensor. During the folding process of the electronic device, if the detection value reported by the sensor changes continuously and is within the range, the sensor can be considered to be in a normal state. During the folding process of the electronic device, if the detection value reported by the sensor changes suddenly, or continues to be full scale, or exceeds the range, the sensor can be considered to be in an abnormal state, that is, the sensor has a stuck shaft phenomenon. As mentioned above, when the first plate and the second plate of the sensor are short-circuited, the sensor is in a stuck shaft state, that is, an abnormal state.
[0106] If the sensor has not recovered to a normal state, the process proceeds to step S1205 ; if the sensor is in a normal state, the process proceeds to step S1206 .
[0107] Step S1205, if the sensor has not recovered to a normal state, further increase the vibration frequency or vibration amplitude of the vibration member. Specifically, when the vibration member is triggered by the second vibration instruction, vibrates at the initial vibration frequency or initial vibration amplitude and the vibration duration exceeds the fourth time threshold, the sensor has not recovered to a normal state. At this time, the processor can further increase the operating voltage applied to the vibration member to increase the vibration frequency or vibration amplitude of the vibration member so that the sensor can recover to a normal state. Of course, in other embodiments, when the vibration member is triggered by the second vibration instruction, vibrates at the initial vibration frequency or initial vibration amplitude and the vibration duration exceeds the fourth time threshold, the sensor has not recovered to a normal state. At this time, it can be considered that the sensor cannot be recovered to a normal state by vibration, that is, the sensor may have a fault, and the processor further issues a fault instruction to prompt the user that a repair is required.
[0108] Step S1206: If the sensor returns to a normal state, the vibrating element stops vibrating.
[0109] Step S1207: If the fourth time threshold is not exceeded, the vibrating element continues to vibrate.
[0110] The control method of the electronic device provided in the embodiment of the present application can quickly restore the sensor to a normal state by vibrating the vibrator when the sensor is judged to be in an abnormal state, thereby ensuring the accuracy of the angle detection of the electronic device, which is conducive to the rapid switching of the folding state of the electronic device. Among them, the vibration frequency and vibration amplitude of the vibrator can be adjusted according to whether the state of the sensor is restored to save the power consumption of the vibrator. Of course, if the sensor cannot be restored to a normal state by vibration, a fault instruction can be issued in time to remind the user to report for repair. It should be noted that the technical features not fully described in detail in the control method in the embodiment of the present application can refer to the specific description in the aforementioned embodiment, so they will not be repeated here.
[0111] See also Fig.13 , Fig.13 1 is a flow chart of a control method of an electronic device in some other embodiments of the present application. The control method may include the following steps:
[0112] Step S1301, determine whether the state of the sensor is abnormal; if so, proceed to step S1302; if not, proceed to step S1303.
[0113] Step S1302, determine whether the duration of the abnormal state of the sensor exceeds the first time threshold; if so, proceed to step S1304; if not, proceed to step S1303.
[0114] Step S1303: Do not trigger the vibration instruction.
[0115] Step S1304: trigger a vibration instruction to cause the sensor to vibrate.
[0116] Step S1305, determining whether the vibration instruction is the first vibration instruction or the second vibration instruction; when the vibration instruction is the first vibration instruction, proceeding to step S1306; when the vibration instruction is the second vibration instruction, proceeding to step S1307.
[0117] Step S1306, determine whether the duration of the sensor vibration exceeds the second time threshold; if exceeded, proceed to step S1308; if not exceeded, proceed to step S1309.
[0118] Step S1307, determine whether the duration of the vibration of the vibration member exceeds the fourth time threshold; if so, proceed to step S1310; if not, proceed to step S1311.
[0119] Step S1308: The sensor stops vibrating.
[0120] Step S1309: The sensor continues to vibrate.
[0121] Step S1310, determine whether the sensor has returned to normal; if not, proceed to step S1312; if returned to normal, proceed to step S1313.
[0122] Step S1311, the vibrating element continues to vibrate.
[0123] Step S1312: increase the vibration frequency or vibration amplitude of the vibrating element, or issue a fault instruction.
[0124] Step S1313: the vibrating element stops vibrating.
[0125] It can be understood that the technical features such as method steps that are not fully described in detail in the control method in the embodiments of the present application can refer to the specific description in the aforementioned embodiments, so they will not be repeated here.
[0126] See again Figure 7 , the electronic device 100 may include a memory 901 and a processor 902, and the memory 901 and the processor 902 may be connected to each other via a communication bus. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
[0127] The memory 901 is used to store a computer program, which includes program instructions. The processor 902 is configured to call the program instructions, which include instructions for executing some or all of the steps in the control method of the electronic device in the above-mentioned embodiment.
[0128] The processor 902 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.
[0129] Optionally, the memory 901 may exist independently and be connected to the processor 902 via a bus. The memory 901 may also be integrated with the processor 902.
[0130] The electronic device 100 may further include a first body 110 and a second body 120 capable of relative rotation, and a sensor 200 disposed on the first body 110 or the second body 120. For details, please refer to the specific description in the above embodiments. Among them, the sensor 200 may be a non-magnetic detection sensor to obtain the angle between the first body 110 and the second body 120 by the user.
[0131] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program including the above-mentioned program instructions, and the computer program enables a computer to execute part or all of the steps of any one of the control methods recorded in the above-mentioned method embodiments.
[0132] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0133] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0134] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0135] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0136] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0137] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in the memory, including a number of instructions to enable an electronic device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a memory.
[0138] It should be noted that the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0139] The above descriptions are only some embodiments of the present application, and do not limit the protection scope of the present application. Any equivalent device or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A control method for an electronic device, the electronic device comprising a first body, a second body, and a sensor, the first body and the second body being capable of relative rotation, the sensor being disposed on the first body or the second body and configured to obtain an angle between the first body and the second body, characterized in that: The control method comprises: Determining whether the state of the sensor is an abnormal state; In response to an abnormal state of the sensor, a vibration instruction is triggered to cause the sensor to vibrate; wherein the sensor can recover to a normal state through the vibration.
2. The control method according to claim 1, characterized in that: The step of triggering the vibration instruction includes: Determine whether the duration of the abnormal state of the sensor exceeds a first time threshold; If the first time threshold is exceeded, the vibration instruction is triggered.
3. The control method according to claim 1, characterized in that: The vibration instruction includes a first vibration instruction, which can cause the sensor to vibrate when triggered, and the duration of the sensor vibration does not exceed a second time threshold; Among them, before the step of judging whether the state of the sensor is an abnormal state, the step includes: presetting the first vibration instruction; and after responding to the abnormal state of the sensor, the step includes: triggering the first vibration instruction.
4. The control method according to claim 1, characterized in that: The vibration instruction includes a second vibration instruction, and when the second vibration instruction is triggered, a vibration element of the electronic device can be vibrated, and the vibration of the vibration element can cause the sensor to vibrate; Wherein, in response to the abnormal state of the sensor, the step of triggering the vibration instruction includes: In response to an abnormal state of the sensor, issuing a prompt instruction; In response to the prompt instruction, the second vibration instruction is triggered.
5. The control method according to claim 4, characterized in that: It is determined whether the duration of the vibration of the vibration component exceeds a third time threshold; if so, the vibration component stops vibrating; if not, the vibration component continues to vibrate.
6. The control method according to claim 4, characterized in that: Determining whether the duration of the vibration of the vibration member exceeds a fourth time threshold; If so, determining whether the sensor has returned to a normal state; If the sensor returns to a normal state, the vibrating member stops vibrating.
7. The control method according to claim 6, characterized in that: If the sensor does not return to a normal state, the vibration frequency or the vibration amplitude of the vibration member is increased.
8. The control method according to claim 6, characterized in that: If the sensor does not return to a normal state, a fault instruction is issued.
9. The control method according to claim 1, characterized in that: The sensor has a first electrode plate and a second electrode plate capable of relative movement; Wherein, when the sensor is in an abnormal state, the first electrode plate and the second electrode plate are short-circuited; and the vibration can release the short circuit between the first electrode plate and the second electrode plate.
10. An electronic device, characterized in that: The electronic device comprises a first body, a second body, and a sensor, wherein the first body and the second body can rotate relative to each other, and the sensor is disposed on the first body or the second body and is configured to obtain an angle between the first body and the second body; When the sensor is in an abnormal state, the first electrode plate and the second electrode plate of the sensor are short-circuited; the sensor can release the short circuit between the first electrode plate and the second electrode plate by vibrating, thereby restoring the sensor to a normal state.
11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions and execute the control method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program including program instructions, and when the program instructions are executed by a processor, the processor executes the control method according to any one of claims 1 to 9.
