CN105045492A - Sleep play duration setting method and terminal device - Google Patents
Sleep play duration setting method and terminal device Download PDFInfo
- Publication number
- CN105045492A CN105045492A CN201510535005.9A CN201510535005A CN105045492A CN 105045492 A CN105045492 A CN 105045492A CN 201510535005 A CN201510535005 A CN 201510535005A CN 105045492 A CN105045492 A CN 105045492A
- Authority
- CN
- China
- Prior art keywords
- pressure value
- touch pressure
- sleep
- time setting
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000007958 sleep Effects 0.000 title claims abstract description 144
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000001514 detection method Methods 0.000 claims description 14
- 230000036578 sleeping time Effects 0.000 claims description 10
- 230000004622 sleep time Effects 0.000 claims description 6
- 230000001960 triggered effect Effects 0.000 claims description 2
- 230000004617 sleep duration Effects 0.000 description 67
- 238000010586 diagram Methods 0.000 description 9
- 238000012935 Averaging Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 230000003860 sleep quality Effects 0.000 description 1
Landscapes
- Telephone Function (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本发明实施例公开了一种睡眠播放时长设置方法及终端设备,该方法包括:检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,时间设置条包含滑块;当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以快速设置睡眠播放时长。
The embodiment of the present invention discloses a sleep playing time setting method and a terminal device. The method includes: detecting the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playing mode. The time setting bar includes Slider; when the touch pressure value is greater than the preset threshold, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value until the touch pressure value When it is less than or equal to the preset threshold, the control slider stops moving; wherein, when the slider stops moving, the time duration corresponding to the position of the slider on the time setting bar is the sleep playing time. By implementing the embodiment of the present invention, the sleep playing duration can be quickly set.
Description
技术领域technical field
本发明涉及通信技术领域,具体涉及一种睡眠播放时长设置方法及终端设备。The present invention relates to the field of communication technology, in particular to a method for setting a sleep playback duration and a terminal device.
背景技术Background technique
为了提高用户的睡眠质量,一些终端设备中的音乐播放器配置了睡眠播放模式,开启睡眠播放模式后,终端设备可以在睡眠播放时长内播放音乐以帮助用户在音乐的陪伴下快速入睡。用户可以根据自身需求设置睡眠播放时长,例如,用户需要设置睡眠播放时长为50分钟,可以通过拖动时间设置条(如时间设置条总长度为10cm,时间设置条对应的总时长为100分钟)上的滑块到5cm的位置,由于时间设置条长度较短,使得用户手动拖动滑块很不便捷,从而难以快速设置睡眠播放时长。In order to improve the sleep quality of users, music players in some terminal devices are equipped with a sleep playback mode. After the sleep playback mode is turned on, the terminal device can play music during the sleep playback time to help users fall asleep quickly accompanied by music. Users can set the sleep playback time according to their own needs. For example, if the user needs to set the sleep play time to 50 minutes, they can drag the time setting bar (for example, the total length of the time setting bar is 10cm, and the total time corresponding to the time setting bar is 100 minutes). From the position of the slider to 5cm, due to the short length of the time setting bar, it is inconvenient for the user to manually drag the slider, making it difficult to quickly set the sleep playback time.
发明内容Contents of the invention
本发明实施例提供一种睡眠播放时长设置方法及终端设备,可以快速设置睡眠播放时长。Embodiments of the present invention provide a sleep playback duration setting method and a terminal device, which can quickly set the sleep playback duration.
本发明实施例第一方面,提供了一种睡眠播放时长设置方法,包括:In the first aspect of the embodiments of the present invention, a method for setting the sleep playback duration is provided, including:
检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,所述时间设置条包含滑块;Detecting the touch pressure value for any target position of the time setting bar displayed in the terminal device in the sleep playing mode, the time setting bar comprising a slider;
当所述触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿预设方向移动,直至所述触及压力值小于等于所述预设阈值时,控制所述滑块停止移动;其中,所述滑块停止移动时,所述滑块在所述时间设置条上的位置对应的时长为睡眠播放时长。When the touch pressure value is greater than the preset threshold value, according to the corresponding relationship between the touch pressure value and the movement speed, the slider is controlled to move along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value , until the touch pressure value is less than or equal to the preset threshold value, control the slider to stop moving; wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar Play duration for sleep.
在本发明实施例第一方面的第一种可能的实现方式中,所述检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值之前,所述方法还包括:In the first possible implementation of the first aspect of the embodiment of the present invention, before the detection of the touch pressure value of any target position of the time setting bar displayed on the terminal device in the sleep playback mode, the method further include:
采集输入的指纹信息;Collect the input fingerprint information;
判断所述指纹信息是否与预设指纹信息匹配;judging whether the fingerprint information matches the preset fingerprint information;
若是,调取与所述预设指纹信息对应的用户的平均入睡时长;If so, call the average sleep duration of the user corresponding to the preset fingerprint information;
判断所述平均入睡时长是否与当前所述滑块在所述时间设置条上的位置所对应的时长匹配;Judging whether the average duration of falling asleep matches the duration corresponding to the current position of the slider on the time setting bar;
若否,执行所述检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值的步骤。If not, the step of detecting the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playing mode is executed.
结合本发明实施例第一方面的第一种可能的实现方式,在本发明实施例第一方面的第二种可能的实现方式中,所述调取与所述预设指纹信息对应的用户的平均入睡时长之前,所述方法还包括:With reference to the first possible implementation manner of the first aspect of the embodiment of the present invention, in the second possible implementation manner of the first aspect of the embodiment of the present invention, the calling of the user's ID corresponding to the preset fingerprint information Before the average sleep duration, the method further includes:
接收穿戴设备发送的所述用户的预设天数中的每一天的入睡时长;Receiving the sleep duration of each of the user's preset days sent by the wearable device;
根据所述预设天数中的每一天的入睡时长计算所述用户的平均入睡时长。The average sleep duration of the user is calculated according to the sleep duration of each day in the preset number of days.
结合本发明实施例第一方面的第一种可能的实现方式,在本发明实施例第一方面的第三种可能的实现方式中,在所述采集输入的指纹信息之后,以及在所述判断所述指纹信息是否与预设指纹信息匹配之前,所述方法还包括:With reference to the first possible implementation of the first aspect of the embodiments of the present invention, in the third possible implementation of the first aspect of the embodiments of the present invention, after the collection of input fingerprint information, and after the determination Before whether the fingerprint information matches the preset fingerprint information, the method also includes:
向所述终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求;Sending a preset fingerprint information acquisition request to a specified relationship user in a social application running on the terminal device;
接收所述指定关系用户发送的预设指纹信息。The preset fingerprint information sent by the specified relationship user is received.
结合本发明实施例第一方面,在本发明实施例第一方面的第四种可能的实现方式中,所述时间设置条包括初始端和末端,所述当所述触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿预设方向移动,包括:With reference to the first aspect of the embodiments of the present invention, in a fourth possible implementation manner of the first aspect of the embodiments of the present invention, the time setting bar includes an initial end and an end, and when the touch pressure value is greater than a preset threshold , according to the corresponding relationship between the touching pressure value and the moving speed, control the slider to move along the preset direction on the time setting bar at the moving speed corresponding to the touching pressure value, including:
当所述触及压力值大于预设阈值时,若所述目标位置位于所述滑块和所述初始端之间,根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿指向所述初始端的方向移动;When the touch pressure value is greater than the preset threshold, if the target position is located between the slider and the initial end, according to the corresponding relationship between the touch pressure value and the moving speed, the slider is controlled to reach the The moving speed corresponding to the pressure value moves in the direction of the initial end on the time setting bar;
或者,or,
当所述触及压力值大于预设阈值时,若所述目标位置位于所述滑块和所述末端之间,根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿指向所述末端的方向移动。When the touch pressure value is greater than the preset threshold, if the target position is between the slider and the end, according to the corresponding relationship between the touch pressure value and the moving speed, the slider is controlled to use the touch pressure The movement speed corresponding to the value moves in the direction toward the end on the time setting bar.
本发明实施例第二方面,提供了一种终端设备,包括:The second aspect of the embodiment of the present invention provides a terminal device, including:
检测单元,用于检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,所述时间设置条包含滑块;The detection unit is used to detect the touch pressure value for any target position of the time setting bar displayed in the terminal device in the sleep playing mode, and the time setting bar includes a slider;
控制单元,用于当所述触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿预设方向移动,直至所述触及压力值小于等于所述预设阈值时,控制所述滑块停止移动;其中,所述滑块停止移动时,所述滑块在所述时间设置条上的位置对应的时长为睡眠播放时长。A control unit, configured to control the slider to move on the time setting bar at the moving speed corresponding to the touching pressure value according to the corresponding relationship between the touching pressure value and the moving speed when the touching pressure value is greater than a preset threshold value Move along the preset direction until the touch pressure value is less than or equal to the preset threshold, control the slider to stop moving; wherein, when the slider stops moving, the slider is on the time setting bar The corresponding duration of the position is the sleep playback duration.
在本发明实施例第二方面的第一种可能的实现方式中,所述终端设备还包括:In a first possible implementation manner of the second aspect of the embodiment of the present invention, the terminal device further includes:
采集单元,用于采集输入的指纹信息;a collection unit, configured to collect input fingerprint information;
第一判断单元,用于判断所述指纹信息是否与预设指纹信息匹配;A first judging unit, configured to judge whether the fingerprint information matches preset fingerprint information;
调取单元,用于当所述第一判断单元判断结果为是时,调取与所述预设指纹信息对应的用户的平均入睡时长;A calling unit, configured to call the average sleep duration of the user corresponding to the preset fingerprint information when the judgment result of the first judging unit is yes;
第二判断单元,用于判断所述平均入睡时长是否与当前所述滑块在所述时间设置条上的位置所对应的时长匹配;A second judging unit, configured to judge whether the average duration of falling asleep matches the duration corresponding to the current position of the slider on the time setting bar;
其中,当所述第二判断单元判断结果为否时,触发所述检测单元检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值。Wherein, when the judgment result of the second judgment unit is negative, the detection unit is triggered to detect the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playback mode.
结合本发明实施例第二方面的第一种可能的实现方式,在本发明实施例第二方面的第二种可能的实现方式中,所述终端设备还包括:With reference to the first possible implementation manner of the second aspect of the embodiment of the present invention, in the second possible implementation manner of the second aspect of the embodiment of the present invention, the terminal device further includes:
第一接收单元,用于接收穿戴设备发送的所述用户的预设天数中的每一天的入睡时长;The first receiving unit is configured to receive the sleep duration of each of the user's preset days sent by the wearable device;
计算单元,用于根据所述预设天数中的每一天的入睡时长计算所述用户的平均入睡时长。A calculation unit, configured to calculate the average duration of falling asleep of the user according to the duration of falling asleep on each of the preset days.
结合本发明实施例第二方面的第一种可能的实现方式,在本发明实施例第二方面的第三种可能的实现方式中,所述终端设备还包括:With reference to the first possible implementation manner of the second aspect of the embodiments of the present invention, in a third possible implementation manner of the second aspect of the embodiments of the present invention, the terminal device further includes:
发送单元,用于向所述终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求;A sending unit, configured to send a preset fingerprint information acquisition request to a specified relationship user in a social application running on the terminal device;
第二接收单元,用于接收所述指定关系用户发送的预设指纹信息。The second receiving unit is configured to receive the preset fingerprint information sent by the specified relationship user.
结合本发明实施例第二方面,在本发明实施例第二方面的第四种可能的实现方式中,所述时间设置条包括初始端和末端,所述当所述触及压力值大于预设阈值时,所述控制单元根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿预设方向移动的方式具体为:With reference to the second aspect of the embodiment of the present invention, in a fourth possible implementation manner of the second aspect of the embodiment of the present invention, the time setting bar includes an initial end and an end, and when the touch pressure value is greater than a preset threshold , according to the corresponding relationship between the touching pressure value and the moving speed, the control unit controls the slider to move along the preset direction on the time setting bar at the moving speed corresponding to the touching pressure value as follows:
当所述触及压力值大于预设阈值时,若所述目标位置位于所述滑块和所述初始端之间,所述控制单元根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿指向所述初始端的方向移动;When the touch pressure value is greater than a preset threshold, if the target position is located between the slider and the initial end, the control unit controls the slider according to the corresponding relationship between the touch pressure value and the moving speed move on the time setting bar in a direction pointing to the initial end at the moving speed corresponding to the touch pressure value;
或者,or,
当所述触及压力值大于预设阈值时,若所述目标位置位于所述滑块和所述末端之间,所述控制单元根据触及压力值与移动速度的对应关系,控制所述滑块以所述触及压力值对应的移动速度在所述时间设置条上沿指向所述末端的方向移动。When the touch pressure value is greater than a preset threshold, if the target position is located between the slider and the end, the control unit controls the slider to The movement speed corresponding to the touch pressure value moves in the direction of the end on the time setting bar.
本发明实施例中,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,时间设置条包含滑块;当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长。In the embodiment of the present invention, the touch pressure value of any target position of the time setting bar displayed in the terminal device is detected in the sleep playing mode, and the time setting bar contains a slider; when the touch pressure value is greater than the preset threshold, according to the touch The corresponding relationship between the pressure value and the movement speed, the control slider moves along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value, until the touch pressure value is less than or equal to the preset threshold value, the control slider stops moving; among them, When the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration. By implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure, so that the sleep playing time can be quickly set.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明实施例公开的一种睡眠播放时长设置方法的流程图;Fig. 1 is a flow chart of a method for setting the duration of sleep playback disclosed in an embodiment of the present invention;
图2是本发明实施例公开的另一种睡眠播放时长设置方法的流程图;Fig. 2 is a flow chart of another method for setting the sleep playback duration disclosed in the embodiment of the present invention;
图3是本发明实施例公开的另一种睡眠播放时长设置方法的流程图;Fig. 3 is a flow chart of another sleep playing duration setting method disclosed by an embodiment of the present invention;
图4是本发明实施例公开的另一种睡眠播放时长设置方法的流程图;Fig. 4 is a flow chart of another sleep playing duration setting method disclosed by an embodiment of the present invention;
图5是本发明实施例公开的一种终端设备的结构示意图;FIG. 5 is a schematic structural diagram of a terminal device disclosed in an embodiment of the present invention;
图6是本发明实施例公开的另一种终端设备的结构示意图;FIG. 6 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention;
图7是本发明实施例公开的另一种终端设备的结构示意图;FIG. 7 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention;
图8是本发明实施例公开的另一种终端设备的结构示意图;FIG. 8 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention;
图9是本发明实施例公开的一种时间设置条的结构示意图。Fig. 9 is a schematic structural diagram of a time setting bar disclosed in an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施方式中的附图,对本发明实施方式中的技术方案进行清楚、完整地描述。显然,所描述的实施方式是本发明的一部分实施方式,而不是全部实施方式。基于本发明中的实施方式,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施方式,都应属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Apparently, the described embodiments are some, not all, embodiments of the present invention. Based on the implementation manners in the present invention, all other implementation manners obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
本发明实施例提供一种睡眠播放时长设置方法及终端设备,可以快速设置睡眠播放时长。以下分别进行详细说明。Embodiments of the present invention provide a sleep playback duration setting method and a terminal device, which can quickly set the sleep playback duration. Each will be described in detail below.
本发明实施例中描述的终端设备可包括:手机、平板电脑或者随身听等,上述终端设备仅是举例,而非穷举,包含但不限于上述终端设备。The terminal devices described in the embodiments of the present invention may include: mobile phones, tablet computers, or walkmans, etc., and the above-mentioned terminal devices are only examples, not exhaustive, including but not limited to the above-mentioned terminal devices.
请参阅图1,图1是本发明实施例公开的一种睡眠播放时长设置方法的流程图。如图1所示,本实施例中所描述的睡眠播放时长设置方法,包括步骤:Please refer to FIG. 1 . FIG. 1 is a flow chart of a method for setting sleep playback duration disclosed by an embodiment of the present invention. As shown in Figure 1, the sleep playing duration setting method described in this embodiment includes steps:
S101,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,时间设置条包含滑块。S101. Detect a touch pressure value for any target position of a time setting bar displayed on a terminal device in a sleep playing mode, where the time setting bar includes a slider.
本发明实施例中,可以通过终端设备的屏幕中的压力传感器检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,可以实时检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,可以在终端设备中的音乐播放器中配置睡眠播放模式,开启睡眠播放模式后,终端设备可以在睡眠播放时长内播放音乐以帮助用户在音乐的陪伴下快速入睡。时间设置条为睡眠播放模式下设置睡眠播放时长的时间条,时间设置条上包含滑块,可以通过改变时间设置条上的滑块位置设置睡眠播放时长,时间设置条的任一目标位置可以是时间设置条上的任一目标位置,目标位置可以位于时间设置条的两端,也可以位于时间设置条的中间的任一位置。例如,如图9所示,在睡眠播放模式下,当用户按压时间设置条上的位置a(位置a为任一目标位置)时,检测位置a的触及压力值。In the embodiment of the present invention, the pressure sensor in the screen of the terminal device can be used to detect the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playback mode, and the real-time detection can be performed in the sleep playback mode. The touch pressure value of any target position of the time setting bar displayed on the terminal device can configure the sleep playback mode in the music player of the terminal device. After the sleep playback mode is turned on, the terminal device can play music within the sleep playback time. Help users fall asleep quickly accompanied by music. The time setting bar is the time bar for setting the length of sleep playback in the sleep playback mode. The time setting bar contains a slider. You can set the sleep playback time by changing the position of the slider on the time setting bar. Any target position of the time setting bar can be Any target position on the time setting bar, the target position can be located at both ends of the time setting bar, or at any position in the middle of the time setting bar. For example, as shown in FIG. 9 , in the sleep playing mode, when the user presses position a on the time setting bar (position a is any target position), the touch pressure value of position a is detected.
S102,当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。S102, when the touch pressure value is greater than the preset threshold, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value until the touch pressure value is less than When it is equal to the preset threshold, the control slider stops moving; wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration.
本发明实施例中,预设阈值可以根据系统进行设定,也可以由用户进行设定,触及压力值与移动速度的对应关系可以是:随着触及压力值的增大,移动速度增大,例如:若时间设置条在终端设备屏幕中的长度为5cm,预设阈值为0.1N,当触及压力值为0.2N时,对应的移动速度为0.2cm/s;当触及压力值为0.3N时,对应的移动速度为0.3cm/s;当触及压力值为0.4N时,对应的移动速度为0.4cm/s;当触及压力值为0.5N时,对应的移动速度为0.5cm/s。预设方向可以为指向目标位置的方向,也可以为远离目标位置的方向。当检测到触及压力值小于等于预设阈值时,控制滑块停止移动,此时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。In the embodiment of the present invention, the preset threshold can be set according to the system, or can be set by the user. The corresponding relationship between the touch pressure value and the movement speed can be: as the touch pressure value increases, the movement speed increases, For example: if the length of the time setting bar on the screen of the terminal device is 5cm, and the preset threshold is 0.1N, when the touch pressure value is 0.2N, the corresponding moving speed is 0.2cm/s; when the touch pressure value is 0.3N , the corresponding moving speed is 0.3cm/s; when the touching pressure value is 0.4N, the corresponding moving speed is 0.4cm/s; when the touching pressure value is 0.5N, the corresponding moving speed is 0.5cm/s. The preset direction may be a direction pointing to the target position, or a direction away from the target position. When it is detected that the touch pressure value is less than or equal to the preset threshold, the control slider stops moving. At this time, the time corresponding to the position of the slider on the time setting bar is the sleep playing time.
在一些可行的实施方式中,时间设置条包括初始端和末端,步骤S102包括:In some feasible implementation manners, the time setting bar includes an initial end and an end, and step S102 includes:
当触及压力值大于预设阈值时,若目标位置位于滑块和初始端之间,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向初始端的方向移动;When the touch pressure value is greater than the preset threshold, if the target position is between the slider and the initial end, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move at the speed corresponding to the touch pressure value on the upper edge of the time setting bar. Move in the direction of the initial end;
或者,or,
当触及压力值大于预设阈值时,若目标位置位于滑块和末端之间,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向末端的方向移动。When the touch pressure value is greater than the preset threshold, if the target position is between the slider and the end, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to point at the time setting bar at the movement speed corresponding to the touch pressure value. The direction of the end moves.
本发明实施例中,时间设置条包括初始端和末端,当滑块位于时间设置条的初始端时,睡眠播放时长最小,例如:为0,当滑块位于时间设置条的末端时,睡眠播放时长为最大,例如:为100分钟。当触及压力值大于预设阈值时,若目标位置位于滑块和初始端之间,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向初始端的方向移动,例如:当触及压力值为0.5N,若对应的移动速度为0.5cm/s,则控制滑块以0.5cm/s的速度在时间设置条上沿指向初始端的方向移动(将睡眠播放时长调小),直至触及压力值小于等于预设阈值(例如0.1N)时,控制滑块停止移动,此时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。若目标位置位于滑块和末端之间,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向末端的方向移动,例如:当触及压力值为0.5N,若对应的移动速度为0.5cm/s,则控制滑块以0.5cm/s的速度在时间设置条上沿指向末端的方向移动(将睡眠播放时长调大),直至触及压力值小于等于预设阈值(例如0.1N)时,控制滑块停止移动,此时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施发明实施例,可以通过检测时间设置条上的目标位置的触及压力值的变化,快速设置睡眠播放时长。In the embodiment of the present invention, the time setting bar includes an initial end and an end. When the slider is at the initial end of the time setting bar, the duration of sleep playback is the smallest, for example: 0. When the slider is at the end of the time setting bar, sleep playback The duration is the maximum, for example: 100 minutes. When the touch pressure value is greater than the preset threshold, if the target position is between the slider and the initial end, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move at the speed corresponding to the touch pressure value on the upper edge of the time setting bar. Move in the direction of the initial end, for example: when the touch pressure value is 0.5N, if the corresponding moving speed is 0.5cm/s, then the control slider moves in the direction of the initial end on the time setting bar at a speed of 0.5cm/s ( Turn down the sleep playing time), until the pressure value is less than or equal to the preset threshold (for example, 0.1N), the control slider stops moving. At this time, the time corresponding to the position of the slider on the time setting bar is the sleep playing time. If the target position is between the slider and the end, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move in the direction of the end on the time setting bar at the movement speed corresponding to the touch pressure value, for example: when the touch pressure The value is 0.5N, if the corresponding moving speed is 0.5cm/s, then the control slider moves on the time setting bar at a speed of 0.5cm/s in the direction towards the end (increase the sleep playing time) until it reaches the pressure When the value is less than or equal to the preset threshold (for example, 0.1N), the control slider stops moving. At this time, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration. By implementing the embodiment of the invention, the duration of sleep playback can be quickly set by detecting the change of the touch pressure value of the target position on the time setting bar.
本发明实施例中,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,时间设置条包含滑块;当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长。In the embodiment of the present invention, the touch pressure value of any target position of the time setting bar displayed in the terminal device is detected in the sleep playing mode, and the time setting bar contains a slider; when the touch pressure value is greater than the preset threshold, according to the touch The corresponding relationship between the pressure value and the movement speed, the control slider moves along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value, until the touch pressure value is less than or equal to the preset threshold value, the control slider stops moving; among them, When the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration. By implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure, so that the sleep playing time can be quickly set.
请参阅图2,图2是本发明实施例公开的另一种睡眠播放时长设置方法的流程图。如图2所示,本实施例中所描述的睡眠播放时长设置方法,包括步骤:Please refer to FIG. 2 . FIG. 2 is a flow chart of another method for setting the sleep playback duration disclosed by an embodiment of the present invention. As shown in Figure 2, the sleep playing duration setting method described in this embodiment includes steps:
S201,采集输入的指纹信息。S201. Collect input fingerprint information.
本发明实施例中,可以通过终端设备中的指纹采集区采集用户输入的指纹信息,指纹信息可以包括指纹图像、指纹特征等。In the embodiment of the present invention, the fingerprint information input by the user may be collected through the fingerprint collection area in the terminal device, and the fingerprint information may include a fingerprint image, a fingerprint feature, and the like.
S202,判断指纹信息是否与预设指纹信息匹配;若是,执行步骤S203,若否,则提示指纹信息与预设指纹信息不匹配,结束本流程。S202. Determine whether the fingerprint information matches the preset fingerprint information; if yes, execute step S203; if not, prompt that the fingerprint information does not match the preset fingerprint information, and end this process.
本发明实施例中,预设指纹信息可以是预先存储在终端设备中的指纹信息,判断指纹信息是否与预设指纹信息匹配可以通过判断输入的指纹信息中的指纹图像与预设指纹信息中的指纹图像是否匹配,可以通过判断输入的指纹信息中的指纹特征与预设指纹信息中的指纹特征是否匹配,若均匹配,判断指纹信息与预设指纹信息匹配。In the embodiment of the present invention, the preset fingerprint information may be the fingerprint information pre-stored in the terminal device, and judging whether the fingerprint information matches the preset fingerprint information may be determined by judging the fingerprint image in the input fingerprint information and the fingerprint image in the preset fingerprint information. Whether the fingerprint images match can be determined by judging whether the fingerprint features in the input fingerprint information match the fingerprint features in the preset fingerprint information, and if they both match, it is judged that the fingerprint information matches the preset fingerprint information.
S203,调取与预设指纹信息对应的用户的平均入睡时长。S203, call the average sleep duration of the user corresponding to the preset fingerprint information.
本发明实施例中,当指纹信息与预设指纹信息匹配时,调取与预设指纹信息对应的用户的平均入睡时长,与预设指纹信息对应的用户的平均入睡时长可以预先存储在终端设备中,例如,终端设备中可以存储多个用户的平均入睡时长,每个用户均与一个预设指纹信息对应,当判断指纹信息与其中一个预设指纹信息匹配时,调取与该预设指纹信息对应的用户的平均入睡时长。In the embodiment of the present invention, when the fingerprint information matches the preset fingerprint information, the average sleep duration of the user corresponding to the preset fingerprint information is retrieved, and the average sleep duration of the user corresponding to the preset fingerprint information can be pre-stored in the terminal device Among them, for example, the average sleep duration of multiple users can be stored in the terminal device, and each user corresponds to a preset fingerprint information. When it is judged that the fingerprint information matches one of the preset fingerprint information, the The average sleep duration of the user corresponding to the information.
S204,判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;若判断结果为否,执行步骤S205,若判断结果为是,提示平均入睡时长当前滑块在时间设置条上的位置所对应的时长匹配,结束本流程。S204, judge whether the average sleep duration matches the duration corresponding to the position of the current slider on the time setting bar; if the judgment result is no, execute step S205, if the judgment result is yes, prompt the average sleep duration when the current slider is within the time setting match the duration corresponding to the position on the bar, and end this process.
本发明实施例中,当前滑块在时间设置条上的位置所对应的时长为当前设置的睡眠播放时长,若平均入睡时长与当前滑块在时间设置条上的位置所对应的时长不匹配,则表明当前设置的睡眠播放时长不是最佳睡眠播放时长,需要对睡眠播放时长进行设置。可选的,当平均入睡时长与当前滑块在时间设置条上的位置所对应的时长不匹配,可以输出提示信息,该提示信息用于提示用户当前设置的睡眠播放时长与用户的平均入睡时长不匹配,引导用户对睡眠播放时长进行设置。实施本发明实施例,可以根据用户的平均入睡时长对用户的睡眠播放时长进行设置,方便用户设置睡眠播放时长的大小。In the embodiment of the present invention, the duration corresponding to the position of the current slider on the time setting bar is the currently set sleep playback duration. If the average duration of falling asleep does not match the duration corresponding to the position of the current slider on the time setting bar, It indicates that the currently set sleep playback duration is not the optimal sleep playback duration, and the sleep playback duration needs to be set. Optionally, when the average sleep duration does not match the duration corresponding to the position of the current slider on the time setting bar, a prompt message can be output, which is used to prompt the user that the currently set sleep playback duration is different from the user's average sleep duration If it does not match, guide the user to set the sleep playback duration. By implementing the embodiment of the present invention, the user's sleep playback duration can be set according to the user's average sleep duration, which is convenient for the user to set the size of the sleep playback duration.
S205,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值。S205. Detect the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playing mode.
S206,当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。S206, when the touch pressure value is greater than the preset threshold, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value until the touch pressure value is less than When it is equal to the preset threshold, the control slider stops moving; wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration.
本发明实施例中的步骤S205~步骤S206可以参阅图1所示的步骤S101~步骤S102,本发明实施例不再赘述。For steps S205 to S206 in the embodiment of the present invention, reference may be made to steps S101 to S102 shown in FIG. 1 , and details will not be repeated in this embodiment of the present invention.
本发明实施例中,采集输入的指纹信息;判断指纹信息是否与预设指纹信息匹配;若是,调取与预设指纹信息对应的用户的平均入睡时长;判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;若判断结果为否,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值;当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长,同时可以根据用户的平均入睡时间对用户的睡眠播放时进行设置,方便用户设置睡眠播放时长的大小。In the embodiment of the present invention, the input fingerprint information is collected; it is judged whether the fingerprint information matches the preset fingerprint information; if so, the average sleep duration of the user corresponding to the preset fingerprint information is retrieved; and it is judged whether the average sleep duration is within the range of the current slider. The duration corresponding to the position on the time setting bar matches; if the judgment result is no, detect the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playback mode; when the touch pressure value is greater than the preset When the threshold is reached, according to the corresponding relationship between the touching pressure value and the moving speed, the control slider moves along the preset direction on the time setting bar at the moving speed corresponding to the touching pressure value, until the touching pressure value is less than or equal to the preset threshold value, the control slider Stop moving; Wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration. Implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure value, so that the duration of sleep playback can be quickly set, and at the same time, the user's sleep playback time can be set according to the user's average time to fall asleep, which is convenient The user sets the size of the sleep playback time.
请参阅图3,图3是本发明实施例公开的另一种睡眠播放时长设置方法的流程图。如图3所示,本实施例中所描述的睡眠播放时长设置方法,包括步骤:Please refer to FIG. 3 . FIG. 3 is a flow chart of another method for setting the sleep playback duration disclosed by an embodiment of the present invention. As shown in Figure 3, the sleep playing duration setting method described in this embodiment includes steps:
S301,接收穿戴设备发送的用户的预设天数中的每一天的入睡时长。S301. Receive the sleep duration of each day in the preset number of days sent by the wearable device.
本发明实施例中,穿戴设备可以为智能手环、智能手表、智能服饰等,本发明实施例不做限定。终端设备可以获取用户的预设天数中的每一天的入睡时长,终端设备接收穿戴设备发送的用户的预设天数中的每一天的入睡时长,预设天数可以为最近的10天。In the embodiment of the present invention, the wearable device may be a smart bracelet, smart watch, smart clothing, etc., which is not limited in the embodiment of the present invention. The terminal device can acquire the sleep duration of each of the user's preset days, and the terminal device receives the sleep duration of each of the user's preset days sent by the wearable device, and the preset number of days can be the latest 10 days.
S302,根据预设天数中的每一天的入睡时长计算用户的平均入睡时长。S302. Calculate the average sleep time of the user according to the sleep time of each day in the preset number of days.
本发明实施例中,当接收穿戴设备发送的用户的预设天数中的每一天的入睡时长后,根据预设天数中的每一天的入睡时长计算用户的平均入睡时长,例如,当接收穿戴设备发送的用户的最近10天中的每一天的入睡时长后,对最近10天中的每一天的入睡时长求平均值,计算用户的平均入睡时长。实施本发明实施例,用户的平均入睡时长可以通过对穿戴设备获取用户的预设天数中的每一天的入睡时长求平均值获取,可以准确获取用户的平均入睡时长,从而准确的设置睡眠播放时长。In the embodiment of the present invention, after receiving the user's sleep duration of each of the preset days sent by the wearable device, the user's average sleep duration is calculated according to the sleep duration of each of the preset days, for example, when receiving the wearable device After sending the user's sleep duration of each day in the last 10 days, average the sleep duration of each day in the last 10 days to calculate the user's average sleep duration. Implementing the embodiment of the present invention, the user's average sleep duration can be obtained by averaging the sleep duration of each of the user's preset days obtained by the wearable device, and the user's average sleep duration can be accurately obtained, thereby accurately setting the sleep playback duration .
S303,采集输入的指纹信息。S303. Collect the input fingerprint information.
S304,判断指纹信息是否与预设指纹信息匹配;若是,执行步骤S305,若否,则提示指纹信息与预设指纹信息不匹配,结束本流程。S304. Determine whether the fingerprint information matches the preset fingerprint information; if yes, execute step S305; if not, prompt that the fingerprint information does not match the preset fingerprint information, and end this process.
S305,调取与预设指纹信息对应的用户的平均入睡时长。S305. Retrieving the average sleep duration of the user corresponding to the preset fingerprint information.
S306,判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;若判断结果为否,执行步骤S307,若判断结果为是,则提示平均入睡时长与当前滑块在时间设置条上的位置所对应的时长匹配,结束本流程。S306, judge whether the average sleep duration matches the duration corresponding to the position of the current slider on the time setting bar; if the judgment result is no, execute step S307, if the judgment result is yes, then prompt the average sleep duration and the current slider within The duration corresponding to the position on the time setting bar matches, and this process ends.
S307,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值。S307. Detect the touch pressure value of any target position of the time setting bar displayed on the terminal device in the sleep playing mode.
S308,当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。S308, when the touch pressure value is greater than the preset threshold, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value until the touch pressure value is less than When it is equal to the preset threshold, the control slider stops moving; wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration.
本发明实施例中的步骤S303~步骤S308可以参阅图2所示的步骤S201~步骤S206,本发明实施例不再赘述。For steps S303 to S308 in the embodiment of the present invention, reference may be made to steps S201 to S206 shown in FIG. 2 , and details will not be repeated in this embodiment of the present invention.
本发明实施例中,接收穿戴设备发送的用户的预设天数中的每一天的入睡时长;根据预设天数中的每一天的入睡时长计算用户的平均入睡时长;采集输入的指纹信息;判断指纹信息是否与预设指纹信息匹配;若是,调取与预设指纹信息对应的用户的平均入睡时长;判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;若判断结果为否,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值;当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长,同时可以根据接收穿戴设备获取的预设天数中的每一天的入睡时长计算用户的平均入睡时间,根据用户的平均入睡时间对用户的睡眠播放时进行设置,可以方便用户准确设置睡眠播放时长的大小。In the embodiment of the present invention, the user's sleep duration of each of the preset days sent by the wearable device is received; the user's average sleep duration is calculated according to the sleep duration of each of the preset days; the input fingerprint information is collected; the fingerprint is judged Whether the information matches the preset fingerprint information; if so, retrieve the average sleep duration of the user corresponding to the preset fingerprint information; judge whether the average sleep duration matches the duration corresponding to the position of the current slider on the time setting bar; if judge If the result is no, detect the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playback mode; when the touch pressure value is greater than the preset threshold, according to the corresponding relationship between the touch pressure value and the moving speed, The control slider moves along the preset direction on the time setting bar at the moving speed corresponding to the touch pressure value, until the touch pressure value is less than or equal to the preset threshold value, the control slider stops moving; when the slider stops moving, the slider is at The duration corresponding to the position on the time setting bar is the sleep playback duration. By implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure, so that the duration of sleep playback can be quickly set, and at the same time, the sleep duration of each day in the preset number of days obtained by the receiving wearable device can be adjusted. Calculate the user's average time to fall asleep, and set the user's sleep playback time according to the user's average time to fall asleep, which can facilitate the user to accurately set the size of the sleep playback time.
请参阅图4,图4是本发明实施例公开的另一种睡眠播放时长设置方法的流程图。如图4所示,本实施例中所描述的睡眠播放时长设置方法,包括步骤:Please refer to FIG. 4 . FIG. 4 is a flow chart of another method for setting the sleep playback duration disclosed by an embodiment of the present invention. As shown in Figure 4, the sleep playing duration setting method described in this embodiment includes steps:
S401,采集输入的指纹信息。S401. Collect input fingerprint information.
S402,向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求。S402. Send a preset fingerprint information acquisition request to a specified relationship user in a social application running on the terminal device.
本发明实施例中,当采集输入的指纹信息之后,向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求,社交应用可以为微信、QQ、有信、易信等,指定关系用户可以是输入指纹信息的用户。举例来说,当用户A使用用户B的终端设备时,若用户A需要对用户B的终端设备中的睡眠播放时长进行调节时,用户A触摸用户B的终端设备的屏幕的预设区域,用户B的终端设备检测终端设备的屏幕的预设区域的触及压力值,输出提示信息,提示信息提示输入指纹信息,用户A输入指纹信息,终端设备向终端设备正在运行的社交应用中的指定关系用户(用户A)发送预设指纹信息获取请求,用户A输入预设指纹信息,即可以及时验证成功,若用户A不是用户B的好友,则用户A无法对用户B的终端设备进行操作。实施本发明实施例,可以提高终端设备的安全性,防止陌生用户操作。In the embodiment of the present invention, after the input fingerprint information is collected, a preset fingerprint information acquisition request is sent to a specified relationship user in a social application running on the terminal device. The social application can be WeChat, QQ, Youxin, Yixin, etc. The designated relational user may be a user who inputs fingerprint information. For example, when user A uses user B's terminal device, if user A needs to adjust the sleep playback duration in user B's terminal device, user A touches a preset area of the screen of user B's terminal device, and user A The terminal device of B detects the touch pressure value of the preset area of the screen of the terminal device, outputs prompt information, and the prompt information prompts to input fingerprint information, user A inputs the fingerprint information, and the terminal device sends the specified relationship user in the social application running on the terminal device (User A) sends a request for acquiring preset fingerprint information. User A enters the preset fingerprint information, and the verification is successful in time. If user A is not a friend of user B, user A cannot operate user B's terminal device. By implementing the embodiment of the present invention, the security of the terminal device can be improved, and operations by unfamiliar users can be prevented.
S403,接收指定关系用户发送的预设指纹信息。S403. Receive preset fingerprint information sent by a specified relationship user.
本发明实施例中,向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求之后,指定关系用户的社交应用输出提示信息提示指定关系用户输入指纹信息,并将该指定关系用户输入指纹信息发送给终端设备,以使终端设备接收指定关系用户发送的预设指纹信息。实施本发明实施例,可以通过正在运行的社交应用快速获取预设指纹信息,避免了预设指纹信息存储在终端设备中容易被泄露的风险,提高了终端设备的安全性。In the embodiment of the present invention, after sending a preset fingerprint information acquisition request to a user with a specified relationship in a social application running on a terminal device, the social application of the user with the specified relationship outputs prompt information to prompt the user with the specified relationship to input fingerprint information, and the specified relationship user The fingerprint information input by the user is sent to the terminal device, so that the terminal device receives the preset fingerprint information sent by the specified relationship user. By implementing the embodiment of the present invention, the preset fingerprint information can be quickly obtained through the running social application, avoiding the risk that the preset fingerprint information is easily leaked when stored in the terminal device, and improving the security of the terminal device.
S404,判断指纹信息是否与预设指纹信息匹配;若是,执行步骤S405,若否,则提示指纹信息与预设指纹信息不匹配,结束本流程。S404. Determine whether the fingerprint information matches the preset fingerprint information; if yes, execute step S405; if not, prompt that the fingerprint information does not match the preset fingerprint information, and end this process.
S405,调取与预设指纹信息对应的用户的平均入睡时长。S405. Retrieving the average sleep duration of the user corresponding to the preset fingerprint information.
S406,判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;若判断结果为否,执行步骤S407,若判断结果为是,则提示平均入睡时长与当前滑块在时间设置条上的位置所对应的时长匹配,结束本流程。S406, judging whether the average duration of falling asleep matches the duration corresponding to the position of the current slider on the time setting bar; if the judgment result is no, execute step S407, if the judgment result is yes, it will prompt that the average duration of falling asleep is in the same position as the current slider. The duration corresponding to the position on the time setting bar matches, and this process ends.
S407,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值。S407. Detect the touch pressure value of any target position of the time setting bar displayed on the terminal device in the sleep playing mode.
S408,当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。S408, when the touch pressure value is greater than the preset threshold, according to the corresponding relationship between the touch pressure value and the movement speed, control the slider to move along the preset direction on the time setting bar at the movement speed corresponding to the touch pressure value until the touch pressure value is less than When it is equal to the preset threshold, the control slider stops moving; wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration.
本发明实施例中的步骤S401可以参阅图2所示的步骤S201,步骤S404~步骤S408可以参阅图2所示的步骤S202~步骤S206,本发明实施例不再赘述。For step S401 in the embodiment of the present invention, reference may be made to step S201 shown in FIG. 2 . For steps S404 to S408, reference may be made to steps S202 to S206 shown in FIG. 2 , which will not be repeated in this embodiment of the present invention.
本发明实施例中,采集输入的指纹信息;向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求;接收指定关系用户发送的预设指纹信息;判断指纹信息是否与预设指纹信息匹配;若是,调取与预设指纹信息对应的用户的平均入睡时长;判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;若判断结果为否,检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值;当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长,同时可以提高终端设备的安全性,防止陌生用户操作。In the embodiment of the present invention, the input fingerprint information is collected; the preset fingerprint information acquisition request is sent to the specified relationship user in the running social application of the terminal device; the preset fingerprint information sent by the specified relationship user is received; it is judged whether the fingerprint information is consistent with the preset fingerprint information. Set the fingerprint information to match; if so, retrieve the average sleep duration of the user corresponding to the preset fingerprint information; determine whether the average sleep duration matches the duration corresponding to the position of the current slider on the time setting bar; if the judgment result is no, Detect the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playback mode; when the touch pressure value is greater than the preset threshold, according to the corresponding relationship between the touch pressure value and the moving speed, control the slider to The movement speed corresponding to the touch pressure value moves along the preset direction on the time setting bar until the touch pressure value is less than or equal to the preset threshold value, and the control slider stops moving; when the slider stops moving, the slider is on the time setting bar The corresponding duration of the position is the sleep playback duration. By implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure, so that the duration of sleep playback can be quickly set, and at the same time, the security of the terminal device can be improved to prevent unfamiliar users from operating.
请参阅图5,图5是本发明实施例公开的一种终端设备的结构示意图。如图5所示,本实施例中所描述的终端设备,包括检测单元501和控制单元502,其中:Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of a terminal device disclosed in an embodiment of the present invention. As shown in FIG. 5, the terminal device described in this embodiment includes a detection unit 501 and a control unit 502, wherein:
检测单元501,用于检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,时间设置条包含滑块。The detection unit 501 is configured to detect a touch pressure value for any target position of a time setting bar displayed on the terminal device in the sleep playing mode, and the time setting bar includes a slider.
本发明实施例中,检测单元501可以通过终端设备的屏幕中的压力传感器检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,可以实时检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,可以在终端设备中的音乐播放器中配置睡眠播放模式,开启睡眠播放模式后,终端设备可以在睡眠播放时长内播放音乐以帮助用户在音乐的陪伴下快速入睡。时间设置条为睡眠播放模式下设置睡眠播放时长的时间条,时间设置条上包含滑块,可以通过改变时间设置条上的滑块位置设置睡眠播放时长,时间设置条的任一目标位置可以是时间设置条上的任一目标位置,目标位置可以位于时间设置条的两端,也可以位于时间设置条的中间的任一位置。例如,如图9所示,在睡眠播放模式下,当用户按压时间设置条上的位置a(位置a为任一目标位置)时,检测位置a的触及压力值。In the embodiment of the present invention, the detection unit 501 can detect the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playback mode through the pressure sensor in the screen of the terminal device, and can detect in real time when playing in sleep mode. In this mode, the touch pressure value of any target position of the bar is set for the time displayed on the terminal device. The sleep playback mode can be configured in the music player of the terminal device. After the sleep playback mode is turned on, the terminal device can play within the sleep playback time Play music to help users fall asleep quickly accompanied by music. The time setting bar is the time bar for setting the length of sleep playback in the sleep playback mode. The time setting bar contains a slider. You can set the sleep playback time by changing the position of the slider on the time setting bar. Any target position of the time setting bar can be Any target position on the time setting bar, the target position can be located at both ends of the time setting bar, or at any position in the middle of the time setting bar. For example, as shown in FIG. 9 , in the sleep playing mode, when the user presses position a on the time setting bar (position a is any target position), the touch pressure value of position a is detected.
控制单元502,用于当触及压力值大于预设阈值时,根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。The control unit 502 is configured to control the slider to move along the preset direction on the time setting bar at the moving speed corresponding to the touching pressure value according to the corresponding relationship between the touching pressure value and the moving speed when the touching pressure value is greater than the preset threshold value until When the touch pressure value is less than or equal to the preset threshold, the control slider stops moving; wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration.
本发明实施例中,预设阈值可以根据系统进行设定,也可以由用户进行设定,触及压力值与移动速度的对应关系可以是:随着触及压力值的增大,移动速度增大,例如:若时间设置条在终端设备屏幕中的长度为5cm,预设阈值为0.1N,当触及压力值为0.2N时,对应的移动速度为0.2cm/s;当触及压力值为0.3N时,对应的移动速度为0.3cm/s;当触及压力值为0.4N时,对应的移动速度为0.4cm/s;当触及压力值为0.5N时,对应的移动速度为0.5cm/s。预设方向可以为指向目标位置的方向,也可以为远离目标位置的方向。当检测到触及压力值小于等于预设阈值时,控制单元502控制滑块停止移动,此时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。In the embodiment of the present invention, the preset threshold can be set according to the system, or can be set by the user. The corresponding relationship between the touch pressure value and the movement speed can be: as the touch pressure value increases, the movement speed increases, For example: if the length of the time setting bar on the screen of the terminal device is 5cm, and the preset threshold is 0.1N, when the touch pressure value is 0.2N, the corresponding moving speed is 0.2cm/s; when the touch pressure value is 0.3N , the corresponding moving speed is 0.3cm/s; when the touching pressure value is 0.4N, the corresponding moving speed is 0.4cm/s; when the touching pressure value is 0.5N, the corresponding moving speed is 0.5cm/s. The preset direction may be a direction pointing to the target position, or a direction away from the target position. When it is detected that the touch pressure value is less than or equal to the preset threshold, the control unit 502 controls the slider to stop moving, and at this time, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration.
可选的,时间设置条包括初始端和末端,当触及压力值大于预设阈值时,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动的方式具体为:Optionally, the time setting bar includes an initial end and an end. When the touching pressure value is greater than a preset threshold, the control unit 502 controls the slider to move at the moving speed corresponding to the touching pressure value in time according to the corresponding relationship between the touching pressure value and the moving speed. The way to move along the preset direction on the setting bar is as follows:
当触及压力值大于预设阈值时,若目标位置位于滑块和初始端之间,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向初始端的方向移动;When the touch pressure value is greater than the preset threshold, if the target position is between the slider and the initial end, the control unit 502 controls the slider to set the moving speed corresponding to the touch pressure value at the time according to the corresponding relationship between the touch pressure value and the movement speed. Move along the direction pointing to the initial end on the bar;
或者,or,
当触及压力值大于预设阈值时,若目标位置位于滑块和末端之间,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向末端的方向移动。When the touch pressure value is greater than the preset threshold, if the target position is between the slider and the end, the control unit 502 controls the slider to set the time bar at the moving speed corresponding to the touch pressure value according to the corresponding relationship between the touch pressure value and the moving speed. Move up in the direction towards the end.
本发明实施例中,时间设置条包括初始端和末端,当滑块位于时间设置条的初始端时,睡眠播放时长最小,例如:为0,当滑块位于时间设置条的末端时,睡眠播放时长为最大,例如:为100分钟。当触及压力值大于预设阈值时,若目标位置位于滑块和初始端之间,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向初始端的方向移动,例如:当触及压力值为0.5N,若对应的移动速度为0.5cm/s,则控制滑块以0.5cm/s的速度在时间设置条上沿指向初始端的方向移动(将睡眠播放时长调小),直至触及压力值小于等于预设阈值(例如0.1N)时,控制滑块停止移动,此时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。若目标位置位于滑块和末端之间,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿指向末端的方向移动,例如:当触及压力值为0.5N,若对应的移动速度为0.5cm/s,则控制滑块以0.5cm/s的速度在时间设置条上沿指向末端的方向移动(将睡眠播放时长调大),直至触及压力值小于等于预设阈值(例如0.1N)时,控制滑块停止移动,此时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施发明实施例,可以通过检测时间设置条上的目标位置的触及压力值的变化,快速设置睡眠播放时长。In the embodiment of the present invention, the time setting bar includes an initial end and an end. When the slider is at the initial end of the time setting bar, the duration of sleep playback is the smallest, for example: 0. When the slider is at the end of the time setting bar, sleep playback The duration is the maximum, for example: 100 minutes. When the touch pressure value is greater than the preset threshold, if the target position is between the slider and the initial end, the control unit 502 controls the slider to set the moving speed corresponding to the touch pressure value at the time according to the corresponding relationship between the touch pressure value and the movement speed. Move along the direction pointing to the initial end on the bar, for example: when the touch pressure value is 0.5N, if the corresponding moving speed is 0.5cm/s, then control the slider to move at the speed of 0.5cm/s on the time setting bar along the direction pointing to the initial end Move in the direction (reduce the duration of sleep playback) until the pressure value is less than or equal to the preset threshold (for example, 0.1N), the control slider stops moving. At this time, the duration corresponding to the position of the slider on the time setting bar is sleep Playing time. If the target position is between the slider and the end, the control unit 502 controls the slider to move in the direction of the end on the time setting bar at the movement speed corresponding to the touch pressure value according to the corresponding relationship between the touch pressure value and the movement speed, for example: When the touch pressure value is 0.5N, if the corresponding moving speed is 0.5cm/s, then the control slider moves on the time setting bar at a speed of 0.5cm/s in the direction toward the end (increase the sleep playing time), When the pressure value is less than or equal to the preset threshold (for example, 0.1N), the control slider stops moving. At this time, the time corresponding to the position of the slider on the time setting bar is the sleep playing time. By implementing the embodiment of the invention, the duration of sleep playback can be quickly set by detecting the change of the touch pressure value of the target position on the time setting bar.
本发明实施例中,检测单元501检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值,时间设置条包含滑块;当触及压力值大于预设阈值时,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长。In the embodiment of the present invention, the detection unit 501 detects the touch pressure value for any target position of the time setting bar displayed in the terminal device in the sleep playback mode, and the time setting bar contains a slider; when the touch pressure value is greater than the preset threshold , the control unit 502 controls the slider to move along the preset direction on the time setting bar at the moving speed corresponding to the touching pressure value according to the corresponding relationship between the touching pressure value and the moving speed, until the touching pressure value is less than or equal to the preset threshold value, the control slider The block stops moving; wherein, when the slider stops moving, the duration corresponding to the position of the slider on the time setting bar is the sleep playback duration. By implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure, so that the sleep playing time can be quickly set.
请参阅图6,图6是本发明实施例公开的另一种终端设备的结构示意图。如图6所示,本实施例中所描述的终端设备,除了包括图5所示的检测单元501和控制单元502之外,还包括采集单元503、第一判断单元504、调取单元505和第二判断单元506,其中:Please refer to FIG. 6 . FIG. 6 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention. As shown in FIG. 6, the terminal device described in this embodiment, in addition to the detection unit 501 and the control unit 502 shown in FIG. The second judging unit 506, wherein:
采集单元503,用于采集输入的指纹信息。The collection unit 503 is configured to collect the input fingerprint information.
本发明实施例中,采集单元503可以通过终端设备中的指纹采集区采集用户输入的指纹信息,指纹信息可以包括指纹图像、指纹特征等。In the embodiment of the present invention, the collection unit 503 can collect the fingerprint information input by the user through the fingerprint collection area in the terminal device, and the fingerprint information can include a fingerprint image, a fingerprint feature, and the like.
第一判断单元504,用于判断指纹信息是否与预设指纹信息匹配。The first judging unit 504 is configured to judge whether the fingerprint information matches the preset fingerprint information.
本发明实施例中,预设指纹信息可以是预先存储在终端设备中的指纹信息,第一判断单元504判断指纹信息是否与预设指纹信息匹配可以通过判断输入的指纹信息中的指纹图像与预设指纹信息中的指纹图像是否匹配,可以通过判断输入的指纹信息中的指纹特征与预设指纹信息中的指纹特征是否匹配,若均匹配,判断指纹信息与预设指纹信息匹配。In the embodiment of the present invention, the preset fingerprint information may be the fingerprint information pre-stored in the terminal device, and the first judging unit 504 judges whether the fingerprint information matches the preset fingerprint information by judging whether the fingerprint image in the input fingerprint information matches the preset fingerprint information. Whether the fingerprint images in the fingerprint information match can be determined by judging whether the fingerprint features in the input fingerprint information match the fingerprint features in the preset fingerprint information, and if they both match, it is judged that the fingerprint information matches the preset fingerprint information.
调取单元505,用于当第一判断单元504判断结果为是时,调取与预设指纹信息对应的用户的平均入睡时长。The calling unit 505 is configured to call the average sleep duration of the user corresponding to the preset fingerprint information when the judgment result of the first judging unit 504 is yes.
本发明实施例中,当指纹信息与预设指纹信息匹配时,调取单元505调取与预设指纹信息对应的用户的平均入睡时长,与预设指纹信息对应的用户的平均入睡时长可以预先存储在终端设备中,例如,终端设备中可以存储多个用户的平均入睡时长,每个用户均与一个预设指纹信息对应,当判断指纹信息与其中一个预设指纹信息匹配时,调取与该预设指纹信息对应的用户的平均入睡时长。In the embodiment of the present invention, when the fingerprint information matches the preset fingerprint information, the retrieval unit 505 retrieves the average sleep duration of the user corresponding to the preset fingerprint information, and the average sleep duration of the user corresponding to the preset fingerprint information can be preset Stored in the terminal device, for example, the average sleep time of multiple users can be stored in the terminal device, and each user corresponds to a preset fingerprint information. When it is judged that the fingerprint information matches one of the preset fingerprint information, the The average sleep duration of the user corresponding to the preset fingerprint information.
第二判断单元506,用于判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配。The second judging unit 506 is configured to judge whether the average duration of falling asleep matches the duration corresponding to the position of the current slider on the time setting bar.
其中,当第二判断单元506判断结果为否时,触发检测单元501检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值。Wherein, when the judgment result of the second judging unit 506 is no, the trigger detection unit 501 detects the touch pressure value of any target position of the time setting bar displayed on the terminal device in the sleep playing mode.
本发明实施例中,当前滑块在时间设置条上的位置所对应的时长为当前设置的睡眠播放时长,若平均入睡时长与当前滑块在时间设置条上的位置所对应的时长不匹配,则表明当前设置的睡眠播放时长不是最佳睡眠播放时长,需要对睡眠播放时长进行设置。可选的,当第二判断单元506判断平均入睡时长与当前滑块在时间设置条上的位置所对应的时长不匹配时,可以输出提示信息,该提示信息用于提示用户当前设置的睡眠播放时长与用户的平均入睡时长不匹配,引导用户对睡眠播放时长进行设置。实施本发明实施例,可以根据用户的平均入睡时长对用户的睡眠播放时长进行设置,方便用户设置睡眠播放时长的大小。In the embodiment of the present invention, the duration corresponding to the position of the current slider on the time setting bar is the currently set sleep playback duration. If the average duration of falling asleep does not match the duration corresponding to the position of the current slider on the time setting bar, It indicates that the currently set sleep playback duration is not the optimal sleep playback duration, and the sleep playback duration needs to be set. Optionally, when the second judging unit 506 judges that the average duration of falling asleep does not match the duration corresponding to the position of the current slider on the time setting bar, it may output prompt information, which is used to remind the user of the sleep playback currently set. The duration does not match the user's average sleep duration, and the user is guided to set the sleep playback duration. By implementing the embodiment of the present invention, the user's sleep playback duration can be set according to the user's average sleep duration, which is convenient for the user to set the size of the sleep playback duration.
本发明实施例中,采集单元503采集输入的指纹信息;第一判断单元504判断指纹信息是否与预设指纹信息匹配;当第一判断单元504判断结果为是时,调取单元505调取与预设指纹信息对应的用户的平均入睡时长;第二判断单元506判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;当第二判断单元506判断结果为否时,检测单元501检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值;当触及压力值大于预设阈值时,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长,同时可以根据用户的平均入睡时间对用户的睡眠播放时进行设置,方便用户设置睡眠播放时长的大小。In the embodiment of the present invention, the collection unit 503 collects the input fingerprint information; the first judging unit 504 judges whether the fingerprint information matches the preset fingerprint information; The average duration of falling asleep of the user corresponding to the preset fingerprint information; the second judgment unit 506 judges whether the average duration of falling asleep matches the duration corresponding to the position of the current slider on the time setting bar; when the judgment result of the second judgment unit 506 is no , the detection unit 501 detects the touch pressure value of any target position of the time setting bar displayed in the terminal device in the sleep playback mode; when the touch pressure value is greater than a preset threshold, the control unit 502 controls the Corresponding relationship, the control slider moves along the preset direction on the time setting bar at the moving speed corresponding to the touch pressure value, until the touch pressure value is less than or equal to the preset threshold value, the control slider stops moving; wherein, when the slider stops moving, The duration corresponding to the position of the slider on the time setting bar is the sleep playback duration. Implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure value, so that the duration of sleep playback can be quickly set, and at the same time, the user's sleep playback time can be set according to the user's average time to fall asleep, which is convenient The user sets the size of the sleep playback time.
请参阅图7,图7是本发明实施例公开的另一种终端设备的结构示意图。如图7所示,本实施例中所描述的终端设备,除了包括图6所示的检测单元501、控制单元502、采集单元503、第一判断单元504、调取单元505和第二判断单元506之外,还包括第一接收单元507和计算单元508,其中:Please refer to FIG. 7. FIG. 7 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention. As shown in Figure 7, the terminal device described in this embodiment, in addition to including the detection unit 501, the control unit 502, the acquisition unit 503, the first judgment unit 504, the calling unit 505 and the second judgment unit shown in Figure 6 In addition to 506, it also includes a first receiving unit 507 and a computing unit 508, wherein:
第一接收单元507,用于接收穿戴设备发送的用户的预设天数中的每一天的入睡时长。The first receiving unit 507 is configured to receive the sleep duration of each of the preset days of the user sent by the wearable device.
本发明实施例中,穿戴设备可以为智能手环、智能手表、智能服饰等,本发明实施例不做限定。第一接收单元507可以获取用户的预设天数中的每一天的入睡时长,终端设备接收穿戴设备发送的用户的预设天数中的每一天的入睡时长,预设天数可以为最近的10天。In the embodiment of the present invention, the wearable device may be a smart bracelet, smart watch, smart clothing, etc., which is not limited in the embodiment of the present invention. The first receiving unit 507 may obtain the sleep duration of each of the user's preset days, and the terminal device receives the sleep duration of each of the user's preset days sent by the wearable device, and the preset number of days may be the latest 10 days.
计算单元508,用于根据预设天数中的每一天的入睡时长计算用户的平均入睡时长。The calculation unit 508 is configured to calculate the average sleep duration of the user according to the sleep duration of each of the preset days.
本发明实施例中,当第一接收单元507接收穿戴设备发送的用户的预设天数中的每一天的入睡时长后,计算单元508根据预设天数中的每一天的入睡时长计算用户的平均入睡时长,例如,当第一接收单元507接收穿戴设备发送的用户的最近10天中的每一天的入睡时长后,对最近10天中的每一天的入睡时长求平均值,计算单元508计算用户的平均入睡时长。实施本发明实施例,用户的平均入睡时长可以通过对穿戴设备获取用户的预设天数中的每一天的入睡时长求平均值获取,可以准确获取用户的平均入睡时长,从而准确的设置睡眠播放时长。In the embodiment of the present invention, after the first receiving unit 507 receives the sleep duration of each of the user's preset days sent by the wearable device, the calculation unit 508 calculates the user's average sleep duration according to the sleep duration of each of the preset days. Duration, for example, after the first receiving unit 507 receives the sleep duration of each day in the last 10 days sent by the wearable device, average the sleep duration of each day in the last 10 days, and the calculation unit 508 calculates the user's sleep duration Average sleep time. Implementing the embodiment of the present invention, the user's average sleep duration can be obtained by averaging the sleep duration of each of the user's preset days obtained by the wearable device, and the user's average sleep duration can be accurately obtained, thereby accurately setting the sleep playback duration .
本发明实施例中,第一接收单元507接收穿戴设备发送的用户的预设天数中的每一天的入睡时长;计算单元508根据预设天数中的每一天的入睡时长计算用户的平均入睡时长;采集单元503采集输入的指纹信息;第一判断单元504判断指纹信息是否与预设指纹信息匹配;当第一判断单元504判断结果为是时,调取单元505调取与预设指纹信息对应的用户的平均入睡时长;第二判断单元506判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;当第二判断单元506判断结果为否时,检测单元501检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值;当触及压力值大于预设阈值时,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长,同时可以根据接收穿戴设备获取的预设天数中的每一天的入睡时长计算用户的平均入睡时间,根据用户的平均入睡时间对用户的睡眠播放时进行设置,可以方便用户准确设置睡眠播放时长的大小。In the embodiment of the present invention, the first receiving unit 507 receives the sleep duration of each of the user's preset days sent by the wearable device; the calculation unit 508 calculates the user's average sleep duration according to the sleep duration of each of the preset days; The collection unit 503 collects the input fingerprint information; the first judgment unit 504 judges whether the fingerprint information matches the preset fingerprint information; when the judgment result of the first judgment unit 504 is yes, the calling unit 505 calls the corresponding The average duration of falling asleep of the user; the second judgment unit 506 judges whether the average duration of falling asleep matches the duration corresponding to the position of the current slider on the time setting bar; In the sleep playing mode, the touch pressure value of any target position of the bar is set for the time displayed in the terminal device; when the touch pressure value is greater than the preset threshold, the control unit 502 controls the slider according to the corresponding relationship between the touch pressure value and the moving speed Move along the preset direction on the time setting bar at the moving speed corresponding to the touch pressure value, until the touch pressure value is less than or equal to the preset threshold, the control slider stops moving; when the slider stops moving, the slider stops moving on the time setting bar The duration corresponding to the position above is the sleep playback duration. By implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure, so that the duration of sleep playback can be quickly set, and at the same time, the sleep duration of each day in the preset number of days obtained by the receiving wearable device can be adjusted. Calculate the user's average time to fall asleep, and set the user's sleep playback time according to the user's average time to fall asleep, which can facilitate the user to accurately set the size of the sleep playback time.
请参阅图8,图8是本发明实施例公开的另一种终端设备的结构示意图。如图8所示,本实施例中所描述的终端设备,除了包括图6所示的检测单元501、控制单元502、采集单元503、第一判断单元504、调取单元505和第二判断单元506之外,还包括发送单元509和第二接收单元510,其中:Please refer to FIG. 8 . FIG. 8 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention. As shown in Figure 8, the terminal device described in this embodiment, in addition to including the detection unit 501, the control unit 502, the collection unit 503, the first judgment unit 504, the calling unit 505 and the second judgment unit shown in Figure 6 In addition to 506, it also includes a sending unit 509 and a second receiving unit 510, wherein:
发送单元509,用于向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求。The sending unit 509 is configured to send a request for acquiring preset fingerprint information to a specified relationship user in a social application running on the terminal device.
本发明实施例中,当采集单元503采集输入的指纹信息之后,发送单元509向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求,社交应用可以为微信、QQ、有信、易信等,指定关系用户可以是输入指纹信息的用户。举例来说,当用户A使用用户B的终端设备时,若用户A需要对用户B的终端设备中的睡眠播放时长进行调节时,用户A触摸用户B的终端设备的屏幕的预设区域,用户B的终端设备检测终端设备的屏幕的预设区域的触及压力值,输出提示信息,提示信息提示输入指纹信息,用户A输入指纹信息,终端设备向终端设备正在运行的社交应用中的指定关系用户(用户A)发送预设指纹信息获取请求,用户A输入预设指纹信息,即可以及时验证成功,若用户A不是用户B的好友,则用户A无法对用户B的终端设备进行操作。实施本发明实施例,可以提高终端设备的安全性,防止陌生用户操作。In the embodiment of the present invention, after the collection unit 503 collects the input fingerprint information, the sending unit 509 sends a preset fingerprint information acquisition request to a user with a specified relationship in a social application running on the terminal device. The social application can be WeChat, QQ, letter, Yixin, etc., the specified relationship user can be the user who input fingerprint information. For example, when user A uses user B's terminal device, if user A needs to adjust the sleep playback duration in user B's terminal device, user A touches a preset area of the screen of user B's terminal device, and user A The terminal device of B detects the touch pressure value of the preset area of the screen of the terminal device, outputs prompt information, and the prompt information prompts to input fingerprint information, user A inputs the fingerprint information, and the terminal device sends the specified relationship user in the social application running on the terminal device (User A) sends a request for acquiring preset fingerprint information. User A enters the preset fingerprint information, and the verification is successful in time. If user A is not a friend of user B, user A cannot operate user B's terminal device. By implementing the embodiment of the present invention, the security of the terminal device can be improved, and operations by unfamiliar users can be prevented.
第二接收单元510,用于接收指定关系用户发送的预设指纹信息。The second receiving unit 510 is configured to receive the preset fingerprint information sent by the specified relationship user.
本发明实施例中,发送单元509向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求之后,指定关系用户的社交应用输出提示信息提示指定关系用户输入指纹信息,并将该指定关系用户输入指纹信息发送给终端设备,第二接收单元510接收指定关系用户发送的预设指纹信息。实施本发明实施例,可以通过正在运行的社交应用快速获取预设指纹信息,避免了预设指纹信息存储在终端设备中容易被泄露的风险,提高了终端设备的安全性。In the embodiment of the present invention, after the sending unit 509 sends the preset fingerprint information acquisition request to the designated relationship user in the running social application of the terminal device, the social application of the designated relationship user outputs prompt information to prompt the designated relationship user to input fingerprint information, and The fingerprint information input by the specified relationship user is sent to the terminal device, and the second receiving unit 510 receives the preset fingerprint information sent by the specified relationship user. By implementing the embodiment of the present invention, the preset fingerprint information can be quickly obtained through the running social application, avoiding the risk that the preset fingerprint information is easily leaked when stored in the terminal device, and improving the security of the terminal device.
本发明实施例中,采集单元503采集输入的指纹信息;发送单元509向终端设备正在运行的社交应用中的指定关系用户发送预设指纹信息获取请求;第二接收单元510接收指定关系用户发送的预设指纹信息;第一判断单元504判断指纹信息是否与预设指纹信息匹配;当第一判断单元504判断结果为是时,调取单元505调取与预设指纹信息对应的用户的平均入睡时长;第二判断单元506判断平均入睡时长是否与当前滑块在时间设置条上的位置所对应的时长匹配;当第二判断单元506判断结果为否时,检测单元501检测在睡眠播放模式下针对终端设备中显示的时间设置条的任一目标位置的触及压力值;当触及压力值大于预设阈值时,控制单元502根据触及压力值与移动速度的对应关系,控制滑块以触及压力值对应的移动速度在时间设置条上沿预设方向移动,直至触及压力值小于等于预设阈值时,控制滑块停止移动;其中,滑块停止移动时,滑块在时间设置条上的位置对应的时长为睡眠播放时长。实施本发明实施例,可以通过检测触及压力值的大小调整时间设置条上滑块的位置,从而可以快速设置睡眠播放时长,同时可以提高终端设备的安全性,防止陌生用户操作。In the embodiment of the present invention, the collection unit 503 collects the input fingerprint information; the sending unit 509 sends a preset fingerprint information acquisition request to the user with a specified relationship in the running social application of the terminal device; the second receiving unit 510 receives the request sent by the user with a specified relationship. Preset fingerprint information; the first judging unit 504 judges whether the fingerprint information matches the preset fingerprint information; when the judgment result of the first judging unit 504 is yes, the calling unit 505 calls the average sleeping time of the user corresponding to the preset fingerprint information Duration; the second judging unit 506 judges whether the average duration of falling asleep matches the corresponding duration of the position of the current slider on the time setting bar; Set the touch pressure value of any target position of the bar for the time displayed in the terminal device; when the touch pressure value is greater than the preset threshold, the control unit 502 controls the slider to touch the pressure value according to the corresponding relationship between the touch pressure value and the moving speed The corresponding moving speed moves along the preset direction on the time setting bar until the touch pressure value is less than or equal to the preset threshold, and the control slider stops moving; when the slider stops moving, the position of the slider on the time setting bar corresponds to The duration of is the sleep playback duration. By implementing the embodiment of the present invention, the position of the slider on the time setting bar can be adjusted by detecting the value of the touch pressure, so that the duration of sleep playback can be quickly set, and at the same time, the security of the terminal device can be improved to prevent unfamiliar users from operating.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-OnlyMemory,ROM)、随机存取器(RandomAccessMemory,RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Flash disk, read-only memory (Read-OnlyMemory, ROM), random access device (RandomAccessMemory, RAM), magnetic disk or optical disk, etc.
以上对本发明实施例所提供的一种睡眠播放时长设置方法及终端设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction to a sleep playback duration setting method and terminal equipment provided by the embodiment of the present invention. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiment is only for helping Understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification is not It should be understood as a limitation of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510535005.9A CN105045492B (en) | 2015-08-27 | 2015-08-27 | A kind of sleep playing duration setting method and terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510535005.9A CN105045492B (en) | 2015-08-27 | 2015-08-27 | A kind of sleep playing duration setting method and terminal device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105045492A true CN105045492A (en) | 2015-11-11 |
CN105045492B CN105045492B (en) | 2018-05-29 |
Family
ID=54452068
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510535005.9A Expired - Fee Related CN105045492B (en) | 2015-08-27 | 2015-08-27 | A kind of sleep playing duration setting method and terminal device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105045492B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107656652A (en) * | 2017-10-26 | 2018-02-02 | 沈阳中科创达软件有限公司 | Speed compensation method, device, computer equipment and the storage medium of slide |
CN110244888A (en) * | 2019-06-11 | 2019-09-17 | 惠州Tcl移动通信有限公司 | A kind of setting method of behavior pattern, device, storage medium and terminal |
WO2019228026A1 (en) * | 2018-05-29 | 2019-12-05 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Information display method, apparatus and mobile terminal |
CN115002551A (en) * | 2022-05-31 | 2022-09-02 | 深圳市艾酷通信软件有限公司 | Video playback method, device, electronic device and medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102449593A (en) * | 2010-01-22 | 2012-05-09 | 电子部品研究院 | Method for providing a user interface based on touch pressure, and electronic device using same |
US20120274591A1 (en) * | 2004-12-21 | 2012-11-01 | Microsoft Corporation | Pressure sensitive controls |
CN102812422A (en) * | 2010-03-18 | 2012-12-05 | 京瓷株式会社 | Electronic equipment |
CN103440097A (en) * | 2013-07-29 | 2013-12-11 | 康佳集团股份有限公司 | Method and terminal for controlling touch pad cursor to slide on the basis of pressure |
CN104020936A (en) * | 2013-03-01 | 2014-09-03 | 北京三星通信技术研究有限公司 | Terminal and controlling method thereof |
CN104471521A (en) * | 2012-05-09 | 2015-03-25 | 苹果公司 | Device, method, and graphical user interface for providing feedback for changing activation states of a user interface object |
CN104575554A (en) * | 2014-12-19 | 2015-04-29 | 广东欧珀移动通信有限公司 | A method and terminal for controlling the playback progress of multimedia data |
CN104714741A (en) * | 2013-12-11 | 2015-06-17 | 北京三星通信技术研究有限公司 | Method and device for touch operation |
CN104765543A (en) * | 2015-04-17 | 2015-07-08 | 努比亚技术有限公司 | Audio playing parameter adjustment method and device |
-
2015
- 2015-08-27 CN CN201510535005.9A patent/CN105045492B/en not_active Expired - Fee Related
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120274591A1 (en) * | 2004-12-21 | 2012-11-01 | Microsoft Corporation | Pressure sensitive controls |
CN102449593A (en) * | 2010-01-22 | 2012-05-09 | 电子部品研究院 | Method for providing a user interface based on touch pressure, and electronic device using same |
CN102812422A (en) * | 2010-03-18 | 2012-12-05 | 京瓷株式会社 | Electronic equipment |
CN104471521A (en) * | 2012-05-09 | 2015-03-25 | 苹果公司 | Device, method, and graphical user interface for providing feedback for changing activation states of a user interface object |
CN104020936A (en) * | 2013-03-01 | 2014-09-03 | 北京三星通信技术研究有限公司 | Terminal and controlling method thereof |
CN103440097A (en) * | 2013-07-29 | 2013-12-11 | 康佳集团股份有限公司 | Method and terminal for controlling touch pad cursor to slide on the basis of pressure |
CN104714741A (en) * | 2013-12-11 | 2015-06-17 | 北京三星通信技术研究有限公司 | Method and device for touch operation |
CN104575554A (en) * | 2014-12-19 | 2015-04-29 | 广东欧珀移动通信有限公司 | A method and terminal for controlling the playback progress of multimedia data |
CN104765543A (en) * | 2015-04-17 | 2015-07-08 | 努比亚技术有限公司 | Audio playing parameter adjustment method and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107656652A (en) * | 2017-10-26 | 2018-02-02 | 沈阳中科创达软件有限公司 | Speed compensation method, device, computer equipment and the storage medium of slide |
WO2019228026A1 (en) * | 2018-05-29 | 2019-12-05 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Information display method, apparatus and mobile terminal |
US10963121B2 (en) | 2018-05-29 | 2021-03-30 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Information display method, apparatus and mobile terminal |
CN110244888A (en) * | 2019-06-11 | 2019-09-17 | 惠州Tcl移动通信有限公司 | A kind of setting method of behavior pattern, device, storage medium and terminal |
CN115002551A (en) * | 2022-05-31 | 2022-09-02 | 深圳市艾酷通信软件有限公司 | Video playback method, device, electronic device and medium |
Also Published As
Publication number | Publication date |
---|---|
CN105045492B (en) | 2018-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104166515B (en) | A kind of mobile terminal touch screen unlocking method and system | |
CN109361985B (en) | TWS earphone wearing detection method and system, electronic device and storage medium | |
US9965086B2 (en) | Method for enabling function module of terminal, and terminal device | |
CN105045492B (en) | A kind of sleep playing duration setting method and terminal device | |
WO2015131590A1 (en) | Method for controlling blank screen gesture processing and terminal | |
CN110741387B (en) | Face recognition method and device, storage medium and electronic equipment | |
CN105718173B (en) | Terminal control method, terminal control device and terminal | |
CN105809139A (en) | Method and device for collecting eyeball information | |
CN102866804A (en) | Method and system for adjusting touch screen sensitivity of mobile terminal | |
CN105227759A (en) | A kind of call recording method and user terminal | |
CN108108117B (en) | Screen capturing method and device and terminal | |
CN106681612A (en) | Adjusting method applied to mobile terminal and mobile terminal | |
EP3678001B1 (en) | Method and device for controlling output of report | |
CN110221897A (en) | Character size adjusting method and device, terminal equipment and medium | |
CN107277364B (en) | Shooting method, mobile terminal and computer readable storage medium | |
CN113709629A (en) | Frequency response parameter adjusting method, device, equipment and storage medium | |
CN108429855B (en) | A message sending control method, terminal and computer-readable storage medium | |
CN107562356B (en) | Fingerprint identification positioning method and device, storage medium and electronic equipment | |
CN106921802B (en) | Audio data playing method and device | |
EP3282680B1 (en) | Blowing action-based method for operating mobile terminal and mobile terminal | |
CN105511673B (en) | A kind of touch screen response method, device and game control method, device | |
CN105353970A (en) | Video recording control method in black screen standby state and mobile terminal | |
CN110012386B (en) | Volume adjusting method of terminal and terminal | |
CN105159555B (en) | A kind of customer equipment controlling method and user equipment | |
CN109089191B (en) | Plugging hole treatment method and related product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CP01 | Change in the name or title of a patent holder | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180529 |
|
CF01 | Termination of patent right due to non-payment of annual fee |