Control method, electronic equipment and storage medium

By transmitting detection signals and combining sensing parameters, the electronic device can accurately identify the moving state and direction of surrounding objects, solving the problem of low accuracy in the prior art and improving the control accuracy of functional components.

CN119024321APending Publication Date: 2024-11-26LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411195742.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

When existing electronic devices detect surrounding objects through optical sensors or ultrasonic sensors, the accuracy is low, especially when objects with far distances cannot be identified or the direction of movement of objects is determined, resulting in inaccurate control status of functional components.

Method used

Use the transmit detection signals (such as ultrasonic, millimeter wave or laser signals) to form the detection space, obtain the feedback signal to determine the relative movement state parameters of the object, and combine the sensing parameters (such as acceleration sensors, gyroscopes, direction sensors) to determine the electronic device's Move direction and functional component status, thereby accurately controlling the working status of functional components.

Benefits of technology

It improves the accuracy of the working status of functional components of electronic equipment, can identify objects with a distance and accurately determine the direction of movement, and enhances the control accuracy of the state of functional components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119024321A_ABST
    Figure CN119024321A_ABST
Patent Text Reader

Abstract

The invention discloses a control method, electronic equipment and a storage medium, and the control method comprises the steps: transmitting a detection signal which forms a detection space; if the object exists in the detection space, obtaining a feedback signal generated based on the object; the feedback signal is used for determining a relative movement state parameter of the characterization object; obtaining a sensing parameter for determining a moving direction of the electronic device; and determining the working state of the functional part of the electronic equipment based on the relative movement state parameter and the sensing parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of control technology, and in particular to a control method, an electronic device and a storage medium. Background Art

[0002] At present, with the development of electronic technology, electronic devices are becoming more and more intelligent. Current electronic devices can control the operating status of related components of electronic devices by detecting whether there are objects approaching around the electronic device. However, in the related art, optical sensors are used to detect whether there are objects approaching around. However, since the screen transmittance of the electronic device is too low, objects far away from the electronic device cannot be identified. In the technology of using ultrasonic sensors to detect whether there are objects approaching around, there is a problem that it is impossible to determine from which direction the object is approaching the electronic device through ultrasonic waves. The above detection technologies all result in low accuracy in the operating status of related components controlled by the electronic device. Summary of the invention

[0003] In view of this, embodiments of the present application at least provide a control method, an electronic device, and a storage medium.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a control method, the control method comprising:

[0006] Transmitting a detection signal, the detection signal forms a detection space;

[0007] If there is an object in the detection space, a feedback signal generated based on the object is obtained; the feedback signal is used to determine a relative movement state parameter representing the object;

[0008] Obtaining a sensing parameter for determining a moving direction of the electronic device;

[0009] Based on the relative movement state parameter and the sensing parameter, the working state of the functional component of the electronic device is determined.

[0010] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0011] A transmitting unit, used for transmitting a detection signal, the detection signal forms a detection space;

[0012] A control unit is used to obtain a feedback signal generated based on the object if there is an object in the detection space; the feedback signal is used to determine a relative movement state parameter characterizing the object; obtain a sensing parameter for determining a moving direction of the electronic device; and determine the working state of a functional component of the electronic device based on the relative movement state parameter and the sensing parameter.

[0013] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements some or all of the steps in the above method when executed by a processor.

[0014] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0016] Figure 1 A schematic diagram of an implementation process of a control method provided in an embodiment of the present application Figure 1 ;

[0017] Figure 2 A schematic diagram of an implementation process of a control method provided in an embodiment of the present application Figure 2 ;

[0018] Figure 3 A control method for implementing the present invention is provided in the following example. Figure 1 ;

[0019] Figure 4 A control method for implementing the present invention is provided in the following example. Figure 2 ;

[0020] Figure 5 A schematic diagram of an implementation process of a control method provided in an embodiment of the present application Figure 3 ;

[0021] Figure 6 A schematic diagram of an implementation process of a control method provided in an embodiment of the present application Figure 4 ;

[0022] Figure 7 A schematic diagram of an implementation process of a control method provided in an embodiment of the present application Figure 5 ;

[0023] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0024] Fig. 9 A schematic diagram of a hardware entity of a control device in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0026] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0027] The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged with a specific order or sequence where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.

[0029] In order to solve the problem of low accuracy in controlling the operating status of related components of electronic devices in the related art, an embodiment of the present application provides a control method, which can be applied to electronic devices. By way of example, the electronic devices include but are not limited to smart phones, tablet computers, wearable devices, personal computers (PCs), netbooks, etc., and the present application does not impose fixed restrictions on their implementation forms.

