Detection method, computer readable storage medium and electronic device

CN117928367BActive Publication Date: 2026-09-22GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211300831.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2026-09-22
Estimated Expiration
2042-10-24

AI Technical Summary

Benefits of technology

[0021]上述检测方法,根据第一差异获取第三磁力,能够将磁性元件对第一磁感元件和第二磁感元件产生的磁力作用抵消,从而使得获得的第三磁力更加精确;再通过第一磁力、第二磁力以及第三磁力获取磁性元件对第一磁感元件的第四磁力和第五磁力,获得的第四磁力和第五磁力不受地球磁场的影响,从而使得基于第四磁力和第五磁力获取的折叠角度更加精确。由此,上述的检测方法,通过磁性元件对第一磁感元件和第二磁感元件在第一预设方向上的磁力作用相抵消的方式,能够更加精确地获取地球磁场以及磁性元件在第一预设方向上对第一磁感元件和第二磁感元件的磁力作用,检测过程不容易受到地球磁场和磁性元件两者磁场的干扰,同时,基于第四磁力和第五磁力获取折叠角度,磁性元件对第一磁感元件和第二磁感元件的磁力作用强,不会因地球磁场磁力作用弱而难以获取折叠角度,上述的检测方法可靠性高。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117928367B_ABST
    Figure CN117928367B_ABST
Patent Text Reader

Abstract

The application relates to a detection method, a computer readable storage medium and an electronic device. The detection method comprises the following steps: acquiring a first magnetic force received by a first magnetic sensing element in a first preset direction; acquiring a second magnetic force received by a second magnetic sensing element in the first preset direction; acquiring a first difference between the first magnetic force and the second magnetic force, and acquiring a third magnetic force of the first magnetic sensing element and the second magnetic sensing element in the first preset direction received by the earth magnetic field according to the first difference; acquiring a second difference between the first magnetic force and the third magnetic force, and acquiring a fourth magnetic force of the first magnetic sensing element in the first preset direction received by a magnetic element according to the second difference; acquiring a third difference between the second magnetic force and the third magnetic force, and acquiring a fifth magnetic force of the second magnetic sensing element in the first preset direction received by the magnetic element according to the third difference; and acquiring a folding angle between a first screen and a second screen based on the fourth magnetic force and the fifth magnetic force. The folding angle obtained by the above detection method has high reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to a detection method, a computer-readable storage medium, and an electronic device. Background Technology

[0002] Foldable screens have become a development trend in electronic device displays. Electronic devices with foldable screens can either unfold to form a large display or fold the screen for easy carrying or to display different images. The design of foldable screens enhances the structural and display flexibility of electronic devices. However, current methods for detecting the folding angle of foldable screens in electronic devices have low reliability. Summary of the Invention

[0003] This application provides a detection method, a computer-readable storage medium, and an electronic device to address the problem of low reliability in methods for detecting the folding angle of foldable screens.

[0004] A detection method for detecting the folding angle of an electronic device, the electronic device including a first screen, a second screen, a magnetic element, a first magnetic sensing element, and a second magnetic sensing element, the first screen and the second screen being foldable relative to each other around a folding direction, the magnetic element being disposed at the fold between the first screen and the second screen, the first magnetic sensing element being disposed on the first screen, and the second magnetic sensing element being disposed on the second screen, the detection method comprising:

[0005] The first magnetic force experienced by the first magnetic element in a first preset direction is obtained, wherein the first preset direction intersects the folding direction;

[0006] Obtain the second magnetic force experienced by the second magnetic sensing element in the first preset direction;

[0007] Obtain the first difference between the first magnetic force and the second magnetic force, and obtain the third magnetic force of the first magnetic sensing element and the second magnetic sensing element on the Earth's magnetic field in the first preset direction based on the first difference;

[0008] The second difference between the first magnetic force and the third magnetic force is obtained, and the fourth magnetic force on the first magnetic element in the first preset direction is obtained based on the second difference;

[0009] The third difference between the second magnetic force and the third magnetic force is obtained, and the fifth magnetic force on the second magnetic element in the first preset direction is obtained based on the third difference;

[0010] The folding angle between the first screen and the second screen is obtained based on the fourth magnetic force and the fifth magnetic force.

[0011] A computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the detection method described in any of the above embodiments.

[0012] An electronic device, comprising:

[0013] First screen;

[0014] A second screen that can be folded relative to the first screen;

[0015] Magnetic elements are disposed at the folding point of the first screen and the second screen;

[0016] A first magnetic sensing element is disposed on the first screen;

[0017] A second magnetic sensing element is disposed on the second screen;

[0018] The arithmetic unit is used to obtain the folding angle between the first screen and the second screen based on the magnetic force received by the first magnetic sensing element and the second magnetic sensing element.

[0019] In one embodiment, the first screen and the second screen can be folded relative to each other around the folding direction, the magnetic element is disposed at the fold between the first screen and the second screen, and the line connecting the geometric centers of the first magnetic element and the second magnetic element is perpendicular to the folding direction.

[0020] In one embodiment, the distances from the geometric center of the first magnetic element and the geometric center of the second magnetic element to the geometric center of the magnetic element are equal.

[0021] The above-described detection method, by obtaining the third magnetic force based on the first difference, can cancel out the magnetic force exerted by the magnetic element on the first and second magnetic sensing elements, thus making the obtained third magnetic force more accurate. Furthermore, by obtaining the fourth and fifth magnetic forces exerted by the magnetic element on the first magnetic sensing element through the first, second, and third magnetic forces, the obtained fourth and fifth magnetic forces are unaffected by the Earth's magnetic field, thus making the folding angle obtained based on the fourth and fifth magnetic forces more accurate. Therefore, the above-described detection method, by canceling out the magnetic force exerted by the magnetic element on the first and second magnetic sensing elements in a first preset direction, can more accurately obtain the Earth's magnetic field and the magnetic force exerted by the magnetic element on the first and second magnetic sensing elements in the first preset direction. The detection process is less susceptible to interference from the Earth's magnetic field and the magnetic field of the magnetic element itself. Simultaneously, by obtaining the folding angle based on the fourth and fifth magnetic forces, the strong magnetic force exerted by the magnetic element on the first and second magnetic sensing elements is not hindered by a weak magnetic field from the Earth, thus the above-described detection method has high reliability. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 These are schematic diagrams of the electronic devices in some embodiments;

