Output method and electronic equipment
The target sensing device detects the posture of the electronic device and dynamically adjusts the audio output volume, which solves the problem in the existing technology that the volume cannot be adjusted according to the usage scenario, and achieves volume flexibility and power consumption management.
Patent Information
- Application Number
- CN202410823919.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-01
AI Technical Summary
Existing electronic devices cannot dynamically adjust the volume of audio output according to different usage scenarios and cannot meet different needs.
The device posture is detected through the target sensing device, and the audio output volume is determined in the target posture based on the first volume control strategy, or the default or previous volume is used in non-target postures to achieve dynamic adjustment of the volume.
The audio output volume is dynamically adjusted according to the posture of the device in different usage scenarios to meet users' diverse needs for volume and reduce the power consumption of the target sensing device.
Smart Images

Figure CN118732986A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to an output method and an electronic device. Background Art
[0002] The electronic device can obtain the audio playback instruction and play the corresponding audio according to the playback instruction. For example, when the device is called, the call prompt audio can be played according to the playback instruction; when the system time of the device reaches the specified alarm time, the alarm prompt audio can be played according to the playback instruction.
[0003] Currently, each time an electronic device receives a play instruction, it can only use the default output volume, or use the output volume when the audio was output last time to output the audio corresponding to the current play instruction, which cannot meet the needs of different output volumes in different usage scenarios. Summary of the invention
[0004] To this end, this application discloses the following technical solutions:
[0005] The first aspect of the present application provides an output method, comprising:
[0006] Obtaining a target parameter, wherein the target parameter is used to characterize a device posture of the electronic device;
[0007] If the target parameter satisfies the target condition, indicating that the device posture of the electronic device matches the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a first volume control strategy;
[0008] In response to the play instruction, output the target audio at the output volume;
[0009] Wherein, the first volume control strategy is based on a target sensing device, and the target sensing device can be controlled to be in an enabled state when the electronic device is in the target posture.
[0010] Optionally, also include:
[0011] If the target parameter does not meet the target condition, indicating that the device posture of the electronic device does not match the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a second volume control strategy;
[0012] Wherein, the target sensing device cannot be controlled to be in an enabled state when the electronic device is in a posture other than the target posture.
[0013] Optionally, the electronic device includes a first body and a second body;
[0014] The obtaining of target parameters comprises:
[0015] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0016] obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body;
[0017] The target parameters satisfying the target conditions include:
[0018] Determine the angle between the first body and the second body and the device posture of the electronic device according to the first target parameter and the second target parameter;
[0019] The angle between the first body and the second body belongs to a target angle range and the device posture of the electronic device belongs to a target posture, and the target condition includes a target angle range and a target posture.
[0020] Optionally, the electronic device includes a first body and a second body;
[0021] The obtaining of target parameters comprises:
[0022] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0023] obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body;
[0024] Obtaining a third target parameter, wherein the third target parameter represents an angle between the first body and the second body;
[0025] The target parameters satisfying the target conditions include:
[0026] Determine the device posture of the electronic device according to the first target parameter and the second target parameter;
[0027] If the third target parameter belongs to the target angle range and the device posture of the electronic device belongs to the target posture, the target condition includes the target angle range and the target posture.
[0028] Optionally, determining the output volume of the target audio using the first volume control strategy includes:
[0029] calling a target sensing device based on the first volume control strategy;
[0030] Obtaining sensing parameters of the target sensing device, wherein the sensing parameters are used to characterize the presence of a target object in the sensing area of the target sensing device when the electronic device is in a target posture and the distance between the target object and the electronic device;
[0031] An output volume is determined based on the sensed parameter and the target relationship.
[0032] A second aspect of the present application provides an electronic device, including:
[0033] Target sensing device;
[0034] A processor is configured to obtain a target parameter, wherein the target parameter is used to characterize a device posture of the electronic device, and if the target parameter satisfies a target condition, characterizes that the device posture of the electronic device matches the target posture and obtains a play instruction for a target audio, determines an output volume of the target audio using a first volume control strategy; and outputs the target audio at the output volume in response to the play instruction;
[0035] Wherein, the first volume control strategy is based on the target sensing device, and the target sensing device can be controlled to be in an enabled state when the electronic device is in the target posture.
[0036] Optionally, the electronic device includes:
[0037] A first body including a first sensor;
[0038] A second body including a second sensor;
[0039] The processor is located in one of the first body and the second body, and the processor is used to obtain the target parameter, including:
[0040] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0041] obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body;
[0042] or,
[0043] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0044] obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body;
[0045] Obtaining a third target parameter, wherein the third target parameter represents an angle between the first body and the second body;
[0046] The target parameters satisfying the target conditions include:
[0047] Determine the angle between the first body and the second body and the device posture of the electronic device according to the first target parameter and the second target parameter;
[0048] The angle between the first body and the second body belongs to a target angle range and the device posture of the electronic device belongs to a target posture, and the target condition includes a target angle range and a target posture;
[0049] or,
[0050] Determine the device posture of the electronic device according to the first target parameter and the second target parameter;
[0051] If the third target parameter belongs to the target angle range and the device posture of the electronic device belongs to the target posture, the target condition includes the target angle range and the target posture.
[0052] Optionally, the target posture includes a first target posture and a second target posture;
[0053] When the electronic device is in the first target posture, the first surface of the first body is not parallel to the support surface of the electronic device and is not perpendicular to the support surface, the second surface of the second body is not parallel to the support surface and is not perpendicular to the support surface, and the angle between the first body and the second body is less than 180 degrees;
[0054] When the electronic device is in the second target posture, the first surface of the first body is not parallel to the supporting surface, the second surface of the second body is parallel to the supporting surface, and the angle between the first body and the second body is less than 180 degrees.
[0055] Optionally, the electronic device further includes:
[0056] A target screen is located on the first surface of the first body;
[0057] The target sensing device is located inside the first body, and the target sensing device obtains sensing parameters through the target screen, wherein if the target object is located in the sensing area of the target sensing device, the target object can focus on the target screen of the electronic device in a target posture;
[0058] The processor determines the output volume of the target audio using a first volume control strategy, including:
[0059] calling a target sensing device based on the first volume control strategy;
[0060] Obtaining sensing parameters of the target sensing device, wherein the sensing parameters are used to characterize the presence of a target object in the sensing area of the target sensing device when the electronic device is in a target posture and the distance between the target object and the electronic device;
[0061] An output volume is determined based on the sensed parameter and the target relationship.
[0062] Optionally, the processor is further configured to:
[0063] If the target parameter satisfies the target condition, indicating that the device posture of the electronic device does not match the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a second volume control strategy,
[0064] Wherein, the target sensing device cannot be controlled to be in an enabled state when the electronic device is in a posture other than the target posture. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0066] Figure 1 is a flow chart of an output method provided in an embodiment of the present application;
[0067] Figure 2 is a schematic diagram of a target posture of an electronic device provided in an embodiment of the present application;
[0068] Figure 3 is a schematic diagram of a first target posture of an electronic device provided in an embodiment of the present application;
[0069] Figure 4 is a schematic diagram of a second target posture of an electronic device provided in an embodiment of the present application;
[0070] Figure 5 It is a schematic diagram of the working principle of a target sensing device provided in an embodiment of the present application;
[0071] Figure 6 is a schematic diagram of the working principle of another target sensing device provided in an embodiment of the present application;
[0072] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0074] This embodiment provides an output method, see Figure 1 , is a flow chart of the method, and the method may include the following steps.
[0075] S101, obtaining target parameters, where the target parameters are used to characterize the device posture of the electronic device.
[0076] The target parameter may include any one or more parameters that can characterize the device posture of the electronic device. For example, the target parameter may include at least one of the acceleration parameters of the electronic device in the vertical direction and the horizontal direction, and the speed parameters of the electronic device in the vertical direction and the horizontal direction.
[0077] The target parameter can be obtained by a sensor installed in the electronic device. For example, the acceleration parameter of the electronic device can be obtained by an acceleration sensor installed in the electronic device, and the speed parameter of the electronic device can be obtained by a gyroscope sensor installed in the electronic device.
[0078] The electronic device may obtain the target parameters in real time at a certain period when powered on, or may obtain the target parameters in response to a playback instruction for the target audio after the electronic device obtains the playback instruction.
[0079] S102: If the target parameter satisfies the target condition, indicating that the device posture of the electronic device matches the target posture and obtains a playback instruction for the target audio, the output volume of the target audio is determined using a first volume control strategy, wherein the first volume control strategy is based on a target sensing device, and the target sensing device can be controlled to be in an enabled state when the electronic device is in the target posture.
[0080] In S102, it can be determined whether the target parameter meets the target condition. If the target parameter meets the target condition, it can be considered that the electronic device is in the target posture at this time. If the target parameter does not meet the target condition, it can be considered that the electronic device is in a non-target posture at this time.
[0081] If a target audio playback instruction is obtained when the electronic device is in the target posture, the electronic device determines an output volume for outputting the target audio according to the sensing parameters provided by the target sensing device in combination with the first control strategy.
[0082] Optionally, when the electronic device is in the target posture, the electronic device may control the target sensing device according to the first control strategy or the second control strategy.
[0083] The first control strategy is that when the electronic device is in the target posture, if the electronic device does not obtain the play instruction, the target sensing device is controlled to be in a non-powered and callable state. When the play instruction is obtained, the electronic device responds to the play instruction and powers on the target sensing device to put it in an enabled state, so as to determine the output volume based on the target sensing device in the enabled state according to the first volume control strategy, and after determining the output volume, the target sensing device is controlled again to be in a non-powered and callable state.
[0084] By controlling the target sensing device according to the first control strategy, the power-on time of the target sensing device can be reduced, thereby achieving the effect of reducing the energy consumption of the target sensing device.
[0085] The second control strategy is that when the electronic device is in the target posture, the electronic device controls the target sensing device to always be powered on and callable. If no play instruction is obtained, the powered target sensing device can remain in standby mode with low power consumption. If a play instruction is obtained, the electronic device directly calls the target sensing device to determine the output volume using the first volume control strategy.
[0086] By controlling the target sensing device according to the second control strategy, the target sensing device can be directly called when a play instruction is obtained without first controlling the target sensing device to power on, so that the sensing parameters can be obtained faster and the output volume can be determined faster.
[0087] The target audio playback instruction can be generated by any application installed on the electronic device that has audio output requirements. For example, when the device is called, the call application of the electronic device can generate a playback instruction, and the target audio can be the call prompt audio; when the system time of the device reaches the specified alarm time, the alarm application of the electronic device can generate a playback instruction, and the target audio can be the alarm prompt audio; when the device starts to output video or audio media files according to the user's operation, the video or audio media player can generate a playback instruction, and the target audio can be the audio of the media file to be played.
[0088] The target posture may include one or more device postures. Which device postures are determined as target postures can be determined based on the working principle of the target sensing device and the location where the target sensing device is installed on the electronic device. For example, the device posture where the target sensing device outputs sensing parameters can be determined as the target posture, and the device posture where the target sensing device does not output sensing parameters can be determined as the non-target posture.
[0089] As some examples, assuming that the target sensing device is a camera or an optical distance sensor based on a light signal, the target sensing device can output sensing parameters when it can receive ambient light, and may not output sensing parameters when it is blocked and cannot receive ambient light. Therefore, the target posture may include the device posture when the target sensing device is not blocked, and the non-target posture may include the device posture when the target sensing device is blocked.
[0090] S103, responding to the play instruction, outputting the target audio at an output volume.
[0091] When outputting the target audio, the electronic device can call an audio output module (e.g., a speaker, earphone), configure the operating parameters of the audio output module according to the output volume, including but not limited to the power and gain of the audio output module, and then control the audio output module to output the target audio at the output volume determined in S102 according to the configured operating parameters. The audio output module can be an audio output module installed in the electronic device itself, such as a built-in speaker, or can be an audio output module outside the electronic device and connected to the electronic device, such as an external earphone.
[0092] When outputting the target audio, the electronic device may also provide the output volume and the target audio to other electronic devices in communication connection, and output the target audio at the output volume on the other electronic devices.
[0093] The beneficial effect of this embodiment is that when the electronic device is in a target posture capable of controlling the target sensing device to be enabled and obtains a play instruction for the target audio, the electronic device determines the output volume of the target audio using the first volume control strategy based on the target sensing device, and outputs the target audio at the output volume. Thus, when there is a demand for target audio output, the electronic device can obtain information about the scene in which the electronic device is located through the target sensing device, so as to achieve the effect of outputting the target audio at different output volumes according to different scenes, thereby satisfying the user's demand for different output volumes in different usage scenarios.
[0094] In some optional embodiments, the electronic device may further perform the following steps:
[0095] If the target parameter does not meet the target condition, indicating that the device posture of the electronic device does not match the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a second volume control strategy;
[0096] Wherein, the target sensing device cannot be controlled to be in an enabled state when the electronic device is in a non-target posture. The second volume control strategy is not based on the target sensing device.
[0097] That is to say, if the target parameter does not meet the target condition, it can be considered that the electronic device is in a non-target posture. At this time, the electronic device can control the target sensing device to be in a disabled and unavailable state.
[0098] The non-target posture may include a device posture in which the target sensing device does not output a sensing parameter.
[0099] The second volume control strategy may include determining a default output volume of the electronic device as the output volume of the target audio, or determining an output volume used by the electronic device when it last output audio as the output volume of the target audio.
[0100] The second volume control strategy may also include determining an application program generating the play instruction and a type of the target audio to determine an output volume of the target audio.
[0101] In this policy, the electronic device can configure different output volumes for different types of installed applications, and can also configure different output volumes for different types of target audio, for example, configuring the media output volume for video or audio media player type applications, configuring the prompt output volume for alarm applications, configuring the prompt output volume for call prompt audio of call applications, and configuring the call output volume for call audio of call applications.
[0102] Based on the above configuration, if the target instruction is from a video or audio media player type, the electronic device can determine the output volume of the target audio as the media output volume based on the second volume control strategy; if the target instruction is generated by an alarm application, the electronic device can determine the output volume of the target audio as the prompt output volume based on the second volume control strategy; if the target instruction is generated by a call application and the target audio is the call audio received by the electronic device during a call, the electronic device can determine the output volume of the target audio as the call output volume based on the second volume control strategy.
[0103] The beneficial effect of this embodiment is that when the electronic device is in a non-target posture where the target sensing device does not output sensing parameters, the target sensing device is controlled to be in a disabled and uncallable state, thereby avoiding unnecessary power consumption of the target sensing device.
[0104] The method of this embodiment can be applied to any electronic device, and the electronic device can have one or more bodies.
[0105] In some optional embodiments, the electronic device may include a device body, see Figure 2 (1) and (2), a target screen may be mounted on the target surface of the device body, and the target surface is one of the largest surfaces of the device body.
[0106] The target sensing device can be installed inside the device body, for example, below the target screen, for example, Figure 2 Below the circular area shown in (1), a hole can be dug at a position on the target screen corresponding to the target sensing device and a first light-transmitting structure is arranged in the hole. The target sensing device can emit or receive light within a certain viewing angle range through the transparent glass structure, and the axis of the viewing angle range of the target sensing device is parallel to the normal of the target screen.
[0107] The direction in which the target sensing device emits or receives light can be the same as the direction in which the target screen emits light. For example, the direction perpendicular to the target screen and pointing to the outside of the device body is recorded as the front of the electronic device. The target screen can emit light toward the front of the electronic device. The target sensing device can emit light toward the front of the electronic device, and can also receive light incident from the front of the electronic device.
[0108] A flashlight may also be provided below the target screen, and a hole may be dug in the area on the target screen corresponding to the flashlight and a second light-transmitting structure may be provided in the hole, so that light from the flashlight can pass through the second light-transmitting structure to illuminate the front of the electronic device to provide lighting.
[0109] The object sensing device may be a camera or an optical distance sensor.
[0110] When the target sensing device is an optical distance sensor, the optical distance sensor may include a transmitter and a receiver. The transmitter is used to emit light (such as infrared light), and the receiver is used to receive the reflected light reflected by any object. When there is a flash under the target screen, the transmitter can be located under the second light-transmitting structure corresponding to the flash, so that the transmitter can also emit light for distance measurement through the second light-transmitting structure.
[0111] The material of any light-transmitting structure can be glass or resin.
[0112] When the target sensing device is a camera or an optical distance sensor, and the target sensing device is arranged in the device body as described above, in order to ensure that the target sensing device emits and receives light without being blocked, the target posture may include the device posture when the target angle of the device body is greater than or equal to 0 degrees and less than or equal to 90 degrees.
[0113] The target angle may be the angle between the target surface of the device body and the support surface supporting the device body, wherein when the target surface and the support surface are perpendicular, the target angle is 90 degrees; see Figure 2 (2) When the target surface and the support surface are not perpendicular and the target screen faces the area above the support surface, the target angle is less than 90 degrees; when the target surface and the support surface are parallel and the target screen faces the area above the support surface, the target angle is 0 degrees; see Figure 2 (3) When the target surface and the support surface are not perpendicular and the target screen faces the support surface, the target angle is greater than 90 degrees; when the target surface and the support surface are parallel and the target screen is close to the support surface, the target angle is 180 degrees.
[0114] When the target posture is set as described above, after the electronic device obtains the target parameters, the target angle of the electronic device can be determined based on the target parameters. If the target angle is greater than or equal to 0 degrees and less than or equal to 90 degrees, it can be determined that the target parameters meet the target conditions. If the target angle is greater than 90 degrees and less than or equal to 180 degrees, it can be determined that the target parameters do not meet the target conditions.
[0115] In some optional embodiments, the electronic device may include at least two bodies, for example, a first body and a second body. The first body and the second body may be connected to each other via a hinge structure, and both the first body and the second body may rotate around the hinge structure within a certain angle range.
[0116] In the case of including at least two bodies, the electronic device may have one screen or at least two screens.
[0117] Among them, Figure 3 As shown in (1) and (2), the first body may have a first surface and a third surface, and the third surface is located on the opposite side of the first surface. The second body may have a second surface and a fourth surface, and the fourth surface is located on the opposite side of the second surface.
[0118] In the case of having one screen, a portion of the screen may be located in the first body and display outputs through the first surface; or the screen may be located in the first body and the second body respectively and display outputs through the third surface and the fourth surface.
[0119] In the case of at least two screens, the first screen may be located in the first body, and display outputs through the first surface of the first body. The second screen may be located in the first body and the second body, and display outputs through the third surface and the fourth surface.
[0120] Among them, the first screen may be a non-deformable screen, and the second screen may be a deformable screen.
[0121] when Figure 3When the angle between the first body and the second body of the device shown is equal to 180 degrees, the device can be considered to be in a fully unfolded state, the first surface and the second surface can be located on the same side of the electronic device, and the second screen can be in an undeformed state; when the angle between the first body and the second body is less than 180 degrees, the device can be considered to be in a partially unfolded state, and the second screen can be in a bent deformed state. As the angle between the first body and the second body gradually decreases, the second surface can gradually rotate to the opposite side of the first surface, and the third surface and the fourth surface can gradually approach each other until they fit together.
[0122] In the case of having at least two screens, the first screen can be located in the first body and display output through the first surface of the first body, and the second screen can be located in the second body and display output through the second surface. The first screen and the second screen can be non-deformable screens, and when the electronic device is in a fully unfolded state, the first screen and the second screen can be combined into one screen for display output.
[0123] As an example, the shape of the electronic device having at least two bodies and the positions of the first surface and the second surface can be as follows: Figure 3 As shown in (1).
[0124] When the electronic device includes at least two bodies, each body may be respectively provided with a sensor for obtaining the target parameter. For example, when the electronic device includes a first body and a second body, the first body may include a first sensor, and the second body may include a second sensor.
[0125] In this case, the target parameters can be obtained by:
[0126] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0127] A second target parameter is obtained, where the second target parameter comes from a second sensor of the second body.
[0128] In this case, the target condition may include a target angle range and a target posture. After the electronic device obtains the first target parameter and the second target parameter, the angle between the first body and the second body and the device posture of the electronic device can be determined by the first target parameter and the second target parameter; if it is determined that the angle between the first body and the second body belongs to the target angle range and the device posture of the electronic device belongs to the target posture, it is determined that the target parameter meets the target condition; if it is determined that the angle between the first body and the second body does not belong to the target angle range, or the device posture of the electronic device does not belong to the target posture, it is determined that the target parameter does not meet the target condition.
[0129] The target angle range can be set as needed without limitation. As an example, the target angle range can be greater than 0 degrees and less than or equal to 90 degrees.
[0130] In the above embodiment, the target posture may include a first target posture and a second target posture. That is, the device posture of the electronic device belongs to the target posture, which may include that the device posture of the electronic device belongs to the first target posture, or that the device posture of the electronic device belongs to the second target posture.
[0131] See also Figure 3 , is a schematic diagram of an electronic device in a first target posture, wherein Figure 3 (1) is a three-dimensional schematic diagram of the electronic device in the first target posture, Figure 3 (2) is a side view schematic diagram of the electronic device in the first target posture.
[0132] Figure 3 In (2), the first angle is the angle between the first surface of the first body and the supporting surface of the electronic device, when the first surface faces the area above the supporting surface, the first angle is less than 90 degrees, when the first surface is perpendicular to the supporting surface, the first angle is equal to 90 degrees, and when the first surface faces the supporting surface, the first angle is greater than 90 degrees;
[0133] The second angle is the angle between the second surface of the second body and the supporting surface of the electronic device. When the second surface faces the area above the supporting surface, the second angle is less than 90 degrees. When the second surface is perpendicular to the supporting surface, the second angle is equal to 90 degrees. When the second surface faces the supporting surface, the second angle is greater than 90 degrees.
[0134] The third angle is the angle between the first surface and the second surface, which is equivalent to the angle between the first body and the second body.
[0135] The first surface of the first body is one of the surfaces with the largest area of the first body, the second surface of the second body is one of the surfaces with the largest area of the second body, and the first surface and the second surface are located on the same side of the electronic device. That is, when the third angle is equal to 180 degrees, the first surface and the second surface can be located on the same plane, and the first surface and the second surface are oriented in the same direction.
[0136] The target sensing device can be installed in the first body, below the target screen. The installation method of the target sensing device in the first body can refer to the installation method of the target sensing device in the device body in the above embodiment, which will not be repeated.
[0137] In the case of including at least two screens, the target screen may refer to the first screen located in the first body.
[0138] When the electronic device is in the first target posture, the first surface of the first body is neither parallel to nor perpendicular to the supporting surface, that is, the first angle is greater than 0 degrees and less than 90 degrees, the second surface of the second body is neither parallel to nor perpendicular to the supporting surface, that is, the second angle is greater than 0 degrees and less than 90 degrees, and the angle between the first body and the second body is less than 180 degrees. At this time, the non-common end of the first body and the non-common end of the second body are both in contact with the supporting surface, and the supporting surface supports the electronic device through the non-common ends of the two bodies.
[0139] Among them, the non-public end of the first body refers to the opposite end of the common end of the first body, the common end of the first body refers to the end of the first body connected to the hinge structure, the non-public end of the second body refers to the opposite end of the common end of the second body, and the common end of the second body refers to the end of the second body connected to the hinge structure.
[0140] When in the first target posture, the electronic device may display output through the first screen, and the first surface and the second surface may be located on opposite sides, for example Figure 3 As shown in (2), the first surface is located on the right side and the second surface is located on the left side. At this time, the second screen can be in a bent state and face the support surface of the electronic device. The bending angle of the second screen can be consistent with the angle between the first body and the second body (i.e., the aforementioned third angle).
[0141] The method of determining whether the electronic device is in the first target posture may be:
[0142] The first angle is determined according to the first target parameter, and the second angle is determined according to the second target parameter. If both the first angle and the second angle are greater than 0 degrees and less than 90 degrees, it can be determined that the electronic device is in the first target posture. If at least one of the first angle and the second angle does not satisfy the condition of being greater than 0 degrees and less than 90 degrees, it can be determined that the electronic device is not in the first target posture.
[0143] When the electronic device is in the first target posture, the third angle can be determined according to the first angle and the second angle, that is, the first angle is subtracted from 180 degrees and the second angle is subtracted, and the result can be regarded as the third angle.
[0144] See also Figure 4 , is a schematic diagram of an electronic device in a second target posture, wherein Figure 4 (1) is a three-dimensional schematic diagram of the electronic device in the second target posture, Figure 4 (2) is a side view schematic diagram of the electronic device in the second target posture.
[0145] It can be seen that when the electronic device is in the second target posture, the first surface of the first body is not parallel to the supporting surface, that is, the first angle is greater than 0 degrees and less than or equal to 90 degrees, the second surface of the second body is parallel to the supporting surface and is close to the supporting surface, that is, the second angle of the second body is equal to 180 degrees, and the angle between the first body and the second body is greater than 0 degrees and less than or equal to 90 degrees. At this time, the common end of the first body contacts the supporting surface, the second surface of the second body contacts the supporting surface, and the supporting surface supports the electronic device through the second surface of the second body. The non-common end and the non-common end of the second body are both in contact with the supporting surface, and the supporting surface supports the electronic device through the non-common ends of the two bodies.
[0146] When in the second target posture, the electronic device may display output through the first screen or through the second screen.
[0147] In the second target posture, the first surface and the second surface may also be located on opposite sides, e.g. Figure 4 As shown in (2), the first surface is located on the upward side of the electronic device, and the second surface is located on the downward side of the electronic device. At this time, the second screen can be in a bent state. The bending angle of the second screen can be consistent with the angle between the first body and the second body (i.e., the aforementioned third angle).
[0148] The method of determining whether the electronic device is in the second target posture may be:
[0149] The first angle is determined according to the first target parameter, and the second angle is determined according to the second target parameter. If the first angle is greater than 0 degrees and less than or equal to 90 degrees, and the second angle is equal to 180 degrees, it can be determined that the electronic device is in the second target posture. If the first angle is greater than 90 degrees, or the second angle is less than 180, it can be determined that the electronic device is not in the second target posture.
[0150] When the electronic device is in the second target posture, since the second surface is adjacent to the supporting surface of the electronic device, the first angle between the first surface and the supporting surface is equivalent to the third angle between the first surface and the second surface. Therefore, when determining that the electronic device is in the second target posture, the first angle can be determined as the third angle between the first body and the second body.
[0151] In some optional embodiments, the method of obtaining the target parameter may also include:
[0152] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0153] obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body;
[0154] A third target parameter is obtained, where the third target parameter represents an angle between the first body and the second body.
[0155] When the target parameters are obtained in the above manner, the method for determining whether the target parameters meet the target conditions may be to determine the device posture of the electronic device through the first target parameter and the second target parameter; if the third target parameter belongs to the target angle range and the device posture of the electronic device belongs to the target posture, then it is determined that the target parameters meet the target condition; if the third target parameter does not belong to the target angle range, or the device posture of the electronic device does not belong to the target posture, then it is determined that the target parameters do not meet the target condition.
[0156] The third target parameter may be the angle between the first body and the second body, or other parameters that can be used to calculate the angle. The third target parameter may be determined based on the parameters output by the first sensor and the second sensor, or may be directly measured by other sensors used to detect the angle between the first body and the second body.
[0157] The method of determining whether the electronic device is in the target posture by using the first target parameter and the second target parameter can be found in the previous text and will not be described in detail.
[0158] Optionally, the method of determining the output volume of the target audio using the first volume control strategy may include:
[0159] calling a target sensing device based on a first volume control strategy;
[0160] Obtaining sensing parameters of the target sensing device, where the sensing parameters are used to characterize the presence of a target object in the sensing area of the target sensing device when the electronic device is in the target posture and the distance between the target object and the electronic device;
[0161] An output volume is determined based on the sensed parameter and the target relationship.
[0162] Wherein, when the target sensing device is a camera, the sensing parameter may be an image captured by the camera. The electronic device may first determine whether there is a target object in the sensing area and the distance between the target object and the electronic device based on the image.
[0163] The sensing area may be an area within a certain distance in front of the electronic device, for example, the area within 1 meter in front of the electronic device is the sensing area, and the area within 2 meters in front of the electronic device is the sensing area.
[0164] Optionally, the area in front of the electronic device that meets the following conditions may also be determined as the sensing area:
[0165] If the target object is located in the sensing area of the target sensing device, the target object can focus on the target screen of the electronic device in the target posture.
[0166] The method of determining whether there is a target object in the sensing area based on the image can be:
[0167] Detect whether there are body parts of the target object in the image, including but not limited to the face, torso, limbs, etc. If there is at least one body part of the target object, it can be determined that the target object exists in the sensing area; if there is no body part, it can be determined that the target object does not exist in the sensing area;
[0168] Alternatively, in the case where a body part exists in the image, the distance from the target object to the electronic device may be determined based on the body part in the image to determine whether the distance is within the range of the sensing area. If the distance exceeds the range of the sensing area, for example, the sensing area is 1 meter in front of the electronic device and the determined distance is 1.5 meters, it is determined that the target object does not exist in the sensing area. If the distance does not exceed the range of the sensing area, it can be determined that the target object exists in the sensing area.
[0169] Alternatively, when there is a body part in the image, the size information of the body part can also be determined, and the size information can be compared with the size information of the same body part when the target object is exactly located at the edge of the sensing area. If the former is larger than the latter, it is determined that there is a target object in the sensing area; if the former is smaller than the latter, it is determined that there is no target object in the sensing area.
[0170] The distance between the target object and the electronic device may be determined according to the image by:
[0171] If the body part present in the image is the face of the target object, the size information of the face of the target object can be detected. Figure 5 As shown, the size information may be the width or height of the rectangular face area.
[0172] After the size information is obtained, the distance from the current target object to the electronic device can be determined based on the size information, a preset reference distance and reference size information; the size information can be expressed in pixels.
[0173] The reference distance may be any specified distance, such as 1 meter, and the reference size information may be the size information of the face of the target object in the image captured when the distance between the target object and the electronic device is equal to the reference distance. For example, if the width of the facial area in the image captured when the target object is located 1 meter in front of the electronic device is 100 pixels, then the reference size information is 100 pixels.
[0174] Generally speaking, there is a certain proportional relationship between the size of the face in the image and the distance between the object and the electronic device when the image is taken. Therefore, when determining the distance, you can first determine the ratio between the current image size information and the reference size information, calculate the reference distance based on the ratio, and determine the calculation result as the distance from the target object to the electronic device.
[0175] If there are limbs or torso parts other than the face in the image, the image can be identified except for the face. Figure 6 For any number of key points corresponding to the body parts shown, the normalized coordinates of these key points in the image are determined, and the Euclidean distances between the key points are determined according to the normalized coordinates. The values of the normalized coordinates can be between 0 and 1.
[0176] For example, based on the detected Figure 6 The key point in the figure can be the middle point between 23 and 24 as the origin to establish a plane rectangular coordinate system, and then determine Figure 6 The normalized coordinates of the key points 11 and 12 are obtained, and the Euclidean distance between the key points 11 and 12 is determined according to the normalized coordinates.
[0177] At the same time, the reference distance and the reference Euclidean distance between each key point corresponding to the reference distance can be pre-configured in the electronic device, that is, the reference Euclidean distance between the key points in the image captured when the target object is located at the reference distance. For example, when the target object is located at the reference distance of 1 meter, the Euclidean distance between key points 11 and 12 in the captured image is 0.3, then the reference Euclidean distance is 0.3.
[0178] Afterwards, the ratio of the Euclidean distance between the key points in the current image and the reference Euclidean distance of the two key points can be determined, the reference distance is calculated according to the ratio, and the calculation result is determined as the distance from the target object to the electronic device.
[0179] When the target sensing device is an optical distance sensor, the sensing parameter may be the intensity of a light signal received by a receiver of the optical distance sensor. The electronic device may determine whether there is a target object in the sensing area and, if there is a target object, the distance between the target object and the electronic device based on the intensity of the light signal.
[0180] The method of determining whether there is a target object in the sensing area based on the intensity of the light signal can be:
[0181] Determine whether the receiver can detect a reflected light signal after the light signal emitted by the transmitter is reflected. If the reflected light signal can be detected, it is determined that there is a target object in the sensing area. If no reflected light signal is detected, it is determined that there is no target object in the sensing area.
[0182] Alternatively, if a reflected light signal is detected, determine whether the intensity of the reflected light signal is greater than the intensity of the reflected light signal when the target object is exactly located at the edge of the sensing area. If so, determine that there is a target object in the sensing area; if not, determine that there is no target object in the sensing area.
[0183] The method of determining the distance between the target object and the electronic device according to the intensity of the light signal may be:
[0184] The correspondence between the intensity of the reflected light signal and the distance is pre-configured in the electronic device. The correspondence can be a functional relationship or a data table. After obtaining the intensity of the reflected light signal, the electronic device determines the distance between the target object and the electronic device based on the intensity of the reflected light signal and the correspondence.
[0185] After determining whether a target object exists and the distance of the target object, the electronic device may determine the output volume according to the target relationship in the following manner.
[0186] If there is no target object in the sensing area, the output volume used in the previous audio output is determined as the output volume of the target audio, or the default output volume of the electronic device is determined as the output volume of the target audio;
[0187] If there is a target object in the sensing area, a distance-volume correspondence pre-configured in the memory of the electronic device is obtained, and the distance-volume correspondence relationship can represent the volume that can be just heard by the corresponding target object at different distances; then the volume corresponding to the distance from the current target object to the electronic device in the distance-volume correspondence relationship is determined, and this volume is recorded as the target volume;
[0188] After obtaining the target volume, the target volume can be directly determined as the output volume corresponding to the target audio;
[0189] Alternatively, the target volume may be compared with the output volume used for the previous audio output. If the target volume is greater than the previous output volume, the previous output volume may be determined as the output volume of the target audio. If the target volume is less than or equal to the previous output volume, the target volume may be determined as the output volume of the target audio.
[0190] Alternatively, the target volume and the default output volume may be compared. If the target volume is greater than the default output volume, the default output volume may be determined as the output volume of the target audio. If the target volume is less than or equal to the default output volume, the target volume may be determined as the output volume of the target audio.
[0191] In some optional embodiments, the target volume can be determined according to the distance of the target object and the noise intensity of the environment in which the electronic device is located. For example, if the noise intensity of the environment in which the electronic device is located is greater than a certain noise intensity threshold, the volume corresponding to the distance can be appropriately increased according to the noise intensity of the environment, and the increased volume is used as the target volume. The greater the noise intensity of the environment, the greater the increase.
[0192] In some optional embodiments, the target volume may also be related to the type of application that generates the play instruction and the type of target audio. That is, when the distance to the target object is fixed, different target volumes can be determined according to the different applications that generate the play instruction and the different types of target audio that need to be played. The relationship between the type of application and the target volume, and the relationship between the type of target audio and the target volume can be set by the user as needed without limitation.
[0193] The present application embodiment provides an electronic device, see Figure 7 , the electronic device may include:
[0194] Target sensing device 701;
[0195] Processor 702 is used to obtain a target parameter, where the target parameter is used to characterize the device posture of the electronic device. If the target parameter satisfies the target condition, the device posture of the electronic device matches the target posture and a play instruction for the target audio is obtained, an output volume of the target audio is determined using a first volume control strategy; and in response to the play instruction, the target audio is output at the output volume.
[0196] The first volume control strategy is based on a target sensing device, and the target sensing device can be controlled to be in an enabled state when the electronic device is in a target posture.
[0197] Optionally, the electronic device may include:
[0198] A first body including a first sensor;
[0199] A second body including a second sensor;
[0200] The processor 702 is located in one of the first body and the second body, and the processor is used to obtain target parameters, including:
[0201] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0202] obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body;
[0203] or,
[0204] Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body;
[0205] obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body;
[0206] Obtaining a third target parameter, where the third target parameter represents an angle between the first body and the second body;
[0207] The target parameters that meet the target conditions include:
[0208] Determine the angle between the first body and the second body and the device posture of the electronic device according to the first target parameter and the second target parameter;
[0209] The angle between the first body and the second body belongs to the target angle range and the device posture of the electronic device belongs to the target posture, and the target condition includes the target angle range and the target posture;
[0210] or,
[0211] Determine a device posture of the electronic device by using the first target parameter and the second target parameter;
[0212] If the third target parameter belongs to the target angle range and the device posture of the electronic device belongs to the target posture, the target condition includes the target angle range and the target posture.
[0213] Optionally, the target posture includes a first target posture and a second target posture;
[0214] When the electronic device is in the first target posture, the first surface of the first body is not parallel to the support surface of the electronic device and is not perpendicular to the support surface, the second surface of the second body is not parallel to the support surface and is not perpendicular to the support surface, and the angle between the first body and the second body is less than 180 degrees;
[0215] When the electronic device is in the second target posture, the first surface of the first body is not parallel to the supporting surface, the second surface of the second body is parallel to the supporting surface, and the angle between the first body and the second body is less than 180 degrees.
[0216] Optionally, the electronic device further comprises:
[0217] A target screen is located on the first surface of the first body;
[0218] The target sensing device is located inside the first body, and the target sensing device obtains sensing parameters through the target screen, wherein if the target object is located in the sensing area of the target sensing device, the target object can focus on the target screen of the electronic device in the target posture;
[0219] The processor determines the output volume of the target audio using the first volume control strategy, including:
[0220] calling a target sensing device based on a first volume control strategy;
[0221] Obtaining sensing parameters of the target sensing device, where the sensing parameters are used to characterize the presence of a target object in the sensing area of the target sensing device when the electronic device is in the target posture and the distance between the target object and the electronic device;
[0222] An output volume is determined based on the sensed parameter and the target relationship.
[0223] Optionally, the processor is further configured to:
[0224] If the target parameter satisfies the target condition, indicating that the device posture of the electronic device does not match the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a second volume control strategy.
[0225] Wherein, the target sensing device cannot be controlled to be in an enabled state when the electronic device is in a non-target posture.
[0226] The working principle of the electronic device of this embodiment can refer to the relevant steps of the output method provided in any embodiment, and will not be described in detail.
[0227] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0228] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0229] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0230] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants 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, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0231] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An output method, comprising: Obtaining a target parameter, wherein the target parameter is used to characterize a device posture of the electronic device; If the target parameter satisfies the target condition, indicating that the device posture of the electronic device matches the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a first volume control strategy; In response to the play instruction, output the target audio at the output volume; Wherein, the first volume control strategy is based on a target sensing device, and the target sensing device can be controlled to be in an enabled state when the electronic device is in the target posture.
2. The method according to claim 1, further comprising: If the target parameter does not meet the target condition, indicating that the device posture of the electronic device does not match the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a second volume control strategy; Wherein, the target sensing device cannot be controlled to be in an enabled state when the electronic device is in a posture other than the target posture.
3. The method according to claim 2, wherein the electronic device comprises a first body and a second body; The obtaining of target parameters comprises: Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body; obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body; The target parameters satisfying the target conditions include: Determine the angle between the first body and the second body and the device posture of the electronic device according to the first target parameter and the second target parameter; The angle between the first body and the second body belongs to a target angle range and the device posture of the electronic device belongs to a target posture, and the target condition includes a target angle range and a target posture.
4. The method according to claim 2, wherein the electronic device comprises a first body and a second body; The obtaining of target parameters comprises: Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body; obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body; Obtaining a third target parameter, wherein the third target parameter represents an angle between the first body and the second body; The target parameters satisfying the target conditions include: Determine the device posture of the electronic device according to the first target parameter and the second target parameter; If the third target parameter belongs to the target angle range and the device posture of the electronic device belongs to the target posture, the target condition includes the target angle range and the target posture.
5. The method according to claim 3 or 4, wherein determining the output volume of the target audio using the first volume control strategy comprises: calling a target sensing device based on the first volume control strategy; Obtaining sensing parameters of the target sensing device, wherein the sensing parameters are used to characterize the presence of a target object in the sensing area of the target sensing device when the electronic device is in a target posture and the distance between the target object and the electronic device; An output volume is determined based on the sensed parameter and the target relationship.
6. An electronic device comprising: Target sensing device; A processor is configured to obtain a target parameter, wherein the target parameter is used to characterize a device posture of the electronic device, and if the target parameter satisfies a target condition, characterizes that the device posture of the electronic device matches the target posture and obtains a play instruction for a target audio, determines an output volume of the target audio using a first volume control strategy; and outputs the target audio at the output volume in response to the play instruction; Wherein, the first volume control strategy is based on the target sensing device, and the target sensing device can be controlled to be in an enabled state when the electronic device is in the target posture.
7. The electronic device according to claim 6, comprising: A first body including a first sensor; A second body including a second sensor; The processor is located in one of the first body and the second body, and the processor is used to obtain the target parameter, including: Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body; obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body; or, Obtaining a first target parameter, where the first target parameter comes from a first sensor of the first body; obtaining a second target parameter, where the second target parameter comes from a second sensor of the second body; Obtaining a third target parameter, wherein the third target parameter represents an angle between the first body and the second body; The target parameters satisfying the target conditions include: Determine the angle between the first body and the second body and the device posture of the electronic device according to the first target parameter and the second target parameter; The angle between the first body and the second body belongs to a target angle range and the device posture of the electronic device belongs to a target posture, and the target condition includes a target angle range and a target posture; or, Determine the device posture of the electronic device according to the first target parameter and the second target parameter; If the third target parameter belongs to the target angle range and the device posture of the electronic device belongs to the target posture, the target condition includes the target angle range and the target posture.
8. The electronic device according to claim 7, wherein the target posture comprises at least a first target posture and a second target posture; When the electronic device is in the first target posture, the first surface of the first body is not parallel to the support surface of the electronic device and is not perpendicular to the support surface, the second surface of the second body is not parallel to the support surface and is not perpendicular to the support surface, and the angle between the first body and the second body is less than 180 degrees; When the electronic device is in the second target posture, the first surface of the first body is not parallel to the supporting surface, the second surface of the second body is parallel to the supporting surface, and the angle between the first body and the second body is less than 180 degrees.
9. The electronic device according to claim 6, further comprising: a target screen, wherein a display area of the target screen passes through the first surface of the first body; The target sensing device is located inside the first body, and the target sensing device obtains sensing parameters through the target screen, wherein if the target object is located in the sensing area of the target sensing device, the target object can focus on the target screen of the electronic device in a target posture; The processor determines the output volume of the target audio using a first volume control strategy, including: calling a target sensing device based on the first volume control strategy; Obtaining sensing parameters of the target sensing device, wherein the sensing parameters are used to characterize the presence of a target object in the sensing area of the target sensing device when the electronic device is in a target posture and the distance between the target object and the electronic device; An output volume is determined based on the sensed parameter and the target relationship.
10. The electronic device according to claim 6, wherein the processor is further configured to: If the target parameter satisfies the target condition, indicating that the device posture of the electronic device does not match the target posture and a play instruction for the target audio is obtained, the output volume of the target audio is determined using a second volume control strategy, in, The target sensing device cannot be controlled to be in an enabled state when the electronic device is in a posture other than the target posture.