[0030] Figure 1 A schematic diagram of an implementation process of a control method provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the control method can be implemented through steps S101 to S104:

[0031] Step S101, transmitting a detection signal, wherein the detection signal forms a detection space.

[0032] Here, the detection signal is used to detect whether an object exists in the detection space. Exemplarily, the detection signal may include at least one of the following: an ultrasonic signal, a millimeter wave signal, and a laser signal.

[0033] In some embodiments, the electronic device may transmit the detection signal through its own transmitting unit. For example, the transmitting unit may be a speaker on the electronic device, or any other device capable of transmitting the detection signal. The embodiment of the present application does not limit the type of the transmitting unit.

[0034] In some embodiments, the electronic device may control the transmitting unit to transmit the detection signal within a preset angle range. In order to improve the accuracy of identifying whether an object exists in the detection space, the electronic device may control the transmitting unit to transmit the detection signal at a larger transmitting angle. Exemplarily, the transmitting angle may be 360°.

[0035] Step S102: If there is an object in the detection space, a feedback signal generated based on the object is obtained; the feedback signal is used to determine a relative movement state parameter characterizing the object.

[0036] It is understandable that if there is an object in the detection space, the detection signal will be reflected when it contacts the object, that is, a feedback signal will be generated based on the object. At this time, the electronic device can receive the feedback signal generated based on the object through its own receiving unit. Exemplarily, the receiving unit can be a microphone.

[0037] In the embodiment of the present application, the relative movement state parameter is used to represent the movement state of the object relative to the electronic device. The relative movement state parameter may include: the movement speed of the object relative to the electronic device and the movement direction of the object relative to the electronic device.

[0038] In the embodiment of the present application, the moving direction of the object relative to the electronic device can determine whether the object is approaching the electronic device or moving away from the electronic device.

[0039] It can be understood that when the electronic device is stationary and the object is in motion, the moving speed of the object is the moving speed of the object relative to the electronic device, and the moving direction of the object is the moving direction of the object relative to the electronic device; when the electronic device is in motion and the object is stationary, the moving speed of the electronic device is the moving speed of the object relative to the electronic device, and the opposite direction of the moving direction of the electronic device is the moving direction of the object relative to the electronic device. When both the electronic device and the object are in motion, it is necessary to determine the moving speed of the object relative to the electronic device and the moving direction of the object relative to the electronic device based on the moving speeds and moving directions of the two.

[0040] In some embodiments, when the detection signal is an ultrasonic signal, since the Doppler effect occurs when the ultrasonic signal contacts the object, the relative movement state parameter of the object can be determined based on the difference between the frequency of the detection signal and the frequency of the feedback signal.

[0041] In other embodiments, when the detection signal is a millimeter wave signal, since the millimeter wave signal also generates a Doppler effect when it contacts the object, the relative movement state parameter of the object is determined based on the difference between the frequency of the detection signal and the frequency of the feedback signal. At the same time, the azimuth of the object can also be calculated by the phase difference of the feedback signal, thereby determining the relative movement state parameter of the object.

[0042] In another embodiment, when the detection signal is a laser signal, the speed and direction of the target object can be determined by analyzing the frequency change of the reflected light (ie, the feedback signal).

[0043] Step S103: obtaining a sensing parameter for determining a moving direction of the electronic device.

[0044] In the embodiment of the present application, the electronic device can collect corresponding parameters through various sensors disposed inside the electronic device to determine the moving direction of the electronic device. Exemplarily, the above sensor can be at least one of the following: an acceleration sensor, a gyroscope, and a direction sensor.

[0045] In some embodiments, when the sensing parameter is acceleration information collected by an acceleration sensor, because the acceleration information is information collected by the acceleration sensor when the electronic device undergoes instantaneous acceleration or instantaneous deceleration, the moving direction of the electronic device can be determined by analyzing the changing characteristics and frequency of the acceleration information in different directions.

[0046] In some embodiments, when the sensing parameter is deflection information collected by a gyroscope, the moving direction of the electronic device can be determined through the deflection information.

[0047] In some embodiments, when the sensing parameter is direction information collected by a direction sensor, the moving direction of the electronic device is determined by the direction information.

[0048] Step S104: determining the working state of the functional component of the electronic device based on the relative movement state parameter and the sensing parameter.

[0049] In the embodiment of the present application, the relative movement state parameter and the sensing parameter can be compared, and the working state of the functional component of the electronic device can be determined based on the matching between the relative movement state parameter and the sensing parameter.