[0024] Figure 2 This is a schematic diagram of the structure of an electronic device in some embodiments where the first screen and the second screen are folded relative to each other;

[0025] Figure 3 This is a schematic diagram of the structure of an electronic device in some embodiments, showing the first and second screens unfolded relative to each other.

[0026] Figure 4 This is a flowchart illustrating the detection method in some embodiments;

[0027] Figure 5 This is a schematic diagram of the process for obtaining the third magnetic force based on the second difference coefficient in some embodiments;

[0028] Figure 6 This is a schematic diagram of the process for obtaining the folding angle based on the fourth and fifth magnetic forces in some embodiments;

[0029] Figure 7 This is a schematic diagram of the process for obtaining the folding angle based on magnetic force in a second preset direction in some embodiments;

[0030] Figure 8 This is a schematic diagram of the process for obtaining the magnetic force of the Earth's magnetic field on the first magnetic sensing element in some embodiments. Detailed Implementation

[0031] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of this application.

[0032] As used herein, "electronic device" refers to, but is not limited to, a device capable of receiving and / or transmitting communication signals connected via any one or more of the following connection methods:

[0033] (1) Via wired connection, such as via Public Switched Telephone Networks (PSTN), Digital Subscriber Line (DSL), digital cable, or direct cable connection;

[0034] (2) Via wireless interface, such as cellular network, wireless local area network (WLAN), digital television network such as DVB-H network, satellite network, AM-FM broadcast transmitter.

[0035] An electronic device configured to communicate via a wireless interface can be referred to as a "mobile terminal". Examples of mobile terminals include, but are not limited to, the following electronic devices:

[0036] (1) Satellite phone or cellular phone;

[0037] (2) A personal communications system (PCS) terminal that can combine cellular radio telephone with data processing, fax and data communication capabilities;

[0038] (3) Radio telephone, pager, Internet / intranet access, web browser, notepad, calendar, personal digital assistant (PDA) equipped with a Global Positioning System (GPS) receiver;

[0039] (4) Conventional above-knee and / or palm-sized receivers;

[0040] (5) Conventional knee-mounted and / or handheld wireless telephone transceivers, etc.

[0041] refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of an electronic device 10 provided in an embodiment of this application. The electronic device 10 may include a radio frequency (RF) circuit 501, a memory 502 including one or more computer-readable storage media, an input unit 503, a display unit 504, a sensor 505, an audio circuit 506, a wireless Fidelity (WiFi) module 507, a processor 508 including one or more processing cores, and a power supply 509, among other components. Those skilled in the art will understand that... Figure 1The structure of the electronic device 10 shown does not constitute a limitation on the electronic device 10. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0042] The radio frequency (RF) circuit 501 can be used to send and receive information, or to receive and send signals during a call. Specifically, it receives downlink information from the base station and hands it over to one or more processors 508 for processing; additionally, it sends uplink data to the base station. Typically, the RF circuit 501 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the RF circuit 501 can also communicate wirelessly with networks and other devices. This wireless communication can use any communication standard or protocol, including but not limited to GSM, GPRS, CDMA, WCDMA, LTE, email, and SMS.

[0043] Memory 502 can be used to store applications and data. The applications stored in memory 502 contain executable code. Applications can be composed of various functional modules. Processor 508 executes various functional applications and data processing by running the applications stored in memory 502. Memory 502 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of electronic device 10 (such as audio data, phonebook, etc.). Furthermore, memory 502 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 502 may also include a memory controller to provide access to memory 502 for processor 508 and input unit 503.

[0044] Input unit 503 can be used to receive input numbers, character information, or user characteristic information (such as fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in one embodiment, input unit 503 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display or touchpad, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch orientation and the signal generated by the touch operation, transmitting the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 508, and can receive and execute commands from the processor 508.

[0045] Display unit 504 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of electronic device 10. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Display unit 504 may include a display panel. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), organic light-emitting diode (OLED), etc. Further, a touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to processor 508 to determine the type of touch event. Subsequently, processor 508 provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 1 In this embodiment, the touch-sensitive surface and the display panel are two separate components for implementing input and output functions. However, in some embodiments, the touch-sensitive surface and the display panel can be integrated to achieve both input and output functions. It is understood that the display screen 110 may include an input unit 503 and a display unit 504.

[0046] The electronic device 10 may also include at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel according to the ambient light level, and the proximity sensor can turn off the display panel and / or backlight when the electronic device 10 is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the electronic device 10, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0047] Audio circuit 506 provides an audio interface between the user and electronic device 10 via a speaker and microphone. Audio circuit 506 converts received audio data into electrical signals, transmits them to the speaker, and the speaker outputs them as sound signals. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 506, converted back into audio data, and processed by processor 508. The audio data is then transmitted via radio frequency circuit 501 to, for example, another electronic device 10, or output to memory 502 for further processing. Audio circuit 506 may also include a headphone jack to facilitate communication between peripheral headphones and electronic device 10.

[0048] WiFi (Wireless Fidelity) is a short-range wireless transmission technology. Electronic device 10, through WiFi module 507, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 The wireless fidelity module 507 is shown, but it is understood that it is not a necessary component of the electronic device 10 and can be omitted as needed without changing the nature of the invention.

[0049] The processor 508 is the control center of the electronic device 10. It connects various parts of the electronic device 10 via various interfaces and lines. By running or executing applications stored in the memory 502 and calling data stored in the memory 502, it performs various functions and processes data of the electronic device 10, thereby providing overall monitoring of the electronic device 10. Optionally, the processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 508.

