Anti-collision method and device, electronic equipment and storage medium
By placing a magnetic induction device below the first display of a dual-screen laptop, the magnetic position of the external keyboard is detected and the locking device is controlled, thus solving the collision problem when the external keyboard is closed and achieving a safe and reliable user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LCFC HEFEI ELECTRONICS TECH
- Filing Date
- 2026-01-12
- Publication Date
- 2026-05-12
AI Technical Summary
When the external keyboard of a dual-screen laptop is magnetically attached to the C-side screen, the B-side screen may collide with the hard external keyboard during the closing process, posing a safety hazard of screen breakage.
By setting N magnetic induction devices below the first display screen, the magnetic position of the external keyboard is detected, and the locking angle threshold is determined according to the preset relationship between the position and the locking angle. The locking devices prevent the display screen from closing when the included angle is less than or equal to the threshold. By combining the angle detection and the real-time monitoring of the magnetic induction devices, collision prevention is achieved.
It effectively prevents collisions between the display screen and the keyboard, improving the safety and reliability of dual-screen electronic devices when using an external keyboard.
Smart Images

Figure CN122018640A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment control technology, and in particular to an anti-collision method, device, electronic device and storage medium. Background Technology
[0002] Dual-screen laptops typically have both a B-side (traditional display side) and a C-side (traditional keyboard side) dedicated to screens. To compensate for the lack of a physical keyboard, a virtual keyboard and touchpad are usually implemented on the C-side screen via software. These laptops also often come equipped with an external keyboard, such as a Bluetooth keyboard, that can magnetically attach to the C-side screen. However, when the external keyboard is magnetically attached to the C-side screen, closing the laptop can easily cause the B-side screen to collide with the hard external keyboard, potentially resulting in a crack in the B-side screen. In other words, the design of dual-screen laptops in this technology presents a safety hazard. Summary of the Invention
[0003] This application provides a collision avoidance method, apparatus, device, and storage medium to at least solve the above-mentioned technical problems existing in the prior art.
[0004] A first aspect of this application provides an anti-collision method applied to an electronic device, the electronic device including a first display screen and a second display screen, the first display screen and the second display screen being connected by a hinge, the hinge being provided with a locking device, an external keyboard being able to be magnetically attached to the first display screen, and N magnetic induction devices being provided below the first display screen, the method comprising: In response to the output of N magnetic induction devices satisfying a first preset condition, the magnetic attachment position of the external keyboard on the first display screen is determined based on the relative positions of the N magnetic induction devices and the first display screen, where N is an integer greater than 0; Based on the pre-set correspondence between position and locking angle, determine the locking angle threshold corresponding to the adsorption position; In response to a first included angle being less than or equal to the locking angle threshold, the locking device is controlled to lock to prevent the first display screen and the second display screen from closing, wherein the first included angle is the angle between the first display screen and the second display screen.
[0005] In one possible implementation, the output of the magnetic induction device satisfies a first preset condition, including: the level of the output of the magnetic induction device changes from a first level to a second level, wherein the first level is higher than the second level; or, the level of the output of the magnetic induction device is the second level and the duration of maintaining the second level exceeds a preset duration threshold.
[0006] In one possible implementation, determining the magnetic attachment position of the external keyboard on the first display screen based on the relative positions of the N magnetic induction devices and the first display screen includes: In response to the magnetic induction device that meets the first preset condition being distributed in the first installation area below the first display screen, the first placement area of the first display screen is determined to be the magnetic position of the external keyboard on the first display screen. In response to the magnetic induction device that meets the first preset condition being distributed in the second mounting area below the first display screen, the second placement area of the first display screen is determined as the adsorption position of the external keyboard on the first display screen.
[0007] In one possible implementation, before controlling the locking device to lock in response to a first included angle being less than or equal to the locking angle threshold, the method further includes: Based on the pre-defined correspondence between position and alarm angle, determine the alarm angle threshold corresponding to the adsorption position; In response to the first included angle being less than or equal to the alarm angle threshold, a voice alarm is issued, wherein the alarm angle threshold is greater than the locking angle threshold.
[0008] In one possible implementation, the method further includes: In response to the first included angle being greater than the locking angle threshold and / or the outputs of the N magnetic induction devices not meeting the first preset condition, the locking device is controlled to stop the locking action so that the first display screen and the second display screen can be closed.
[0009] A second aspect of this application provides an anti-collision device applied to an electronic device, the electronic device including a first display screen and a second display screen, the first display screen and the second display screen being connected by a hinge, the hinge being provided with a locking device, an external keyboard being able to be magnetically attached to the first display screen, and N magnetic induction devices being provided below the first display screen, the device comprising: The first determining module is used to determine the adsorption position of the external keyboard on the first display screen based on the relative positions of the N magnetic induction devices and the first display screen in response to the output of the N magnetic induction devices satisfying the first preset condition, where N is an integer greater than 0. The second determining module is used to determine the locking angle threshold corresponding to the adsorption position based on the pre-set correspondence between the position and the locking angle. The control module is configured to control the locking device to lock in response to a first included angle being less than or equal to the locking angle threshold, so as to prevent the first display screen and the second display screen from closing, wherein the first included angle is the angle between the first display screen and the second display screen.
[0010] In one possible implementation, the first determining module includes: The first determining submodule is used to determine the first placement area of the first display screen as the adsorption position of the external keyboard on the first display screen in response to the output of a magnetic induction device distributed in a first installation area below the first display screen that meets the first preset condition. The second determining submodule is used to determine the second placement area of the first display screen as the adsorption position of the external keyboard on the first display screen in response to the output of a magnetic induction device distributed in a second installation area below the first display screen that meets the first preset conditions.
[0011] In one possible embodiment, the device further includes: The third determining module is used to determine the alarm angle threshold corresponding to the adsorption position based on the pre-set correspondence between the position and the alarm angle. The warning module is used to issue a voice alarm in response to the first included angle being less than or equal to the alarm angle threshold, wherein the alarm angle threshold is greater than the locking angle threshold.
[0012] A third aspect of this application provides an electronic device comprising: The first display screen is connected to the second display screen via a hinge and is used to hold an external keyboard. The hinge is equipped with a locking device, which is connected to an embedded controller. The second display screen; N magnetic induction devices are distributed below the first display screen to detect magnetic signals triggered by the external keyboard; The embedded controller is used to execute the anti-collision method described in this application.
[0013] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the methods described in this application.
[0014] The anti-collision method, apparatus, device, and storage medium of this application, in response to the output of N magnetic sensing devices satisfying a first preset condition, determines the adsorption position of the external keyboard on the first display screen based on the relative positions of the N magnetic sensing devices and the first display screen, where N is an integer greater than 0; determines a locking angle threshold corresponding to the adsorption position according to a preset correspondence between the position and the locking angle; and controls the locking device to lock in response to a first included angle being less than or equal to the locking angle threshold, thereby preventing the first display screen and the second display screen from closing, where the first included angle is the angle between the first display screen and the second display screen. By detecting the first included angle between the first display screen and the second display screen, and physically locking the screen based on the locking device within the hinge of the electronic device when the first included angle is less than or equal to the locking angle threshold, collisions between the display screen and the keyboard are fundamentally prevented, significantly improving the safety and reliability of dual-screen electronic devices when using an external keyboard.
[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0016] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, wherein: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0017] Figure 1 A schematic diagram illustrating the implementation flow of the anti-collision method provided in an embodiment of this application is shown; Figure 2 The diagram shows a keyboard HallSensor circuit diagram provided in an embodiment of this application; Figure 3 The diagram shows a Hinge control circuit provided in an embodiment of this application; Figure 4 A schematic diagram illustrating the implementation flow of the region determination operation of the anti-collision method provided in the embodiments of this application is shown; Figure 5 A schematic diagram of the composition structure of the anti-collision device provided in the embodiments of this application is shown. Detailed Implementation
[0018] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] Figure 1 A schematic diagram illustrating the implementation process of the anti-collision method provided in this application embodiment is shown.
[0020] The anti-collision method of this application embodiment is mainly applied to the embedded controller (EC) of a dual-screen electronic device. The electronic device includes a first display screen (C screen) and a second display screen (B screen), which are connected by a hinge. A locking device is provided in the hinge. An external keyboard can be magnetically attached to the first display screen. N magnetic induction devices are disposed below the first display screen. The method includes at least the following: Operation 101: In response to the output of N magnetic induction devices satisfying the first preset condition, the magnetic attachment position of the external keyboard on the first display screen is determined based on the relative positions of the N magnetic induction devices and the first display screen, where N is an integer greater than 0.
[0021] To accurately detect the presence of an external keyboard on the first display screen and further identify its specific magnetic attachment location, this embodiment of the application distributes N magnetic induction devices in a distributed manner below the first display screen. The external keyboard can be a dedicated accessory designed specifically for this electronic device, or a third-party Bluetooth keyboard conforming to common specifications. The external keyboard contains a built-in magnet that can be detected by the magnetic induction devices.
[0022] In one embodiment of this application, the magnetic sensing device can be a Hall sensor. Preferably, there are two magnetic sensing devices, which can be respectively arranged in the upper and lower areas below the first display screen. It should be noted that this application does not specifically limit the number and arrangement of the magnetic sensing devices; in other possible embodiments, three or more magnetic sensing devices can be arranged in an array to achieve more precise keyboard area positioning, such as left, center, and right; or a more sensitive magnetic element, such as an anisotropic magnetoresistive sensor, can be selected to improve the anti-interference capability and accuracy of the detection.
[0023] During the operation of the electronic device, each magnetic induction device continuously or periodically monitors the magnetic field strength within its sensing area. When an external keyboard with a built-in magnet is placed on the first display screen, the magnetic field (i.e., magnetic signal) generated by the magnet inside the keyboard will act on the corresponding magnetic induction device. As a detection element, after sensing a magnetic field of predetermined strength, the output state of the magnetic induction device will change accordingly, for example, the level of the output pin will change from high level to low level. By monitoring the output state of each magnetic induction device in real time, it is possible to effectively determine whether the external keyboard has been placed on the first display screen.
[0024] To accurately determine whether the external keyboard is stably placed on the first display screen, rather than just being momentarily close, this application also configures a condition for determining the detection of a valid magnetic signal, namely a first preset condition. Only when the output of the magnetic induction device meets the first preset condition is it determined that the external keyboard has been attracted to the first display screen.
[0025] In one embodiment of this application, the output of the magnetic induction device satisfies a first preset condition, including: the output level of the magnetic induction device changes from a first level to a second level, where the first level is higher than the second level; or, the output level of the magnetic induction device is the second level and remains at the second level for a duration exceeding a preset duration threshold. Wherein, the first level is higher than the second level, the first level represents a high level, used to indicate an idle state where the magnetic induction device has not detected a magnet, and the second level represents a low level, used to indicate a triggered state where the magnetic induction device has detected a magnet. The preset duration threshold can be configured according to actual needs, and this application does not specifically limit it.
[0026] In one embodiment of this application, the embedded controller can monitor the output status of each magnetic induction device in real time through its general-purpose input / output interface in an interrupt or polling manner.
[0027] Furthermore, when the outputs of the N magnetic induction devices meet the first preset condition, it proves that the external keyboard has been attracted to the first display screen. At this point, the attraction position of the external keyboard on the first display screen can be determined based on the relative positions of the N magnetic induction devices and the first display screen. For example, the physical installation position of the magnetic induction devices can be mapped to the corresponding placement area of the external keyboard on the first display screen.
[0028] For example, see reference. Figure 2 , Figure 2The diagram illustrates a keyboard HallSensor circuit diagram provided in an embodiment of this application. In this embodiment, the N magnetic sensing devices can be two HallSensors, US1 and US2, configured below the first display screen. As shown in the circuit diagram, the OUTPUT pin of US1 is connected to the EC via resistor RS3, and the OUTPUT pin of US2 is connected to the EC via resistor RS4. Simultaneously, the VDO pins of US1 and US2 are also connected to the power supply line +3P3VS via resistors RS1 and RS2, respectively, to provide a stable power supply for the HallSensors (US1, US2). When an external keyboard is attached to the corresponding area of the device, the keyboard's built-in magnetic components cause the HallSensor to sense a change in the magnetic field signal. At this time, the HallSensor outputs a corresponding level signal, which is transmitted to the EC via the Hall_Sensor_Output1 / Hall_Sensor_Output2 line, thus notifying the EC that the keyboard has been attached. When the external keyboard is removed from the device, the HallSensor senses the disappearance of the magnetic field and also outputs a corresponding level signal, notifying the EC that the keyboard has been detached.
[0029] Operation 102: Determine the locking angle threshold corresponding to the adsorption position based on the pre-set correspondence between the position and the locking angle.
[0030] To adapt to the actual anti-collision requirements of different adsorption positions, this application embodiment configures different locking angle thresholds for different adsorption positions. For example, when the external keyboard is adsorbed near the hinge, the risk of it colliding with the first display screen during the closing process is relatively high. Therefore, a more conservative locking angle threshold with a larger angle value is required to achieve early intervention. Conversely, when the keyboard is adsorbed far from the hinge, the risk of collision is relatively low, so a locking angle threshold with a smaller angle value can be configured, thereby reserving more space for the user to close the lid.
[0031] In one embodiment of this application, the locking angle threshold can be determined based on a pre-defined correspondence between position and locking angle. Specifically, this application pre-establishes and maintains a preset mapping table of adsorption positions and locking angle thresholds. This mapping table is based on the collision risk level of different adsorption positions and clearly describes the correspondence between each adsorption position and the locking angle threshold. Thus, after determining the adsorption position of the external keyboard, the locking angle threshold corresponding to the adsorption position can be obtained from the mapping table.
[0032] Operation 103, in response to the first included angle being less than or equal to the locking angle threshold, controls the locking device to lock to prevent the first display screen and the second display screen from closing, the first included angle being the angle between the first display screen and the second display screen.
[0033] After determining the placement area of the external keyboard on the first display screen, in order to implement precise anti-collision control, it is necessary to obtain the relative angle between the first display screen and the second display screen in real time, i.e., the first angle. In this embodiment, an integrated angle detection device can be used to detect the angle between the first display screen and the second display screen in real time.
[0034] When the detected first included angle is less than or equal to the locking angle threshold corresponding to the current external keyboard placement area, it indicates that there is a risk of collision between the second display screen and the keyboard. At this time, the embedded controller immediately sends a control signal to the locking device inside the hinge. The locking device responds to the control signal and locks, preventing the first and second displays screens from closing further.
[0035] In one embodiment of this application, the locking device can be an electromagnetic lock driven by an electrical signal or a mechanical braking mechanism driven by a motor, both of which are connected to the embedded controller. Upon receiving a signal, the locking device performs a locking action, physically preventing the shaft from continuing to rotate, thereby forcibly interrupting the user's closing operation and preventing collision between the second display screen and the keyboard. For example, the motor-driven mechanical braking mechanism can be specifically configured as two meshing gears (driving gear and driven gear) coaxially linked with the shaft, and an electromagnetic repulsion component controlled by the Hinge motor is provided next to the gear set. When the embedded controller determines that a locking action needs to be performed, it sends a control command to the Hinge motor via a signal. The motor drives the electromagnetic repulsion component to activate, generating a directional electromagnetic repulsion force between the two meshing gears. This repulsion force breaks the original meshing transmission state of the gears, forcing the driving gear and driven gear to separate from each other or maintain a fixed relative position, preventing them from continuing to rotate in the closing direction, thus locking the entire shaft. When the collision risk is eliminated, such as when the external keyboard is removed or the angle between the two screens returns to a safe value, the embedded controller sends an unlock signal, the Hinge motor controls the electromagnetic repulsion component to de-energize, the gear set resumes meshing, and the shaft resumes free rotation, no longer affecting the normal opening and closing of the device.
[0036] The locking device can be connected to the embedded controller via a Hinge control circuit; for details, see [link to documentation]. Figure 3 , Figure 3 A Hinge control circuit diagram provided in an embodiment of this application is shown. For example... Figure 3As shown, the Hinge control circuit may include a connector JHinge1 and a +5V SHINGE power supply line for powering the Hinge motor. The EC's HINGE_OFF_EC and HINGE_ON_EC pins are connected to pins 2 and 3 of JHinge1 in the Hinge control circuit. JHinge1 is connected to the Hinge motor, and pins 5 and 6 of JHinge1 are connected to GND1 and GND2 ground lines to cooperate with the +5V SHINGE power supply line and provide a stable power supply circuit for the Hinge motor. When locking is required, the EC can send a locking control signal through the HINGE_ON_EC pin. This signal is transmitted to the Hinge motor via JHinge1, controlling the locking device to perform a locking action. When the EC sends an unlocking control signal through the HINGE_OFF_EC pin, this signal is transmitted to the Hinge motor via JHinge1, controlling the locking device to release the locking action.
[0037] Thus, this embodiment of the application detects the first angle between the first display screen and the second display screen, and when the first angle is less than or equal to the locking angle threshold, it performs physical locking based on the locking device inside the hinge of the electronic device, fundamentally preventing the collision between the display screen and the keyboard, and significantly improving the safety and reliability of the dual-screen electronic device when using an external keyboard.
[0038] In one embodiment of this application, obtaining the angle between the first display screen and the second display screen includes: obtaining the angle between the first display screen and the second display screen through a sensor hub of an electronic device, wherein the angle is calculated by receiving sensor data collected from the first inertial measurement unit and the second inertial measurement unit via the sensor hub.
[0039] The electronic device also includes an angle detection unit, comprising a first inertial measurement unit (IMU) mounted on the motherboard (MB) and a second IMU mounted on a flexible printed circuit (FPC). The device also includes an integrated sensor hub (ISH) and a central processing unit (CPU) connected to the embedded controller and the two IMUs, respectively. The first IMU is directly soldered or mounted on the motherboard, and its signal output is connected to the sensor hub via motherboard traces. The second IMU is mounted on the flexible printed circuit board, with one end connected to the motherboard and the other end connected to the hardware module of the second display screen. Its signal output is also transmitted back to the sensor hub on the motherboard via traces in the flexible printed circuit board. The sensor hub communicates with the CPU via a system bus, aggregating raw data from the two IMUs, i.e., sensor data. The CPU and the embedded controller exchange instructions and data via a system management bus or other types of low-speed serial buses.
[0040] In one embodiment of this application, the inertial measurement unit can be an acceleration and gravity sensor (A+G sensor). This A+G sensor, as an integrated microelectromechanical system component, internally includes a multi-axis accelerometer and a gyroscope, capable of simultaneously measuring the linear acceleration and rotational angular velocity of an object in three-dimensional space. The linear acceleration and rotational angular velocity acquired by the A+G sensor are collectively referred to as sensor data.
[0041] Specifically, after the external keyboard is placed on the first display screen, two accelerometers and gravity sensors, fixed to the MB and FPC ends respectively, can change their relative attitude in space as the first and second displays open and close. ISH continuously collects triaxial acceleration and angular velocity data from these two A+G sensors. The CPU processes this sensor data using a sensor fusion algorithm (such as a quaternion-based attitude calculation algorithm) and calculates the precise real-time angle between screens B and C via ISH. Subsequently, the CPU feeds back the calculated angle value to the embedded controller via ISH.
[0042] Figure 4 The diagram illustrates the implementation flow of the region determination operation of the anti-collision method provided in this application embodiment.
[0043] refer to Figure 4In one embodiment of this application, in the above-described operation 101, determining the magnetic attachment position of the external keyboard on the first display screen based on the relative positions of the N magnetic induction devices and the first display screen includes: Operation 201: In response to the output of magnetic induction devices that meet the first preset conditions distributed in the first installation area below the first display screen, the first placement area of the first display screen is determined to be the magnetic attachment position of the external keyboard on the first display screen. Operation 202: In response to the output of a magnetic induction device that meets the first preset condition being distributed in the second mounting area below the first display screen, the second placement area of the first display screen is determined as the magnetic attachment position of the external keyboard on the first display screen.
[0044] The different positions where the external keyboard is attached result in different locking angle thresholds. Therefore, it is necessary to determine the specific attachment position of the external keyboard. Specifically, the mounting position below the first display screen can be divided into a first mounting area and a second mounting area. The first mounting area is located in the upper part of the area below the first display screen, and the second mounting area is located in the lower part of the area below the first display screen. Correspondingly, the first display screen can be divided into a first placement area corresponding to the first mounting area and a second placement area corresponding to the second mounting area. The first placement area can be understood as the upper half of the first display screen, and the second placement area can be understood as the lower half of the first display screen.
[0045] It should be noted that this application does not specifically limit the number and distribution of installation and placement areas. The above description of dividing the area into upper and lower parts is only an exemplary implementation. In other feasible implementations, the display screen can be divided into multiple areas side by side on the left and right, or a finer grid partitioning can be used (e.g., divided into six 3x2 areas). Any division method that can map the physical installation position to the specific placement area of the display screen through multiple magnetic induction devices is within the protection scope of this application.
[0046] When the external keyboard is placed on the first display screen, the magnets inside the keyboard trigger the corresponding magnetic induction devices on the motherboard. When the external keyboard is placed in the first placement area of the first display screen, its magnets cover and trigger the magnetic induction device US1 located in the first mounting area above the first display screen. After sensing the magnet, US1 actively pulls down the level of its output pin (OUTPUT-HALL1). When the embedded controller detects that the pin level (HALL_SENSOR1_OUTPUT_EC PIN) from US1 is low, it determines that the external keyboard is attached to the first placement area of the first display screen. Similarly, when the keyboard is placed in the second placement area of the first display screen, it triggers the magnetic induction device US2 in the lower area, pulling down its output level (OUTPUT-HALL2). When the embedded controller detects that the pin level (HALL_SENSOR2_OUTPUT_EC PIN) of US2 is low, it determines that the keyboard is attached to the lower half of the first display screen, i.e., the second placement area.
[0047] In one embodiment of this application, before controlling the locking device to lock in response to the first included angle being less than or equal to the locking angle threshold, an alarm angle threshold corresponding to the adsorption position is determined according to a pre-set correspondence between the position and the alarm angle. An alarm message is issued in response to the first included angle being less than or equal to the alarm angle threshold. The alarm angle threshold is greater than the corresponding locking angle threshold.
[0048] Each locking action forcibly interrupts the user's lid-closing operation, resulting in a poor user experience. Therefore, to enhance the user experience, this application embodiment preferably adopts a warning-before-locking approach for collision prevention. Specifically, this application embodiment configures an alarm angle threshold greater than the locking angle threshold for early prevention. When the first included angle is less than the alarm angle threshold, an alarm message is issued first, such as a voice broadcast or pop-up reminder to the user. If the user continues to close the lid after receiving the voice warning or pop-up reminder, causing the included angle to decrease further to a more stringent locking angle threshold, then locking is executed. The alarm angle threshold can be obtained based on a pre-set correspondence between position and alarm angle. The correspondence between position and alarm angle can be configured based on the collision risk level of the attachment position. For example, when the external keyboard is placed on the upper half of the first display screen, the collision risk is higher, so the alarm angle threshold can be configured to 90 degrees; when the keyboard is placed on the lower half, the risk is relatively lower, so the alarm angle threshold can be configured to 60 degrees.
[0049] In one embodiment of this application, the alarm information is a voice alarm. The electronic device is also equipped with an audio device connected to an embedded controller. In response to the first included angle being less than or equal to the alarm angle threshold corresponding to the placement area, the audio device issues an alarm information. Specifically, in response to the first included angle being less than the alarm angle threshold, an alarm control signal is sent to the audio device so that the audio device responds to the alarm control signal and issues a voice alarm.
[0050] In one embodiment of this application, when the adsorption position is a first placement area of the first display screen, the alarm angle threshold is a first alarm angle threshold, and the locking angle threshold is a first locking angle threshold; when the adsorption position is a second placement area of the first display screen, the alarm angle threshold is a second alarm angle threshold, and the locking angle threshold is a second locking angle threshold. Wherein, the first alarm angle threshold is greater than the second alarm angle threshold, the first locking angle threshold is greater than the second locking angle threshold, the first alarm angle threshold is greater than the first locking angle threshold, and the second alarm angle threshold is greater than the second locking angle threshold. Specifically, to achieve precise area-adaptive anti-collision protection, this application configures differentiated thresholds for different keyboard placement areas. Given that when the external keyboard is placed in the upper half of the first display screen, it is closer to the hinge, and the second display screen will contact the keyboard earlier during the closing process, while when the external keyboard is placed in the lower half, the collision risk point is relatively further back, allowing for a smaller closing angle, this application configures a higher first alarm angle threshold and a higher first locking angle threshold for the placement area in the upper half of the first display screen. For the attachment position in the lower half of the first display screen, a second alarm angle threshold and a second locking angle threshold lower than the first alarm angle threshold are configured. Furthermore, to ensure the "warning first, locking later" logic, guaranteeing that the warning always precedes the locking, the first alarm angle threshold is configured to be greater than the first locking angle threshold, and the second alarm angle threshold is configured to be greater than the second locking angle threshold.
[0051] In one embodiment of this application, after locking is performed, a locking release mechanism is also configured, specifically including: in response to the first included angle being greater than the locking angle threshold and / or the output of N magnetic induction devices not meeting the first preset condition, controlling the locking device to stop the locking action so that the first display screen and the second display screen can be closed.
[0052] Specifically, when the electronic device locks due to collision prevention requirements, it continuously monitors the first angle between the first and second displays, as well as the connection status between the external keyboard and the first display. If the angle increases again and exceeds the locking angle threshold of the current placement area, it indicates that the collision risk has been eliminated. At this point, the lock is automatically released, and the hinge resumes normal rotation. Simultaneously, the connection status between the external keyboard and the first display is determined by continuously monitoring the output status of the magnetic sensors. When the outputs of N magnetic sensors do not meet the first preset condition, it can be determined that the external keyboard has been removed. In this case, regardless of the first angle, the lock is immediately released. This dual-judgment mechanism ensures both secure locking when a risk exists and immediate restoration after the risk is eliminated, achieving a balance between safety and availability.
[0053] Figure 5 A schematic diagram of the composition structure of the anti-collision device provided in the embodiments of this application is shown.
[0054] refer to Figure 5 This application also provides an anti-collision device applied to an electronic device. The electronic device includes a first display screen and a second display screen, which are connected by a hinge. A locking device is provided in the hinge. An external keyboard can be magnetically attached to the first display screen. N magnetic induction devices are provided below the first display screen. The device includes: The first determining module 301 is used to determine the adsorption position of the external keyboard on the first display screen based on the relative positions of the N magnetic induction devices and the first display screen in response to the output of the N magnetic induction devices satisfying the first preset condition, where N is an integer greater than 0. The second determining module 302 is used to determine the locking angle threshold corresponding to the adsorption position based on the pre-set correspondence between the position and the locking angle. The control module 303 is used to control the locking device to lock in response to the first included angle being less than or equal to the locking angle threshold, so as to prevent the first display screen and the second display screen from closing. The first included angle is the angle between the first display screen and the second display screen.
[0055] In one embodiment of this application, the first determining module 301 includes: The first determining submodule is used to determine the first placement area of the first display screen as the magnetic induction device on the first display screen in response to the output of the magnetic induction device distributed in the first installation area below the first display screen that meets the first preset condition. The second determining submodule is used to determine the second placement area of the first display screen as the adsorption position of the external keyboard on the first display screen in response to the output of the magnetic induction device distributed in the second installation area below the first display screen that meets the first preset condition.
[0056] In one embodiment of this application, the apparatus further includes: The third determining module is used to determine the alarm angle threshold corresponding to the adsorption position based on the pre-set correspondence between the position and the alarm angle. The early warning module is used to issue a voice alarm when the first included angle is less than or equal to the alarm angle threshold, and when the alarm angle threshold is greater than the locking angle threshold.
[0057] Based on the above-mentioned anti-collision method, this application provides an electronic device, which includes: a second display screen; a first display screen connected to the second display screen via a hinge for placing an external keyboard, the hinge having a locking device connected to an embedded controller, the external keyboard having a built-in magnet; N magnetic induction devices distributed below the first display screen for detecting magnetic signals triggered by the external keyboard; and an embedded controller for executing the above-mentioned anti-collision method.
[0058] It should be noted that the above description of the anti-collision device and electronic device embodiments is consistent with the foregoing Figures 1 to 4 The method embodiments shown are described similarly and have the same characteristics as described above. Figures 1 to 4 The method embodiments shown have similar beneficial effects. For technical details not disclosed in the embodiments of the anti-collision device and electronic device of this application, please refer to the foregoing of this application. Figures 1 to 4 The method embodiments shown are for understanding purposes only and will not be described in detail here for the sake of brevity.
[0059] Based on the above-described anti-collision method, this application also provides a non-transitory computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the above-described anti-collision method.
[0060] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0061] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0062] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A collision avoidance method, characterized in that, The method is applied to an electronic device, which includes a first display screen and a second display screen connected by a hinge. A locking device is provided in the hinge. An external keyboard can be magnetically attached to the first display screen. N magnetic induction devices are provided below the first display screen. In response to the output of N magnetic induction devices satisfying a first preset condition, the magnetic attachment position of the external keyboard on the first display screen is determined based on the relative positions of the N magnetic induction devices and the first display screen, where N is an integer greater than 0; Based on the pre-set correspondence between position and locking angle, determine the locking angle threshold corresponding to the adsorption position; In response to a first included angle being less than or equal to the locking angle threshold, the locking device is controlled to lock to prevent the first display screen and the second display screen from closing, wherein the first included angle is the angle between the first display screen and the second display screen.
2. The anti-collision method according to claim 1, characterized in that, The output of the magnetic induction device satisfies a first preset condition, including: the level of the output of the magnetic induction device changes from a first level to a second level, where the first level is higher than the second level; or, the level of the output of the magnetic induction device is the second level and the duration of maintaining the second level exceeds a preset duration threshold.
3. The anti-collision method according to claim 1, characterized in that, Determining the magnetic attachment position of the external keyboard on the first display screen based on the relative positions of the N magnetic induction devices and the first display screen includes: In response to the magnetic induction device that meets the first preset condition being distributed in the first installation area below the first display screen, the first placement area of the first display screen is determined to be the magnetic position of the external keyboard on the first display screen. In response to the magnetic induction device that meets the first preset condition being distributed in the second mounting area below the first display screen, the second placement area of the first display screen is determined as the adsorption position of the external keyboard on the first display screen.
4. The anti-collision method according to claim 1, characterized in that, Before controlling the locking device to lock in response to a first included angle being less than or equal to the locking angle threshold, the method further includes: Based on the pre-defined correspondence between position and alarm angle, determine the alarm angle threshold corresponding to the adsorption position; In response to the first included angle being less than or equal to the alarm angle threshold, an alarm message is issued, wherein the alarm angle threshold is greater than the locking angle threshold.
5. The anti-collision method according to claim 1, characterized in that, The method further includes: In response to the first included angle being greater than the locking angle threshold and / or the outputs of the N magnetic induction devices not meeting the first preset condition, the locking device is controlled to stop the locking action so that the first display screen and the second display screen can be closed.
6. A collision avoidance device, characterized in that, This invention relates to an electronic device, which includes a first display screen and a second display screen connected by a hinge. The hinge contains a locking device. An external keyboard can be magnetically attached to the first display screen. N magnetic induction devices are located below the first display screen. These devices include: The first determining module is used to determine the adsorption position of the external keyboard on the first display screen based on the relative positions of the N magnetic induction devices and the first display screen in response to the output of the N magnetic induction devices satisfying the first preset condition, where N is an integer greater than 0. The second determining module is used to determine the locking angle threshold corresponding to the adsorption position based on the pre-set correspondence between the position and the locking angle. The control module is configured to control the locking device to lock in response to a first included angle being less than or equal to the locking angle threshold, so as to prevent the first display screen and the second display screen from closing, wherein the first included angle is the angle between the first display screen and the second display screen.
7. The anti-collision device according to claim 1, characterized in that, The first determining module includes: The first determining submodule is used to determine the first placement area of the first display screen as the adsorption position of the external keyboard on the first display screen in response to the output of a magnetic induction device distributed in a first installation area below the first display screen that meets the first preset condition. The second determining submodule is used to determine the second placement area of the first display screen as the adsorption position of the external keyboard on the first display screen in response to the output of a magnetic induction device distributed in a second installation area below the first display screen that meets the first preset conditions.
8. The anti-collision device according to claim 1, characterized in that, The device further includes: The third determining module is used to determine the alarm angle threshold corresponding to the adsorption position based on the pre-set correspondence between the position and the alarm angle. The warning module is used to issue a voice alarm in response to the first included angle being less than or equal to the alarm angle threshold, wherein the alarm angle threshold is greater than the locking angle threshold.
9. An electronic device, characterized in that, include: The first display screen is connected to the second display screen via a hinge and is used to hold an external keyboard. The hinge is equipped with a locking device, which is connected to an embedded controller. The second display screen; N magnetic induction devices are distributed below the first display screen; The embedded controller is used to execute the anti-collision method according to any one of claims 1-5.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.