[0050] Here, the functional component may be a component related to motion in the electronic device. Exemplarily, the functional component may be a speaker and / or a screen.

[0051] In some embodiments, when the functional component is a speaker, whether the state of the speaker is an on state or an off state can be determined by whether the relative movement state parameter and the sensing parameter match.

[0052] In some embodiments, when the functional component is a screen, the state of the screen, whether it is an off-screen state or an on-screen state, can be determined by whether the relative movement state parameter and the sensing parameter match.

[0053] In an embodiment of the present application, when there is an object in the detection space formed by the emitted detection signal, a relative movement state parameter for determining the characterization of the object can be obtained based on the object. Then, a sensing parameter for determining the moving direction of the electronic device is obtained, and finally, based on the relative movement state parameter and the sensing parameter, the working state of the functional component of the electronic device is determined. In this way, by determining the relative movement state parameter of the object through the feedback signal generated by the object in the detection space, the problem in the related art that the screen transmittance of the electronic device is too low, resulting in the inability to identify objects far away from the electronic device through the optical sensor, can be solved. In addition, when determining the working state of the functional component of the electronic device, the sensing parameter for determining the moving direction of the electronic device and the relative movement state parameter of the object are combined, so that the accuracy of determining the working state of the functional component of the electronic device can be improved.

[0054] In some embodiments, Figure 2 As shown, the above step S104 can be implemented through steps S201 and S202:

[0055] Step S201: determining a matching condition between the relative movement state parameter and the movement direction of the electronic device determined based on the sensing parameter.

[0056] In an embodiment of the present application, the relative movement state parameter of the object may include the relative movement direction. Therefore, after determining the relative movement direction of the object and the movement direction of the electronic device, the relative movement direction of the object can be matched with the movement direction of the electronic device to determine whether the movement directions of the two match.

[0057] In some embodiments, the above step S201 may be implemented by at least one of steps S2011 to S2013:

[0058] Step S2011: when the relative movement state parameter indicates that the object is close to the electronic device and the movement direction is a first direction, determine that the relative movement state parameter matches the movement direction.

[0059] Here, the relative movement state parameter of the object indicates that the object is close to the electronic device, which may be that the object is in a stationary state and the electronic device moves toward the object. In some embodiments, the relative movement state parameter of the object indicates that the object is close to the electronic device, which may be that both the object and the electronic device are in motion, and the directions of motion of the two are opposite and move toward each other, or the directions of motion of the two are the same, and the speed of motion of the object is greater than the speed of motion of the electronic device. In other embodiments, the relative movement state parameter of the object indicates that the object is close to the electronic device, which may be that the electronic device is in a stationary state and the object moves toward the electronic device.

[0060] In the embodiment of the present application, the first direction may represent that the angle change of the electronic device is negative, that is, the angle of the electronic device gradually decreases over time. Here, the angle of the electronic device may represent the posture of the electronic device.

[0061] Exemplarily, when the electronic device is in a horizontal posture, the angle of the electronic device is 0°; when the electronic device is in a vertical posture, the angle of the electronic device is 90°, that is, when the electronic device changes from a vertical posture to a horizontal posture, the moving direction of the electronic device is determined to be the first direction.

[0062] For example, Figure 3 As shown, the electronic device 301 moves toward the object 302, and the object 302 is in a stationary state (i.e., the relative movement state parameter indicates that the object is close to the electronic device), and at this time, the electronic device 301 changes from an inclined posture to a horizontal posture, and the moving direction of the electronic device 301 is a first direction. That is, in a scene where the electronic device is placed on a table (i.e., an object), the relative movement state parameter of the object matches the moving direction of the electronic device.

[0063] Step S2012: when the relative movement state parameter indicates that the object is close to the electronic device and the movement direction is a second direction opposite to the first direction, determine that the relative movement state parameter does not match the movement direction.

[0064] In the embodiment of the present application, the second direction may represent that the angle change of the electronic device is positive, that is, the angle of the electronic device gradually increases over time.

[0065] Exemplarily, when the electronic device is in a horizontal posture, the angle of the electronic device is 0°; when the electronic device is in a vertical posture, the angle of the electronic device is 90°, that is, when the electronic device changes from a horizontal posture to a vertical posture, the moving direction of the electronic device is determined to be the second direction.