[0050] The electronic device 10 also includes a power supply 509 that supplies power to the various components. Preferably, the power supply 509 can be logically connected to the processor 508 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 509 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0051] although Figure 1 As not shown in the diagram, the electronic device 10 may also include a Bluetooth module, etc., which will not be described in detail here. In specific implementation, the above modules can be implemented as independent entities, or they can be arbitrarily combined and implemented as the same or several entities. For the specific implementation of the above modules, please refer to the previous method embodiments, which will not be described in detail here.

[0052] Please see Figure 2 and Figure 3 , Figure 2 This is a schematic diagram of the structure in some embodiments where the first screen 210 and the second screen 220 are folded relative to each other. Figure 3 This is a schematic diagram of the structure of the first screen 210 and the second screen 220 unfolded relative to each other in some embodiments. In some embodiments, the electronic device 10 includes a first screen 210 and a second screen 220 that can be folded relative to each other around a folding direction. Both the first screen 210 and the second screen 220 can be any applicable type of display device such as an LED display, an OLED display, or a liquid crystal display. The first screen 210 and the second screen 220 can be unfolded or folded relative to each other. When the first screen 210 and the second screen 220 are unfolded relative to each other, they can be parallel or coplanar, and the first screen 210 and the second screen 220 can be used as a single large display device. When the first screen 210 and the second screen 220 are folded relative to each other, the space occupied by the electronic device 10 can be reduced for easy carrying, or the first screen 210 and the second screen 220 can be used as two display devices to display different images respectively. It should be noted that in this application, the first screen 210 and the second screen 220 intersecting, or the first screen 210 and the second screen 220 being folded relative to each other until they are close together, can be regarded as the first screen 210 and the second screen 220 being folded relative to each other. When the first screen 210 and the second screen 220 are folded relative to each other, the included angle between the first screen 210 and the second screen 220 is the folding angle between the first screen 210 and the second screen 220. The folding angle includes, but is not limited to, 0°, 10°, 30°, 50°, 90°, 130°, 150°, 170°, etc.

[0053] Furthermore, in some embodiments, the electronic device 10 further includes a magnetic element 230, a first magnetic sensing element 240, a second magnetic sensing element 250, and a calculation unit (not shown). The magnetic element 230 is disposed at the fold of the first screen 210 and the second screen 220, the first magnetic sensing element 240 is disposed at the first screen 210, the second magnetic sensing element 250 is disposed at the second screen 220, and the calculation unit is used to obtain the folding angle between the first screen 210 and the second screen 220 based on the magnetic force received by the first magnetic sensing element 240 and the second magnetic sensing element 250.

[0054] The aforementioned electronic device 10, through its arithmetic unit, can reliably and accurately obtain the folding angles of the first screen 210 and the second screen 220 by canceling out the mutual interference between the magnetic field of the magnetic element 230 and the Earth's magnetic field by the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the magnetic force exerted by the magnetic element 230 on the second magnetic element 250. The method for detecting the folding angles of the first screen 210 and the second screen 220 by the aforementioned electronic device 10 is described below.

[0055] Please see Figure 4 , Figure 4 This is a flowchart illustrating a method for detecting the folding angle of the first screen 210 and the second screen 220, i.e., detecting the folding angle of the electronic device 10, in some embodiments. In some embodiments, the detection method includes:

[0056] Step 102: Obtain the first magnetic force received by the first magnetic sensing element 240 in the first preset direction.

[0057] In step 102, the first preset direction intersects the folding direction of the first screen 210 and the second screen 220. The angle between the first preset direction and the folding direction is not limited; for example, the first preset direction may be inclined to the folding direction at any applicable angle, or the first preset direction may be perpendicular to the folding direction. It is understood that the first magnetic force includes the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 in the first preset direction and the magnetic force of the magnetic element 230 on the first magnetic sensing element 240 in the first preset direction. In this application, the description of the magnetic force of one element on another element in a certain direction can be understood as the component of the magnetic force of that element on the other element in that direction.

[0058] Step 104: Obtain the second magnetic force on the second magnetic element 250 in the first preset direction.

[0059] The second magnetic force also includes the magnetic force of the Earth's magnetic field on the second magnetic element 250 in the first preset direction and the magnetic force of the magnetic element 230 on the first magnetic element 240 in the first preset direction.

[0060] Step S106: Obtain the first difference between the first magnetic force and the second magnetic force, and obtain the third magnetic force of the first magnetic sensing element 240 and the second magnetic sensing element 250 on the first preset direction based on the first difference.

[0061] It is understood that the first magnetic element 240 and the second magnetic element 250 are respectively disposed on both sides of the magnetic element 230, and the magnetic force of the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 is at least partially opposite in direction.

[0062] For example, refer to Figure 2 and Figure 3 As shown, in some embodiments, a spatial Cartesian coordinate system is constructed for the electronic device 10, wherein the Y-axis is parallel to the folding direction of the first screen 210 and the second screen 220. When the first screen 210 and the second screen 220 are unfolded relative to each other, the X-axis is perpendicular to the Y-axis and points from the geometric center of the magnetic element 230 to the geometric center of the second magnetic element 250, and the Z-axis is perpendicular to the first screen 210 and the second screen 220. In some embodiments, the first preset direction is parallel to the X-axis, the line connecting the geometric centers of the first magnetic element 240 and the second magnetic element 250 is perpendicular to the folding direction of the first screen 210 and the second screen 220, and the distances from the geometric centers of the first magnetic element 240 and the second magnetic element 250 to the geometric center of the magnetic element 230 are all equal. Therefore, in this embodiment, regardless of whether the first screen 210 and the second screen 220 are in an unfolded state or a folded state, the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in the first preset direction is equal in magnitude and opposite in direction.