[0066] For example, Figure 4As shown, the electronic device 301 moves toward the object 302, and the object 302 is in a stationary state (i.e., the relative movement state parameter indicates that the object is close to the electronic device). At this time, the electronic device 301 changes from an inclined posture to a vertical posture, and the movement direction of the electronic device 301 is the second direction. That is, in a scenario where the electronic device is close to the user's ear (the scenario may be a scenario where the user is making a phone call), the relative movement state parameter of the object does not match the movement direction of the electronic device.

[0067] Step S2013: when the relative movement state parameter indicates that the object is moving away from the electronic device and the moving direction is a first direction, determine that the relative movement state parameter matches the moving direction.

[0068] In an embodiment of the present application, there is only one object in the detection space formed by the detection signal, so the relative movement state parameter can indicate that the object is away from the electronic device. Among them, the relative movement state parameter of the object indicates that the object is away from the electronic device, which can be that the object is in a stationary state and the electronic device moves in a direction away from the object. In some embodiments, the relative movement state parameter of the object indicates that the object is away from the electronic device, which can also be that the object and the electronic device are both in motion, and the directions of movement of the two are opposite and move away from each other, or the directions of movement of the two are the same, and the movement speed of the object is less than the movement speed of the electronic device. In other embodiments, the relative movement state parameter of the object indicates that the object is close to the electronic device, which can also be that the electronic device is in a stationary state and the object moves in a direction away from the electronic device.

[0069] Step S202: Based on the matching situation, determine whether to switch the working state of the functional component of the electronic device.

[0070] In an embodiment of the present application, the matching situation can be used to determine the changes in the posture of the electronic device as it approaches an object, and based on the changes in the posture of the electronic device as it approaches an object, it can be determined whether to switch the working state of the functional components of the electronic device.

[0071] Exemplarily, when the electronic device is a mobile phone and the functional component is a screen, the user puts the mobile phone on the desktop. At this time, through the feedback signal generated by the desktop, the mobile phone can determine that the mobile phone is approaching the desktop. Because it is impossible to determine that the object in the detection space is a table through the feedback signal alone, it is necessary to determine the change in the posture of the electronic device during the mobile phone's approach to the object through the matching of the mobile phone's moving direction and the relative movement state parameters, so that it can be determined from the side that the object close to the electronic device is a table, that is, during the process of the mobile phone approaching the table, the mobile phone changes from a tilted state to a horizontal state, and the working state of the screen does not need to be switched. When the user puts the mobile phone to his ear to make a call, through the matching situation, it can be determined that the mobile phone changes from a tilted state to a vertical state during the process of the mobile phone approaching the ear, and the screen in the on screen state can be switched to the off screen state.

[0072] In the embodiment of the present application, the matching of the relative movement state parameter and the moving direction of the electronic device determined based on the sensing parameter is first determined, and then the working parameters of the functional components of the electronic device are determined based on the matching. In this way, while determining the relative movement state parameter, the current state of the electronic device can be accurately determined in combination with the moving direction of the electronic device, thereby improving the accuracy of switching the working state of the functional components.

[0073] In some embodiments, the functional component includes a screen; the above step S202 may be implemented by steps S2021 and S2022:

[0074] Step S2021: When the relative movement state parameter does not match the movement direction, determine that the screen is in the screen-off state.

[0075] In the embodiment of the present application, the relative movement state parameter does not match the movement direction, which may indicate that the relative movement state parameter indicates that the object is close to the electronic device, and the movement direction is the second direction, and the second direction indicates that the angle of the electronic device gradually increases over time, that is, the relative movement state parameter does not match the movement direction, indicating that the angle of the electronic device gradually increases over time during the process of the electronic device approaching the object. At this time, the screen can be controlled to be in the screen-off state.

[0076] It is understandable that when the electronic device approaches an object, it is necessary to determine the moving direction of the electronic device because it is impossible to determine whether the object is a user or a table. When the moving direction of the electronic device is the second direction, it can be determined that the angle of the electronic device gradually increases over time, which means that the posture of the electronic device changes from an inclined state to a vertical state, or from a horizontal state to an inclined state. At this time, the user may be moving the electronic device to the ear to make a call (i.e. Figure 4 ), so it can be determined that the screen is in the off state.

[0077] Step S2022: When the relative movement state parameter matches the movement direction, determine that the screen is in a bright screen state.

[0078] In the embodiment of the present application, the relative movement state parameter matches the movement direction, which can indicate that the relative movement state parameter indicates that the object is approaching the electronic device, and the movement direction is a first direction, and the first direction indicates that the angle of the electronic device gradually decreases over time, that is, the relative movement state parameter matches the movement direction, indicating that the angle of the electronic device gradually decreases over time during the process of the electronic device approaching the object. At this time, the screen can be controlled to be in a bright screen state.