[0063] For example, refer to Figure 2 As shown, the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 in the first preset direction is X1, and the magnetic force exerted by the magnetic element 230 on the second magnetic element 250 is X2. Therefore, X1 and X2 are equal in magnitude and opposite in direction. Thus, the first difference between the first and second magnetic forces is obtained. The magnetic forces exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 cancel each other out, and the resulting first difference is the sum of the magnetic forces exerted by the Earth's magnetic field on the first and second magnetic forces. It can be understood that in step S106, the first difference is divided by 2 to obtain the third magnetic force exerted by the Earth's magnetic field on the first magnetic element 240 and the third magnetic force exerted by the Earth's magnetic field on the second magnetic element 250.

[0064] It should be noted that in this application, both the first magnetic force and the second magnetic force can include the magnitude and direction of the magnetic force, and the direction of the magnetic force can be expressed as the positive or negative value. For example, in Figure 2In the illustrated embodiment, when the first screen 210 and the second screen 220 are in a folded state, the positive X-axis direction points from the magnetic element 230 to the second magnetic element 250. The magnetic element 230 and the first magnetic element 240 are arranged sequentially in the positive Z-axis direction. The magnetic force X1 exerted by the magnetic element 230 on the first magnetic element 240 in a first preset direction and the magnetic force X2 exerted by the magnetic element 230 on the second magnetic element 250 in the same preset direction are opposite in sign. It is understood that in step S106, describing the acquisition of the first difference between the first and second magnetic forces is to cancel out the magnetic force of the magnetic element 230 in the first and second magnetic forces. In this embodiment, when X1 and X2 are opposite in sign, acquiring the first difference between the first and second magnetic forces in step S106 means adding the first and second magnetic forces together to cancel out the opposite X1 and X2, resulting in the sum of the magnetic forces exerted by the Earth's magnetic field on the first magnetic element 240 and the second magnetic element 250.

[0065] Of course, in other embodiments, the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in a certain direction may also be in the same direction. Therefore, obtaining the first difference between the first magnetic force and the second magnetic force refers to subtracting the first magnetic force from the second magnetic force. For example, in other embodiments, the first preset direction is parallel to the Z-axis direction. In this embodiment, the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in the first preset direction is equal in magnitude and in the same direction. In other words, the magnetic force Z1 exerted by the magnetic element 230 on the first magnetic element 240 in the first preset direction and the magnetic force Z2 exerted by the magnetic element 230 on the first magnetic element 240 in the first preset direction are equal in magnitude and have the same sign. In this embodiment, in step S106, in order to counteract the magnetic force of the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in the same direction, it is necessary to subtract the first magnetic force and the second magnetic force to obtain the first difference. The first difference is the sum of the magnetic forces of the Earth's magnetic field on the first magnetic element 240 and the second magnetic element 250, which is twice the third magnetic force, thereby obtaining the third magnetic force.

[0066] In the above embodiment, the line connecting the geometric centers of the first magnetic element 240 and the second magnetic element 250 is perpendicular to the folding direction, and the distances from the geometric centers of the first magnetic element 240 and the second magnetic element 250 to the geometric center of the magnetic element 230 are equal, such that the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 is equal in the first preset direction. Therefore, in step S106, directly obtaining the first difference between the first magnetic force and the second magnetic force allows for obtaining twice the third magnetic force, which simplifies the detection method and improves detection efficiency.

[0067] Of course, the relative positional relationship between the first magnetic sensing element 240 and the second magnetic sensing element 250 and the magnetic element 230 can also be other choices. When the orientation and distance of the first magnetic sensing element 240 and the second magnetic sensing element 250 relative to the magnetic element 230 are not equal, the difference in magnetic force of the magnetic element 230 on the first magnetic sensing element 240 and the second magnetic sensing element 250 in the first preset direction can be offset by constructing a difference coefficient.

[0068] Specifically, in some embodiments, before step S106, the detection method further includes the following steps:

[0069] Based on the difference in the relative positions of the first magnetic sensing element 240, the second magnetic sensing element 250 and the magnetic element 230 in the first preset direction, a first difference coefficient of the magnetic force of the magnetic element 230 on the first magnetic sensing element 240 in the first preset direction is obtained, and a second difference coefficient of the magnetic force of the magnetic element 230 on the second magnetic sensing element 250 in the first preset direction is obtained.

[0070] It is understandable that when there are deviations in the distance and orientation of the first magnetic element 240 and the second magnetic element 250 relative to the magnetic element 230, for example, when the line connecting the geometric center of the first magnetic element 240 and the geometric center of the second magnetic element 250 is not perpendicular to the folding direction, and / or when the distances from the geometric center of the first magnetic element 240 and the geometric center of the second magnetic element 250 to the geometric center of the magnetic element 230 are not equal, the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in the first preset direction may be different, but there is a pattern to follow. The first difference coefficient and the second difference coefficient can be obtained by algorithm simulation according to this pattern.

[0071] For example, when the first preset direction is parallel to the X-axis, if the distance between the first magnetic element 240 and the magnetic element 230 in the first preset direction is greater than the distance between the second magnetic element 250 and the magnetic element 230 in the first preset direction, then the magnetic force of the magnetic element 230 on the first magnetic element 240 in the first preset direction is less than the magnetic force on the second magnetic element 250, that is, the value of X1 is less than the value of X2. And when the position of the second magnetic element 250 relative to the magnetic element 230 is fixed, the greater the distance between the first magnetic element 240 and the magnetic element 230 in the first preset direction, the greater the difference between the values ​​of X1 and X2. Therefore, through algorithmic simulation, a first difference coefficient a and a second difference coefficient b can be obtained based on the numerical difference between X1 and X2, such that the value of a*X1 equals the value of b*X2. For example, when the distance between the geometric center of the first magnetic element 240 and the geometric center of the magnetic element 230 in the first preset direction is greater than the distance between the geometric center of the second magnetic element 250 and the geometric center of the magnetic element 230 in the first preset direction, and simulation shows that when the value of X1 is half of X2, the first difference coefficient a = 2 and the second difference coefficient b = 1. The first and second difference coefficients cancel out the difference in magnetic force caused by the positional difference between the first magnetic element 240 and the second magnetic element 250 relative to the magnetic element 230.