[0079] It is understandable that when the electronic device approaches an object, it is necessary to determine the moving direction of the electronic device because it is impossible to determine whether the object is a user or a table. When the moving direction of the electronic device is a first direction, it can be determined that the angle of the electronic device gradually decreases over time, which means that the posture of the electronic device changes from a vertical state to an inclined state, or from an inclined state to a horizontal state. At this time, the user may be moving the electronic device onto the table (i.e. Figure 3 ), so it can be determined that the screen is in the bright screen state.

[0080] In other embodiments, the relative movement state parameter matches the movement direction, and it can also be indicated that the relative movement state parameter indicates that the object is moving away from the electronic device, and the movement direction is a first direction, and the first direction indicates that the angle of the electronic device gradually decreases over time, that is, the relative movement state parameter matches the movement direction, indicating that the angle of the electronic device gradually decreases over time as the electronic device moves away from the object. At this time, the screen can be controlled to be in a bright screen state.

[0081] It is understandable that when there is only one object in the detection space formed by the detection signal, a scene where the object is far away from the electronic device will appear. Exemplarily, when the user moves the electronic device away from the ear, the electronic device relative to the user's ear is the object away from the electronic device, and the moving direction of the electronic device is the first direction, at this time the screen can be controlled to be in a bright screen state.

[0082] In some embodiments, the sensing parameters include angular velocity information of the electronic device at multiple moments; Figure 5 As shown, the above method can also be implemented through steps S501 to S503:

[0083] Step S501: determining angle change information of the electronic device based on angular velocity information of the electronic device at multiple moments.

[0084] In the embodiment of the present application, the angular velocity information of the electronic device at multiple moments may be integrated to obtain the angle change information of the electronic device.

[0085] In an embodiment of the present application, a gyroscope built into the electronic device can be used to collect the angular velocity of the electronic device at multiple moments, and then the angular velocities at multiple moments are integrated to obtain the angle change of the electronic device at multiple moments, that is, the angle change information of the electronic device.

[0086] Step S502: When the angle change information indicates that the angle of the electronic device gradually increases over time, determine that the moving direction is the second direction.

[0087] It is understandable that, because the angle change information is determined based on the angular velocity information of the electronic device at multiple moments, the angle change information of the electronic device over time can be determined through the angle change information. If the angle of the electronic device gradually increases over time, it means that the posture of the electronic device at multiple moments is changed from an inclined posture to a vertical posture, or from a horizontal posture to an inclined posture, so it can be determined that the moving direction of the electronic device is the second direction. For example, a scene where a user picks up a mobile phone from a table and puts it to his ear.

[0088] Step S503: When the angle change information indicates that the angle of the electronic device decreases gradually over time, determine that the moving direction is the first direction.

[0089] It is understandable that if the angle of the electronic device decreases gradually over time, it means that the posture of the electronic device at multiple moments changes from a vertical posture to an inclined posture, or from a horizontal tilt to a horizontal posture, so the moving direction of the electronic device can be determined to be the first direction. For example, a scene where a mobile phone is placed on a table from the user's ear.

[0090] In the embodiment of the present application, by determining the angle change information between the angular velocity information of the electronic device at each moment, the change of the angular velocity of the electronic device at each moment over time can be determined, and thus the moving direction of the electronic device can be determined based on the change of the angular velocity of the electronic device at each moment over time. In this way, the posture change of the electronic device within a period of time can be accurately identified through the change of the angular velocity of the electronic device at each moment over time, thereby improving the accuracy of determining the moving direction of the electronic device.

[0091] In some embodiments, the above step S103 may be implemented by step S1031:

[0092] Step S1031: when the relative movement state parameter indicates that the object is close to the electronic device, obtaining angular velocity information of the electronic device at multiple moments before the current moment.

[0093] It is understandable that when the relative movement state parameter indicates that the object is close to the electronic device, it is necessary to determine whether to switch the working state of the functional components of the electronic device. Because, in some scenarios, even if the object is close to the electronic device, there is no need to switch the working state of the functional components of the electronic device, such as placing a mobile phone on a desktop; in another scenario, it is necessary to switch the working state of the functional components of the electronic device, such as when the mobile phone is close to the user's ear. However, based on the feedback signal generated by the object, it is impossible to determine whether the object close to the electronic device is a table or the user's ear. At this time, the posture of the electronic device can be determined by obtaining the angular velocity information of the electronic device to determine whether to switch the working state of the functional components of the electronic device.

[0094] In the embodiment of the present application, the moment when the object is determined to be close to the electronic device can be used as the current moment, and the angular velocity information at multiple consecutive moments before the current moment can be obtained. For example, when the object is determined to be close to the electronic device, this moment is taken as T0, and the angular velocity information of 500ms before T0 is obtained. If the gyroscope collects angular velocity information every 10ms, the angular velocity information is collected 50 times.

[0095] In the embodiment of the present application, by acquiring angular velocity information at multiple moments before the object approaches the electronic device, the moving direction of the electronic device during the process of the object approaching the electronic device can be accurately determined.

[0096] In some embodiments, Figure 6 As shown, the detection signal is a sound wave signal, and the feedback signal is an echo signal; the above method can also be implemented through steps S601 to S603:

[0097] Step S601: determine a second frequency parameter of the echo signal.

[0098] In the embodiment of the present application, after the receiving unit of the electronic device receives the echo signal, the second frequency parameter of the echo signal can be measured by a frequency meter or other equipment.

[0099] Step S602: Determine the degree of change between the first frequency parameter and the second frequency parameter of the sound wave signal emitted by the electronic device.

[0100] Step S603: determining the relative movement state parameter based on the degree of change.

[0101] It can be understood that because the detection signal is a sound wave signal, when the sound wave signal contacts an object, the sound wave signal (i.e., an echo signal) will be reflected. When there is relative motion between the object and the electronic device, according to the Doppler effect, the second frequency parameter of the echo signal will change compared with the first frequency parameter of the sound wave signal, i.e., the degree of change between the first frequency parameter and the second frequency parameter.

[0102] Exemplarily, if the object is close to the electronic device, the second frequency parameter of the echo signal will be higher than the first frequency parameter of the sound wave signal; if the object is far away from the electronic device, the second frequency parameter of the echo signal will be lower than the first frequency parameter of the sound wave signal.

[0103] Therefore, by determining the degree of change between the first frequency parameter and the second frequency parameter of the sound wave signal emitted by the electronic device, the relative movement state parameter of the object can be determined.

[0104] In some embodiments, Figure 7 As shown, the above step S2021 is implemented by steps S701 and S702:

[0105] Step S701: when the relative movement state parameter does not match the movement direction, obtain the rotation information of the electronic device in a historical time period.

[0106] It is understandable that when the relative movement state parameter does not match the moving direction, the relative movement state parameter of the object indicates that the object is close to the electronic device, and the moving direction is a second direction opposite to the first direction. At this time, it indicates that the posture of the electronic device has changed from a horizontal posture to an inclined posture, or from an inclined posture to a vertical posture. However, the change in the posture of the electronic device from a horizontal posture to an inclined posture, or from an inclined posture to a vertical posture, does not mean that the screen must be in the screen-off state. For example, when the user takes the mobile phone from the desktop to the front of the face, there is no need to control the screen to be in the screen-off state. Therefore, it is necessary to obtain the rotation information of the electronic device in the historical time period to re-determine the change in the posture of the electronic device itself in the process of approaching the object.

[0107] Here, the historical time period may be a time period before the moment when the relative movement state parameter is determined to be mismatched with the movement direction. The rotation information is used to characterize the rotation of the electronic device in the historical time period. The rotation information includes the rotation direction of the electronic device in the historical time period.

[0108] Step S702: When the rotation information includes at least two rotation directions, determine that the screen is in the screen-off state.

[0109] Here, the rotation direction may be the direction of the rotation axis of the electronic device, wherein the direction of the rotation axis may include the horizontal axis direction and the vertical axis direction in a two-dimensional coordinate system with any point on the electronic device as the origin, or the horizontal axis direction, the vertical axis direction and the vertical axis direction in a three-dimensional coordinate system with any point on the electronic device as the origin.

[0110] In an embodiment of the present application, when it is determined that the rotation information includes at least two rotation directions, it means that the electronic device has rotated in at least two rotation directions while approaching the object. At this time, it can be determined that the screen is in the off state.

[0111] For example, when the user takes the electronic device from the table to the front of the face, although the relative movement state parameter of the object at this time does not match the movement direction of the electronic device, because the electronic device only moves in one rotation direction, it can be determined that the screen is in the light-on state. The rotation direction can be the direction corresponding to the short side of the electronic device, or the direction corresponding to the long side of the electronic device.