[0072] refer to Figure 5 As shown, when the first difference coefficient and the second difference coefficient are obtained, in step S106, the step of obtaining the third magnetic force based on the first difference coefficient, the second difference coefficient, the first magnetic force, and the second magnetic force includes:

[0073] Step S1062: Obtain the first product of the first magnetic force and the first difference coefficient.

[0074] Step S1064: Obtain the second product of the second magnetic force and the second difference coefficient.

[0075] Step S1066: Obtain the sixth difference between the first product and the second product, and obtain the third magnetic force based on the sixth difference.

[0076] Understandably, when the first preset direction is parallel to the X-axis, i.e., X1 and X2 have opposite signs, in step S1066, the first product and the second product are summed to obtain the sixth difference. Since the first and second difference coefficients cancel out the positional deviations of the first magnetic element 240 and the second magnetic element 250 relative to the magnetic element 230, the sixth difference is twice the third magnetic force, thus obtaining the third magnetic force. When the first preset direction is parallel to the Z-axis, i.e., Z1 and Z2 have the same sign, in step S1066, the first product and the second product are subtracted to obtain the sixth difference, which is also twice the third magnetic force.

[0077] Of course, in the steps of obtaining the first and second difference coefficients described above, after obtaining the first difference coefficient a and the second difference coefficient b through algorithm simulation, actual testing can be used to verify whether the first difference coefficient a and the second difference coefficient b are correct. For example, the electronic device 10 can be placed at a location where the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 and the second magnetic sensing element 250 is known, the actual first and second magnetic forces can be obtained, and the above steps S1062, S1064, and S1066 can be implemented to verify whether the obtained third magnetic force is equal to the actual known third magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 and the second magnetic sensing element 250 in a first preset direction. If they are equal, it proves that the first and second difference coefficients are accurate, and the third magnetic force can be obtained based on the first and second difference coefficients in step S106.

[0078] Step S108: Obtain the second difference between the first magnetic force and the third magnetic force, and obtain the fourth magnetic force of the first magnetic element 240 on the magnetic element 230 in the first preset direction based on the second difference.

[0079] It is understood that the first magnetic force includes the fourth magnetic force exerted by the magnetic element 230 on the first magnetic sensing element 240 in the first preset direction and the third magnetic force exerted by the Earth's magnetic field on the first magnetic sensing element 240 in the first preset direction. Therefore, the second difference between the first magnetic force and the third magnetic force is the fourth magnetic force exerted by the magnetic element 230 on the first magnetic sensing element 240 in the first preset direction.

[0080] Step S110: Obtain the third difference between the second magnetic force and the third magnetic force, and obtain the fifth magnetic force of the second magnetic element 250 on the magnetic element 230 in the first preset direction based on the third difference.

[0081] Similarly, the second magnetic force includes the fifth magnetic force of the magnetic element 230 on the second magnetic sensing element 250 in the first preset direction, and the third magnetic force of the Earth's magnetic field on the second magnetic sensing element 250 in the first preset direction. Therefore, the fifth magnetic force can be obtained from the third difference.

[0082] Step S112: Obtain the folding angle between the first screen 210 and the second screen 220 based on the fourth and fifth magnetic forces.

[0083] It is understandable that when the first screen 210 and the second screen 220 are folded relative to each other around the folding direction, as the relative positions of the first screen 210 and the second screen 220 change, the positions of the first magnetic element 240 and the second magnetic element 250 relative to the magnetic element 230 also change, thereby causing the fourth magnetic force and the fifth magnetic force to change as well. At the same time, there is a corresponding relationship between the changes in the fourth magnetic force and the fifth magnetic force and the changes in the positions of the first magnetic element 240 and the second magnetic element 250 relative to the magnetic element 230.

[0084] refer to Figure 6 As shown, step S112 may include:

[0085] Step S1122: Establish a correlation model between the magnetic force of the magnetic element 230 and the first magnetic element 240 and the second magnetic element 250 and the folding angle.

[0086] For example, through algorithmic simulation, a correlation model is established based on the correspondence between changes in the folding angle and changes in the fourth magnetic force, and the correspondence between changes in the folding angle and changes in the fifth magnetic force. It is understood that in step S1122, the algorithmic simulation needs to eliminate the influence of the Earth's magnetic field, obtain the correspondence between the folding angle and the fourth and fifth magnetic forces, and accurately reflect the correspondence between the folding angle and the magnetic force changes of the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250. In the correlation model, the value of the fourth magnetic force can correspond one-to-one with the value of the folding angle, and the value of the fifth magnetic force can correspond one-to-one with the value of the folding angle.

[0087] Step S1124: Input the fourth and fifth magnetic forces as input values ​​into the association model, and determine the folding angle between the first screen 210 and the second screen 220 based on the output value of the association model.

[0088] It is understandable that in step S1122, the association model determines the one-to-one correspondence between the fourth magnetic force, the fifth magnetic force and the folding angle. Therefore, in step S1124, the fourth magnetic force and the fifth magnetic force are input into the association model, and the association model can output the corresponding folding angle, thereby obtaining the folding angle under the fifth magnetic force.

[0089] The above-described detection method, by obtaining the third magnetic force based on the first difference, can cancel out the magnetic force generated by the magnetic element 230 on the first magnetic sensing element 240 and the second magnetic sensing element 250, thereby making the obtained third magnetic force more accurate and unaffected by the magnetic field interference of the magnetic element 230. Furthermore, the fourth and fifth magnetic forces of the magnetic element 230 on the first magnetic sensing element 240 are obtained through the first, second, and third magnetic forces. These fourth and fifth magnetic forces are unaffected by the Earth's magnetic field, thus making the folding angle obtained based on the fourth and fifth magnetic forces more accurate. Therefore, the above-mentioned detection method, by canceling the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in the first preset direction, can more accurately obtain the Earth's magnetic field and the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in the first preset direction. The detection process is not easily affected by the magnetic field of the Earth and the magnetic field of the magnetic element 230. At the same time, the folding angle is obtained based on the fourth and fifth magnetic forces. The magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 is strong, and the folding angle is not difficult to obtain due to the weak magnetic force exerted by the Earth's magnetic field. The above-mentioned detection method has high reliability.