[0112] For example, when the user takes the electronic device from the table to the ear, the electronic device moves in two rotation directions, so it can be determined that the screen is in the screen-off state. The rotation direction may include the direction corresponding to the short side of the electronic device and the direction corresponding to the long side of the electronic device.

[0113] In the embodiment of the present application, when the relative movement state parameter does not match the movement direction, the rotation information of the electronic device in the historical time period is obtained; when the rotation information includes at least two rotation directions, it is determined that the screen is in the screen-off state. In this way, when the relative movement state parameter does not match the movement direction, the change of the electronic device's own posture in the process of approaching the object can be further determined, thereby improving the accuracy of controlling the screen to be in the screen-off state.

[0114] In the related art, when answering a call, if a mobile phone is placed on a table, the Doppler effect will occur because the mobile phone is close to the table, causing the mobile phone screen to go black.

[0115] In order to solve the above technical problems, an embodiment of the present application provides a control method, which is implemented by the following steps:

[0116] Step S801, when the ultrasonic wave of the mobile phone detects approaching, the gyroscope data of the preset time period is traced back.

[0117] Here, the preset time period may be 500 ms.

[0118] Step S802, performing integral calculation on the gyroscope data in a preset time period to obtain the angle change of the mobile phone.

[0119] Step S803: If the angle change of the mobile phone is positive, the screen of the mobile phone is controlled to turn off.

[0120] In the embodiment of the present application, if the angle change of the mobile phone is positive, it means that the mobile phone is close to the ear, and the screen of the mobile phone can be controlled to turn off.

[0121] Step S804: If the angle change of the mobile phone is negative, the screen of the mobile phone is controlled not to be turned off.

[0122] In the embodiment of the present application, if the angle change of the mobile phone is negative, it means that the mobile phone is close to the table. At this time, the screen of the mobile phone can be controlled not to turn off.

[0123] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the electronic device 800 includes: a transmitting unit 801 and a control unit 802, wherein:

[0124] A transmitting unit 801 is used to transmit a detection signal, wherein the detection signal forms a detection space;

[0125] The control unit 802 is used to obtain a feedback signal generated based on the object if there is an object in the detection space; the feedback signal is used to determine a relative movement state parameter characterizing the object; obtain a sensing parameter for determining the moving direction of the electronic device; and determine the working state of the functional components of the electronic device based on the relative movement state parameter and the sensing parameter.

[0126] In some embodiments, the control unit 802 is used to determine the matching situation between the relative movement state parameter and the moving direction of the electronic device determined based on the sensing parameter; based on the matching situation, determine whether to switch the working state of the functional component of the electronic device.

[0127] In some embodiments, the control unit 802 is used to determine that the relative movement state parameter matches the moving direction when the relative movement state parameter indicates that the object is close to the electronic device and the moving direction is a first direction; determine that the relative movement state parameter does not match the moving direction when the relative movement state parameter indicates that the object is close to the electronic device and the moving direction is a second direction opposite to the first direction; and determine that the relative movement state parameter matches the moving direction when the relative movement state parameter indicates that the object is away from the electronic device and the moving direction is a first direction.

[0128] In some embodiments, the sensing parameters include angular velocity information of the electronic device at multiple moments; the control unit 802 is used to determine the angle change information of the electronic device based on the angular velocity information of the electronic device at multiple moments; when the angle change information represents that the angle of the electronic device gradually increases over time, the moving direction is determined to be the second direction; when the angle change information represents that the angle of the electronic device gradually decreases over time, the moving direction is determined to be the first direction.

[0129] In some embodiments, the control unit 802 is used to obtain angular velocity information of the electronic device at multiple moments before the current moment when the relative movement state parameter indicates that the object is close to the electronic device.

[0130] In some embodiments, the detection signal is a sound wave signal, and the feedback signal is an echo signal; the control unit 802 is also used to determine a second frequency parameter of the echo signal; determine the degree of change between the first frequency parameter and the second frequency parameter of the sound wave signal emitted by the electronic device; and determine the relative movement state parameter based on the degree of change.

[0131] In some embodiments, the functional component includes a screen; the control unit 802 is further used to determine that the screen is in the screen-off state when the relative movement state parameter does not match the moving direction; and to determine that the screen is in the screen-on state when the relative movement state parameter matches the moving direction.

[0132] In some embodiments, the control unit 802 is further used to obtain the rotation information of the electronic device within a historical time period when the relative movement state parameter does not match the movement direction; and to determine that the screen is in the screen-off state when the rotation information includes at least two rotation directions.

[0133] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0134] It should be noted that in the embodiment of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.

[0135] An embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0136] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0137] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0138] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0139] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0140] Fig. 9 A schematic diagram of a hardware entity of a control device in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the hardware entity of the control device 900 includes: a processor 901, a communication interface 902 and a memory 903, wherein:

[0141] The processor 901 generally controls the overall operation of the control device 900. The overall operation may be to implement the control method provided in the embodiment of the present application, for example, Figures 1 to 7 The method shown.

[0142] The communication interface 902 may enable the control device 900 to communicate with other terminals or servers via a network.

[0143] The memory 903 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or processed by the processor 901 and each module in the control device 900 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission between the processor 901, the communication interface 902 and the memory 903 can be carried out through the bus 904.

[0144] An embodiment of the present application provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the control method of any of the above embodiments.

[0145] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0146] The processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that the electronic device that implements the functions of the processor may also be other, and the embodiments of the present application are not specifically limited.

[0147] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0148] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.

[0149] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0150] The above are only implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A control method, applied to an electronic device, comprising: transmitting a detection signal, wherein the detection signal forms a detection space; If there is an object in the detection space, obtaining a feedback signal generated based on the object; The feedback signal is used to determine a parameter characterizing a relative movement state of the object; Obtaining a sensing parameter for determining a moving direction of the electronic device; Based on the relative movement state parameter and the sensing parameter, the working state of the functional component of the electronic device is determined.

2. The method according to claim 1, wherein determining the working state of the functional component of the electronic device based on the relative movement state parameter and the sensing parameter comprises: Determining a matching condition between the relative movement state parameter and a movement direction of the electronic device determined based on the sensing parameter; Based on the matching situation, it is determined whether to switch the working state of the functional component of the electronic device.

3. The method according to claim 2, wherein determining the matching condition between the relative movement state parameter and the movement direction of the electronic device determined based on the sensing parameter comprises at least one of the following: When the relative movement state parameter indicates that the object is close to the electronic device and the movement direction is a first direction, determining that the relative movement state parameter matches the movement direction; In a case where the relative movement state parameter indicates that the object is close to the electronic device and the movement direction is a second direction opposite to the first direction, determining that the relative movement state parameter does not match the movement direction; When the relative movement state parameter indicates that the object is moving away from the electronic device and the movement direction is a first direction, it is determined that the relative movement state parameter matches the movement direction.

4. The method according to claim 3, wherein the sensing parameter comprises angular velocity information of the electronic device at multiple moments; the method further comprises: Determining angle change information of the electronic device based on angular velocity information of the electronic device at multiple moments; When the angle change information indicates that the angle of the electronic device gradually increases over time, determining that the moving direction is the second direction; When the angle change information represents that the angle of the electronic device gradually decreases over time, the moving direction is determined to be the first direction.

5. The method according to any one of claims 1 to 4, wherein obtaining a sensing parameter for determining a moving direction of the electronic device comprises: When the relative movement state parameter indicates that the object is close to the electronic device, angular velocity information of the electronic device at multiple time points before the current time point is acquired.

6. The method according to any one of claims 1 to 4, wherein the detection signal is an acoustic wave signal, and the feedback signal is an echo signal; the method comprises: determining a second frequency parameter of the echo signal; Determining a degree of change between a first frequency parameter and a second frequency parameter of the sound wave signal emitted by the electronic device; Based on the degree of change, the relative movement state parameter is determined.

7. The method according to claim 3, wherein the functional component comprises a screen; and the step of determining whether to trigger switching of the working state of the functional component of the electronic device based on the matching condition comprises: When the relative movement state parameter does not match the movement direction, determining that the screen is in a screen-off state; When the relative movement state parameter matches the movement direction, it is determined that the screen is in a bright screen state.

8. The method according to claim 7, wherein when the relative movement state parameter does not match the movement direction, determining that the screen is in the screen-off state comprises: When the relative movement state parameter does not match the movement direction, obtaining rotation information of the electronic device within a historical time period; When the rotation information includes at least two rotation directions, it is determined that the screen is in the screen-off state.

9. An electronic device, comprising: A transmitting unit, used for transmitting a detection signal, wherein the detection signal forms a detection space; A control unit, configured to obtain a feedback signal generated based on the object if there is an object in the detection space; The feedback signal is used to determine a parameter characterizing a relative movement state of the object; Obtaining a sensing parameter for determining a moving direction of the electronic device; Based on the relative movement state parameter and the sensing parameter, the working state of the functional component of the electronic device is determined.

10. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.