[0090] The folding method between the first screen 210 and the second screen 220 is not limited. In some embodiments, the first screen 210 and the second screen 220 can be rotated around a pivot and folded relative to each other. The axis of the pivot defines the folding direction between the first screen 210 and the second screen 220. The arrangement of the magnetic element 230 is not limited; it can be disposed on the surface of the pivot or housed within the pivot. The arrangement of the first magnetic sensing element 240 and the second magnetic sensing element 250 is also not limited; they can be disposed on any surface of the first screen 210 and the second screen 220 or housed within the first screen 210 and the second screen 220, as long as the first magnetic sensing element 240 and the second magnetic sensing element 250 can effectively sense the magnetic force of the magnetic element 230 and the Earth's magnetic field on the first magnetic sensing element 240 and the second magnetic sensing element 250.

[0091] Of course, the way the first magnetic sensing element 240 and the second magnetic sensing element 250 sense the magnetic force of the magnetic element 230 and the Earth's magnetic field on the first magnetic sensing element 240 and the second magnetic sensing element 250 is not limited, that is, the way the first magnetic force and the second magnetic force are obtained in steps S102 and S104 is not limited. In some embodiments, both the first magnetic sensing element 240 and the second magnetic sensing element 250 can be geomagnetic sensors. The first magnetic sensing element 240 can sense the first magnetic force received by the first magnetic sensing element 240 in a first preset direction, and the second magnetic sensing element 250 can sense the second magnetic force received by the second magnetic sensing element 250 in the first preset direction. The first magnetic sensing element 240 and the second magnetic sensing element 250 may also each include a magnet and a pressure sensor. The magnet is subjected to the first magnetic force and the second magnetic force generated by the magnetic element 230 and the Earth's magnetic field, and the pressure sensor is used to sense the first magnetic force and the second magnetic force. The first magnetic sensing element 240 and the second magnetic sensing element 250 may also both be Hall elements, which obtain the first magnetic force and the second magnetic force by sensing the change in current. Of course, in the above embodiments, the first magnetic sensing element 240 and the second magnetic sensing element 250 can both be used only to sense the first magnetic force and the second magnetic force. In other embodiments, the first magnetic sensing element 240 and the second magnetic sensing element 250 can also sense magnetic forces in one or more directions other than the first preset direction to achieve more functions. When the first magnetic sensing element 240 and the second magnetic sensing element 250 can sense magnetic forces in multiple directions, the first magnetic sensing element 240 and the second magnetic sensing element 250 can be achieved by setting a combination of multiple magnets and multiple pressure sensors, or by setting multiple Hall elements with different orientations. The functions that can be achieved by acquiring magnetic forces in multiple different directions are given in the following description.

[0092] For example, refer to Figure 7 As shown, in some embodiments, the detection method may further include:

[0093] Step S114: Obtain the ninth magnetic force received by the first magnetic sensing element 240 in the third preset direction.

[0094] The electronic device 10 may also have a second preset direction and a third preset direction. The second preset direction may be parallel to the folding direction, i.e., parallel to the Y-axis, and the third preset direction may be perpendicular to the first preset direction and the second preset direction. For example, when the first preset direction is parallel to the X-axis, the third preset direction may be parallel to the Z-axis, and when the first preset direction is parallel to the Z-axis, the third preset direction may be parallel to the X-axis.

[0095] Step S116: Obtain the tenth magnetic force received by the second magnetic element 250 in the third preset direction.

[0096] It is understandable that the ninth magnetic force includes the magnetic force of the magnetic element 230 and the Earth's magnetic field on the first magnetic element 240 in the third preset direction, and the tenth magnetic force includes the magnetic force of the magnetic element 230 and the Earth's magnetic field on the second magnetic element 250 in the third preset direction.

[0097] Step S118: Obtain the fifth difference between the ninth and tenth magnetic forces, and obtain the eleventh magnetic force experienced by the first magnetic sensing element 240 and the third magnetic sensing element in the third preset direction based on the fifth difference.

[0098] The process of obtaining the fifth difference can be obtained by referring to the process of obtaining the first difference in step S106 above. The step of obtaining the eleventh magnetic force based on the fifth difference can also be obtained by referring to the process of obtaining the third magnetic force based on the first difference in step S106 above.

[0099] Step S120: Obtain the seventh difference between the ninth and eleventh magnetic forces, and obtain the twelfth magnetic force of the first magnetic sensing element 240 in the third preset direction based on the seventh difference.

[0100] Step S122: Obtain the eighth difference between the tenth and eleventh magnetic forces, and obtain the thirteenth magnetic force of the second magnetic element 250 in the third preset direction based on the eighth difference.

[0101] The process of obtaining the seventh difference can be referenced from the process of obtaining the second difference in step S108. The process of obtaining the twelfth magnetic force based on the seventh difference can be referenced from the process of obtaining the fourth magnetic force based on the second difference in step S108. The process of obtaining the eighth difference can be referenced from the process of obtaining the third difference in step S110. The process of obtaining the thirteenth magnetic force based on the eighth difference can be referenced from the process of obtaining the fifth magnetic force based on the third difference in step S110. It can be understood that if the first preset direction is parallel to the X-axis in steps S104 to S110, then the third preset direction is parallel to the Z-axis in steps S114 to S120. If the first preset direction is parallel to the Z-axis in steps S104 to S110, then the third preset direction is parallel to the X-axis in steps S114 to S120.

[0102] Step S124: Obtain the folding angle between the first screen 210 and the second screen 220 based on the twelfth and thirteenth magnetic forces.

[0103] The process of obtaining the folding angle in step S124 can be referenced from steps S1122 and S1124. Through steps S102 to S112 and steps S114 to S122, the folding angle can be obtained based on the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in a first preset direction. Simultaneously, the folding angle can also be obtained based on the magnetic force exerted by the magnetic element 230 on the first magnetic element 240 and the second magnetic element 250 in a third preset direction. Two folding angle data points are obtained through the magnetic forces in the first and third preset directions, respectively. These two folding angle data points can corroborate each other, further improving the accuracy and reliability of the folding angle obtained by the detection method. If the difference between the two obtained folding angles is within the error range, it proves that the folding angle obtained by the above detection method has high accuracy and reliability.

[0104] In addition, through steps S102 to S106 and steps S114 to S118, the above detection method can obtain the folding angle between the first screen 210 and the second screen 220, and at the same time obtain the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 and the second magnetic sensing element 250 in the first preset direction and the second preset direction, that is, obtain the third magnetic force and the eleventh magnetic force.

[0105] Further, refer to Figure 8 As shown, in some embodiments, the detection method further includes:

[0106] Step S126: Obtain the sixth magnetic force of the magnetic element 230 received by the first magnetic element 240 in the second preset direction.

[0107] The second preset direction is parallel to the folding direction of the first screen 210 and the second screen 220, i.e., parallel to the Y-axis. The first, second, and third preset directions form a spatial rectangular coordinate system. It can be understood that when the first screen 210 and the second screen 220 are folded relative to each other around the folding direction, it is equivalent to folding relative to each other around the second preset direction. Therefore, in the second preset direction, regardless of the change in the folding angle between the first screen 210 and the second screen 220, the magnetic force of the magnetic element 230 on the first magnetic sensing element 240 and the second magnetic sensing element 250 remains constant. Figure 2 The magnetic forces Y1 and Y2 shown remain constant. Therefore, through algorithmic simulation, the sixth magnetic force exerted on the first magnetic sensing element 240 by the magnetic element 230 in the second preset direction can be obtained. This sixth magnetic force remains constant during the relative folding of the first screen 210 and the second screen 220. It is understandable that in obtaining the sixth magnetic force through algorithmic simulation, the influence of the Earth's magnetic field on the first magnetic sensing element 240 needs to be eliminated.

[0108] Step S128: Obtain the seventh magnetic force received by the first magnetic sensing element 240 in the second preset direction.

[0109] Understandably, the seventh magnetic force includes the magnetic force of the magnetic element 230 and the Earth's magnetic field on the first magnetic element 240 in the second preset direction.

[0110] Step S130: Obtain the fourth difference between the sixth and seventh magnetic forces, and obtain the eighth magnetic force of the first magnetic sensing element 240 under the influence of the Earth's magnetic field in the second preset direction based on the fourth difference.

[0111] Since the sixth magnetic force remains constant, the only factor affecting the seventh magnetic force is the change in the magnetic force exerted by the Earth's magnetic field on the first magnetic sensing element 240 in the second predetermined direction. The fourth difference, obtained by subtracting the sixth and seventh magnetic forces, is the eighth magnetic force exerted by the Earth's magnetic field on the first magnetic sensing element 240 in the second predetermined direction. The eighth magnetic force obtained through the above steps can accurately counteract the influence of the magnetic element 230, ensuring accurate and reliable acquisition of the eighth magnetic force. This avoids interference from the magnetic element 230 on the Earth's magnetic field or unreliable acquisition of the eighth magnetic force due to an excessively weak Earth's magnetic field.

[0112] Step S132: Obtain the magnetic force of the first magnetic sensing element 240 on the Earth's magnetic field based on the third magnetic force, the eighth magnetic force, and the eleventh magnetic force.

[0113] It is understandable that the third magnetic force is the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 in the first preset direction, the eighth magnetic force is the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 in the second preset direction, and the eleventh magnetic force is the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 in the third preset direction. In other words, the above detection method, while obtaining the folding angle between the first screen 210 and the second screen 220, can also obtain the components of the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 in three directions in a spatial rectangular coordinate system, thereby obtaining the accurate magnitude and direction of the total force of the Earth's magnetic field on the first magnetic sensing element 240 based on the synthesis of these three component forces.

[0114] Based on the magnitude and / or direction of the magnetic force of the Earth's magnetic field on the first magnetic sensing element 240 obtained in step S132, the overall orientation of the first magnetic sensing element 240 can be obtained through algorithm simulation. For example, the angle between the folding direction and the horizontal or vertical direction can be obtained, or the orientation of the first magnetic sensing element 240 in the Earth's magnetic field can be obtained to assist in realizing the navigation function of the electronic device 10. At the same time, the above detection method can eliminate the mutual interference between the magnetic element 230 and the Earth's magnetic field, and can also avoid the Earth's magnetic field being too weak and affecting the accuracy of the detection results. The obtained magnetic force of the Earth's magnetic field is accurate and reliable.

[0115] Of course, the above detection method can also obtain the magnetic force of the Earth's magnetic field received by the second magnetic sensing element 250. The acquisition process can be obtained by referring to the acquisition process of the magnetic force of the Earth's magnetic field received by the first magnetic sensing element 240 in steps S126 to S132. Alternatively, the magnetic forces of the Earth's magnetic field received by the first magnetic sensing element 240 and the second magnetic sensing element 250 can be acquired simultaneously. The two can be mutually verified, which can make the acquired results more accurate and reliable.

[0116] It should be noted that the order of steps S126 to S132, as well as steps S114 and S118, is not limited, as long as the eighth and eleventh magnetic forces can be obtained respectively.

[0117] Accordingly, those skilled in the art will understand that all or part of the processes in the control method of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium. For example, in the embodiments of the present invention, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps of the above detection method are implemented.

[0118] The computer-readable storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A detection method, characterized in that, The detection method is used to detect the folding angle of an electronic device. The electronic device includes a first screen, a second screen, a magnetic element, a first magnetic sensing element, and a second magnetic sensing element. The first screen and the second screen can be folded relative to each other around the folding direction. The magnetic element is disposed at the fold between the first screen and the second screen. The first magnetic sensing element is disposed on the first screen, and the second magnetic sensing element is disposed on the second screen. The detection method includes: The first magnetic force experienced by the first magnetic element in a first preset direction is obtained, wherein the first preset direction intersects the folding direction; Obtain the second magnetic force experienced by the second magnetic sensing element in the first preset direction; When the line connecting the geometric centers of the first magnetic element and the second magnetic element is perpendicular to the folding direction, and the distances between the geometric centers of the first and second magnetic elements and the geometric center of the magnetic element are equal, a first difference between the first magnetic force and the second magnetic force is obtained. Based on this first difference, a third magnetic force from the Earth's magnetic field on the first and second magnetic elements in the first preset direction is obtained. Alternatively, when the distances between the geometric centers of the first and second magnetic elements and the geometric center of the magnetic element are not equal, a third magnetic force is obtained based on the difference in the relative positions of the first magnetic element, the second magnetic element, and the magnetic element in the first preset direction. A first difference coefficient of the magnetic force exerted by the magnetic element on the first magnetic sensing element in the first preset direction is obtained, and a second difference coefficient of the magnetic force exerted by the magnetic element on the second magnetic sensing element in the first preset direction is obtained. The first difference coefficient and the second difference coefficient are used to compensate for the positional difference between the first magnetic sensing element and the second magnetic sensing element relative to the magnetic element in the first preset direction. A first product of the first magnetic force and the first difference coefficient is obtained, and a second product of the second magnetic force and the second difference coefficient is obtained. A sixth difference between the first product and the second product is obtained, and a third magnetic force exerted by the Earth's magnetic field on the first magnetic sensing element and the second magnetic sensing element in the first preset direction is obtained based on the sixth difference. The second difference between the first magnetic force and the third magnetic force is obtained, and the fourth magnetic force on the first magnetic element in the first preset direction is obtained based on the second difference; The third difference between the second magnetic force and the third magnetic force is obtained, and the fifth magnetic force on the second magnetic element in the first preset direction is obtained based on the third difference; The folding angle between the first screen and the second screen is obtained based on the fourth magnetic force and the fifth magnetic force.

2. The detection method according to claim 1, characterized in that, The first preset direction is perpendicular to the folding direction.

3. The detection method according to claim 1, characterized in that, When the first screen and the second screen are unfolded relative to each other, the first preset direction points from the geometric center of the first magnetic element to the geometric center of the magnetic element; or, When the first screen and the second screen are unfolded relative to each other, the first preset direction is perpendicular to the first screen.

4. The detection method according to claim 1, characterized in that, The detection method further includes: The first magnetic element is subjected to a sixth magnetic force from the magnetic element in a second preset direction, where the second preset direction is parallel to the folding direction. Obtain the seventh magnetic force experienced by the first magnetic sensing element in the second preset direction; The fourth difference between the sixth magnetic force and the seventh magnetic force is obtained, and the eighth magnetic force of the first magnetic sensing element in the second preset direction is obtained based on the fourth difference.

5. The detection method according to claim 4, characterized in that, The detection method further includes: Obtain the ninth magnetic force experienced by the first magnetic sensing element in a third preset direction, wherein the third preset direction is perpendicular to the first preset direction and the second preset direction; Obtain the tenth magnetic force experienced by the second magnetic sensing element in the third preset direction; The fifth difference between the ninth and tenth magnetic forces is obtained, and the eleventh magnetic force of the first and second magnetic elements under the Earth's magnetic field in the third preset direction is obtained based on the fifth difference. The magnetic force of the first magnetic sensing element on the Earth's magnetic field is obtained based on the third magnetic force, the eighth magnetic force, and the eleventh magnetic force.

6. The detection method according to claim 1, characterized in that, Both the first magnetic force and the second magnetic force include the magnitude and direction of the magnetic force.

7. The detection method according to claim 1, characterized in that, Before the step of obtaining the folding angle between the first screen and the second screen based on the fourth magnetic force and the fifth magnetic force, the detection method further includes: Establish a correlation model between the magnetic force of the magnetic element on the first magnetic element and the second magnetic element and the folding angle; The step of obtaining the folding angle between the first screen and the second screen based on the fourth magnetic force and the fifth magnetic force includes: The fourth and fifth magnetic forces are input into the association model as input values, and the folding angle between the first screen and the second screen is determined based on the output value of the association model.

8. A computer-readable storage medium storing computer-readable instructions thereon, characterized in that, When the computer-readable instructions are executed by a processor, they implement the steps of the detection method according to any one of claims 1-7.

9. An electronic device, characterized in that, include: First screen; A second screen that can be folded relative to the first screen; Magnetic elements are disposed at the folding point of the first screen and the second screen; A first magnetic sensing element is disposed on the first screen; A second magnetic sensing element is disposed on the second screen; The arithmetic unit is used to obtain the folding angle between the first screen and the second screen based on the detection method as described in any one of claims 1-7, according to the magnetic force received by the first magnetic sensing element and the second magnetic sensing element.

10. The electronic device according to claim 9, characterized in that, The first screen and the second screen can be folded relative to each other around the folding direction. The magnetic element is disposed at the fold between the first screen and the second screen. The line connecting the geometric centers of the first magnetic element and the second magnetic element is perpendicular to the folding direction.

11. The electronic device according to claim 9, characterized in that, The distances from the geometric center of the first magnetic element and the geometric center of the second magnetic element to the geometric center of the magnetic element are equal.

Citation Information

Patent Citations

  • Folding angle detection method and device, terminal and storage medium

    CN110207643A

  • Electronic device and method for detecting folding angle of electronic device

    CN110360922A