CN106791057B - Alarm clock control method and device - Google Patents

Alarm clock control method and device Download PDF

Info

Publication number
CN106791057B
CN106791057B CN201611123187.XA CN201611123187A CN106791057B CN 106791057 B CN106791057 B CN 106791057B CN 201611123187 A CN201611123187 A CN 201611123187A CN 106791057 B CN106791057 B CN 106791057B
Authority
CN
China
Prior art keywords
alarm clock
target object
terminal
camera
detected
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.)
Active
Application number
CN201611123187.XA
Other languages
Chinese (zh)
Other versions
CN106791057A (en
Inventor
杨万坤
汤进
王玉梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201611123187.XA priority Critical patent/CN106791057B/en
Publication of CN106791057A publication Critical patent/CN106791057A/en
Application granted granted Critical
Publication of CN106791057B publication Critical patent/CN106791057B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72457User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to geographic location

Abstract

The disclosure relates to an alarm clock control method and device. The method comprises the following steps: when the alarm clock rings, starting the double cameras of the terminal; calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance; and when the measured distance is monitored to be larger than the preset distance threshold value, the alarm clock is turned off. According to the technical scheme, when the user needs to hold the terminal to move to a place far enough away from a target object, the alarm clock can be closed, the difficulty and the cost of the user for closing the alarm clock are increased, the purpose of effectively waking up the user is achieved, the using effect of the alarm clock can be guaranteed, and the user experience is improved.

Description

Alarm clock control method and device
Technical Field
The disclosure relates to the technical field of terminals, in particular to an alarm clock control method and device.
Background
The mobile phone is usually configured with an alarm clock function, so that a user can conveniently create an alarm clock reminder for backlogs in daily life or work, such as a wake-up alarm clock, an appointment alarm clock or a conference alarm clock for getting up in the morning.
In the related technology, when the alarm clock rings at a preset time, a user actively turns off the alarm clock on a mobile phone; for example, when the alarm clock rings, the user can turn off the alarm clock by operating a power key of the mobile phone, a turn-off button of the interface of the mobile phone, or completing a question or answering a question on the mobile phone.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present disclosure provide an alarm clock control method and apparatus. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an alarm clock control method, including:
when the alarm clock rings, starting the double cameras of the terminal;
calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance;
and when the measured distance is monitored to be larger than the preset distance threshold value, the alarm clock is turned off.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: according to the technical scheme, when the alarm clock rings, a user needs to hold the terminal to move to a place far enough from a pre-specified target object and align the double cameras of the terminal with the target object, the distance between the terminal and the target object is measured by calling the double cameras of the terminal, and the alarm clock can be turned off only when the distance between the terminal and the target object is monitored to be larger than a preset distance threshold value, so that the alarm clock can be turned off when the user needs to get up and the terminal is held by the user to move to the place far enough from the target object, the difficulty and the cost for the user to turn off the alarm clock are increased, the purpose of effectively waking up the user is achieved, and the problem that the user cannot get up due to the fact that the user can turn off the alarm clock only by directly operating a mobile phone in the related technology is solved; therefore, the use effect of the alarm clock can be guaranteed, and the user experience is improved.
In one embodiment, the dual cameras of the terminal include a first camera and a second camera; when the alarm clock rings, start the two cameras at terminal, include:
starting a camera of the terminal when the alarm clock rings, and starting the first camera;
calling the first camera to acquire an image of an object to be detected;
judging whether the object to be detected is a target object or not according to the image of the object to be detected and second characteristic information of the target object acquired in advance;
and starting the second camera when the object to be detected is determined to be the target object.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: according to the technical scheme, the first camera is started at first instead of directly starting the double cameras at the terminal when the alarm clock rings, the first camera is called to collect images of the object to be detected and identify whether the object to be detected is a target object, and the second camera is started only when the object to be detected is determined to be the target object, so that the double cameras at the terminal are started only under the condition that the double cameras at the terminal are aligned to the target object by a user, the waste of system processing resources caused by frequently starting the double cameras is avoided, and the electric quantity of the battery is saved.
In one embodiment, the determining whether the object to be detected is the target object according to the image of the object to be detected and second feature information of the target object acquired in advance includes:
analyzing the image of the object to be detected to obtain first characteristic information of the object to be detected;
and when the first characteristic information is matched with the second characteristic information of the target object, determining that the object to be detected is the target object.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: according to the technical scheme, the second characteristic information of the target object is obtained in advance, the first characteristic information of the object to be detected is obtained by analyzing the image of the object to be detected, the object to be detected can be determined to be the target object when the first characteristic information is judged to be matched with the second characteristic information, and the purpose of identifying the target object by using the first camera is achieved.
In one embodiment, the method further comprises:
starting timing when the alarm clock rings;
and when the measured distance does not exceed the preset distance threshold, continuing ringing until the timing duration reaches the preset ringing duration.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: according to the technical scheme, timing is started when the alarm clock rings, if the measured distance is monitored not to exceed the preset distance threshold value, the alarm clock is continuously turned off until the timing duration reaches the preset ring duration, and the problems that trouble is caused to a user and the electric quantity of a battery is excessively consumed due to the fact that the alarm clock rings all the time are avoided.
In one embodiment, before the alarm clock rings, the linear distance between the terminal and the target object is less than the preset distance threshold.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: according to the technical scheme, the straight-line distance between the terminal and the target object is smaller than the preset distance threshold value before the alarm clock rings, so that the alarm clock can be closed only when the handheld terminal of the user moves to the place where the distance from the target object is larger than the preset distance threshold value when the alarm clock rings, the user can get up effectively, the using effect of the alarm clock is guaranteed, and the user experience is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided an alarm clock control apparatus including:
the starting module is used for starting the double cameras of the terminal when the alarm clock rings;
the calling module is used for calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance;
the monitoring module is used for monitoring whether the measured distance is greater than a preset distance threshold value;
and the closing module is used for closing the alarm clock when monitoring that the measured distance is greater than the preset distance threshold.
In one embodiment, the dual cameras of the terminal include a first camera and a second camera; a start module comprising:
the first starting submodule is used for starting a camera of the terminal when an alarm clock rings and starting the first camera;
the calling submodule is used for calling the first camera to acquire an image of an object to be detected;
the judgment submodule is used for judging whether the object to be detected is the target object or not according to the image of the object to be detected and second characteristic information of the target object, wherein the second characteristic information is acquired in advance;
and the second starting submodule is used for starting the second camera when the object to be detected is determined to be the target object.
In one embodiment, the judgment sub-module analyzes the image of the object to be detected to obtain first characteristic information of the object to be detected; and when the first characteristic information is matched with the second characteristic information of the target object, determining that the object to be detected is the target object.
In one embodiment, the apparatus further comprises:
the timing module is used for starting timing when the alarm clock rings;
and the control module is used for continuing ringing until the timing duration reaches the preset ringing duration when the measured distance does not exceed the preset distance threshold.
In one embodiment, before the alarm clock rings, the linear distance between the terminal and the target object is less than the preset distance threshold.
According to a third aspect of the embodiments of the present disclosure, there is provided an alarm clock control apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when the alarm clock rings, starting the double cameras of the terminal;
calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance;
and when the measured distance is monitored to be larger than the preset distance threshold value, the alarm clock is turned off.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating an alarm clock control method according to an exemplary embodiment.
FIG. 2 is a flowchart illustrating step 101 in an alarm clock control method according to an exemplary embodiment.
FIG. 3 is a flow chart illustrating an alarm clock control method according to an exemplary embodiment.
Fig. 4 is a schematic diagram illustrating ranging using dual cameras according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment.
FIG. 6 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment.
FIG. 7 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment.
FIG. 8 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment.
FIG. 9 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment.
FIG. 10 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Taking the alarm clock function of the mobile phone as an example, the user often subconsciously turns off the alarm clock due to the sleeping state, which causes the problems of not getting up, late arriving at work and the like, and the related technology forces the user to get up by increasing the difficulty and the process of turning off the alarm clock by the user: when the alarm clock rings at the preset time, the user actively turns off the alarm clock on the mobile phone; for example, when the alarm clock rings, the user can turn off the alarm clock by operating a power key of the mobile phone, a turn-off button of the interface of the mobile phone, or completing a question or answering a question on the mobile phone.
However, in the related art, when the user wants to turn off the alarm clock, the user only needs to directly operate the mobile phone to turn off the alarm clock, and the user does not really get up, so that the purpose of forcing the user to get up cannot be achieved, the user cannot be effectively helped to get up, and therefore popularization and use of the alarm clock can be affected, and user experience is poor.
In order to solve the above problem, an embodiment of the present disclosure provides an alarm clock control method, including: when the alarm clock rings, starting the double cameras of the terminal; calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance; and when the measured distance is monitored to be larger than the preset distance threshold value, the alarm clock is turned off. The technical scheme provided by the embodiment of the disclosure can be applied to a scene that the alarm clock function of the terminal needs to be used to help the user get up. The technical scheme relates to a terminal, wherein the terminal is an electronic device with double cameras and alarm clock functions, such as a smart phone and wearable equipment.
Fig. 1 is a flowchart illustrating an alarm clock control method according to an exemplary embodiment, where an execution subject of the method may be a terminal, as shown in fig. 1, the method includes the following steps 101 and 103:
in step 101, when the alarm clock rings, the dual cameras of the terminal are started.
For example, when the alarm clock rings, the camera of the terminal is automatically turned on and the double cameras of the terminal are started.
For example, the user needs to perform alarm setting in advance: the method comprises the steps that a user sets the closing mode of an alarm clock to a mode of closing the alarm clock based on double-camera ranging in advance on an alarm clock setting interface of a terminal, and the user needs to provide a picture/image of a target object selected by the user; the target object is used as a reference object when the double cameras are called to measure the distance. The user can use the picture of the target object already stored in the terminal, and can also call the camera to take the picture of the target object.
In step 102, the distance between the terminal and a target object specified by the user in advance is measured by calling the double cameras.
For example, when the alarm clock rings, the user needs to hold the terminal to move far enough away from a pre-specified target object and align the two cameras of the terminal with the target object. The terminal measures the distance between the terminal and the target object by calling the double cameras.
The alarm clock ringing method comprises the steps that the user does not get up before the alarm clock rings, the terminal is placed at the place where the user can directly take the alarm clock without stretching the hand, the linear distance between the terminal and the target object is smaller than a preset distance threshold value, and therefore the alarm clock can be closed only when the user moves the handheld terminal to the place where the distance from the target object is larger than the preset distance threshold value when the alarm clock rings, and therefore the user can be effectively helped to get up.
In step 103, when it is monitored that the measured distance is greater than the preset distance threshold, the alarm clock is turned off.
In the process of alarm clock ringing, the terminal continuously calls the double cameras to measure the distance between the terminal and a target object, and monitors whether the measured distance is greater than a preset distance threshold value; when the measured distance is monitored to be larger than a preset distance threshold value, an alarm clock is turned off, and the double cameras of the terminal are turned off at the same time; illustratively, the alarm clock starts timing when it rings; when the measured distance is monitored not to exceed the preset distance threshold, the alarm clock is continuously rung until the timing duration reaches the preset ringing duration, and therefore the trouble of a user and the excessive consumption of the battery power caused by the fact that the alarm clock rings all the time can be avoided.
For example, the preset distance threshold should be at least greater than a linear distance between the body or both hands of the user and the target object when the user is not getting up, for example, 3 meters, and the preset distance threshold may use a default value of the terminal, or may be adjusted by the user on an alarm clock setting interface of the terminal according to actual needs.
According to the technical scheme, when the alarm clock rings, a user needs to hold the terminal to move to a place far enough from a pre-specified target object and align the double cameras of the terminal with the target object, the distance between the terminal and the target object is measured by calling the double cameras of the terminal, and the alarm clock can be turned off only when the distance between the terminal and the target object is monitored to be larger than a preset distance threshold value, so that the alarm clock can be turned off when the user needs to get up and the hand-held terminal moves to the place far enough from the target object when the alarm clock rings, the difficulty and the cost of turning off the alarm clock by the user are increased, the purpose of effectively waking up the user is achieved, and the problem that the user cannot get up due to the fact that the user can turn off the alarm clock only by directly operating a mobile phone in the related technology and cannot force the user to get up is solved; therefore, the use effect of the alarm clock can be guaranteed, and the user experience is improved.
In one possible implementation, as shown in fig. 2, the step 101 shown in fig. 1 may be implemented to include steps 201 and 204:
in step 201, when the alarm clock rings, a camera of the terminal is turned on, and a first camera is started.
Illustratively, the dual cameras of the terminal include a first camera and a second camera. In step 201, when the alarm clock rings, the terminal automatically turns on a camera of the terminal and starts a first camera of the two cameras.
In step 202, a first camera is called to capture an image of an object to be measured.
In an example, a user holds a terminal by hand and aims at an object to be detected through a camera of the terminal, and calls a first camera to acquire an image of the object to be detected.
In step 203, it is determined whether the object to be detected is the target object according to the image of the object to be detected and the second feature information of the target object acquired in advance.
For example, the manner of acquiring the second characteristic information of the target object by the terminal may include: and the terminal analyzes the picture of the target object, extracts and stores second characteristic information of the target object.
For example, the second characteristic information of the target object, which is actually characteristic information of the photo/image of the target object, may include: visual features such as edges, contours, shapes, and regions of the image of the target object, etc.; statistical features of the image, such as histograms, etc.; transform coefficient characterization: such as fourier delineation operators, autoregressive model coefficients, etc.; algebraic characteristics: such as the singular value decomposition of the image matrix, etc.
In an example, the terminal judges whether the object to be detected is the target object according to the image of the object to be detected and the second characteristic information of the target object; if the object to be detected is determined to be the target object, go to step 204; if the object to be measured is not determined to be the target object, go to step 202.
In step 204, when the object to be measured is determined to be the target object, the second camera is started.
In an example, when the terminal determines that the object to be detected is the target object according to the image of the object to be detected and the second characteristic information of the target object, the terminal starts a second camera of the terminal.
Above-mentioned in this disclosed embodiment not directly start the two cameras at terminal when alarm clock jingle bell but at first start first camera, gather the image of the object to be measured and discern whether the object to be measured is the target object through calling first camera, only just start when judging that the object to be measured is the target object the second camera has realized just starting the two cameras at terminal when the user aims at the target object with the two cameras at terminal, avoids frequently starting the system processing resource waste that two cameras caused, saves battery power.
In one possible implementation, step 203 shown in fig. 2 may be implemented as: after the terminal acquires the image of the object to be detected by calling the first camera, analyzing the image of the object to be detected to obtain first characteristic information of the object to be detected; judging whether the first characteristic information of the object to be detected is matched with the second characteristic information of the target object: if the first characteristic information is judged to be matched with the second characteristic information of the target object, determining that the object to be detected is the target object; and if the first characteristic information is judged not to be matched with the second characteristic information of the target object, determining that the object to be detected is not the target object.
For example, the first feature information of the object to be measured, which is actually the feature information of the image of the object to be measured, may include: visual features such as edges, contours, shapes, and regions of an image of the object to be measured; statistical features of the image, such as histograms, etc.; transform coefficient characterization: such as fourier delineation operators, autoregressive model coefficients, etc.; algebraic characteristics: such as the singular value decomposition of the image matrix, etc.
In the embodiment of the disclosure, the terminal obtains the second characteristic information of the target object in advance, obtains the first characteristic information of the object to be detected by analyzing the image of the object to be detected, and determines that the object to be detected is the target object when the first characteristic information is judged to be matched with the second characteristic information, so that the purpose of identifying the target object by using the first camera is achieved.
The implementation is described in detail below by way of several embodiments.
FIG. 3 is a flow chart illustrating a method of alarm clock control, which is implemented by a terminal, according to an exemplary embodiment; as shown in fig. 3, the method comprises the steps of:
in step 301, when the terminal alarm clock rings, the camera of the terminal is turned on, the first camera is started, and timing is started.
For example, the user needs to perform alarm setting in advance: the user sets the closing mode of the alarm clock to the mode of closing the alarm clock based on the double-camera ranging in advance on the alarm clock setting interface of the terminal, and the user needs to provide the photo/image of the target object selected by the user at the same time. The double cameras of the terminal comprise a first camera and a second camera.
In step 302, the terminal invokes the first camera to acquire an image of an object to be measured.
A user holds the terminal in a hand and aims at an object to be detected through a camera of the terminal, and a first camera is called to collect an image of the object to be detected.
In step 303, the terminal analyzes the image of the object to be detected to obtain first characteristic information of the object to be detected.
In step 304, the terminal determines whether the first characteristic information of the object to be detected matches with the second characteristic information of the target object acquired in advance; if the first characteristic information is determined to match the second characteristic information, go to step 305; if the first characteristic information and the second characteristic information are not matched, go to step 302.
In step 305, the terminal determines that the object to be measured is a target object and starts a second camera.
In an example, when the terminal determines that the first characteristic information of the object to be detected is matched with the second characteristic information of the target object, the object to be detected is determined to be the target object, and the second camera of the terminal is started.
In step 306, the terminal invokes the dual cameras to measure the distance between the terminal and a target object pre-designated by the user.
For example, when the alarm clock rings, the user needs to hold the terminal to move far enough away from a pre-specified target object and align the two cameras of the terminal with the target object. The terminal measures the distance between the terminal and the target object by calling the double cameras.
The alarm clock ringing method comprises the steps that the user does not get up before the alarm clock rings, the terminal is placed at the place where the user can directly take the alarm clock without stretching the hand, the linear distance between the terminal and the target object is smaller than a preset distance threshold value, and therefore the alarm clock can be closed only when the user moves the handheld terminal to the place where the distance from the target object is larger than the preset distance threshold value when the alarm clock rings, and therefore the user can be effectively helped to get up.
In step 307, the terminal turns off an alarm clock when the measured distance is greater than a preset distance threshold.
For example, when the measured distance does not exceed the preset distance threshold, the terminal continues to ring until the timing duration reaches the preset ring duration.
For example, the preset distance threshold should be at least greater than a linear distance between the body or both hands of the user and the target object when the user is not getting up, for example, 3 meters, and the preset distance threshold may use a default value of the terminal, or may be adjusted by the user on an alarm clock setting interface of the terminal according to actual needs.
According to the technical scheme, when the alarm clock rings, a user needs to hold the terminal to move to a place far enough from a pre-specified target object and align the double cameras of the terminal with the target object, the distance between the terminal and the target object is measured by calling the double cameras of the terminal, and the alarm clock can be turned off only when the distance between the terminal and the target object is monitored to be larger than a preset distance threshold value, so that the alarm clock can be turned off when the user needs to get up and the hand-held terminal moves to the place far enough from the target object when the alarm clock rings, the difficulty and the cost of turning off the alarm clock by the user are increased, the purpose of effectively waking up the user is achieved, and the problem that the user cannot get up due to the fact that the user can turn off the alarm clock only by directly operating a mobile phone in the related technology and cannot force the user to get up is solved; therefore, the use effect of the alarm clock can be guaranteed, and the user experience is improved.
As a possible embodiment, taking a mobile phone as an example, a scheme for turning off an alarm clock by using the distance measurement of two cameras of the mobile phone is provided, and the scheme provides a mode for turning off the alarm clock of the mobile phone by using the principle of the distance measurement of two cameras of the mobile phone, that is, the alarm clock can be automatically turned off only when the distance between the two cameras of the mobile phone and a photographed object is far enough, for example, the alarm clock can be turned off only when the distance between the mobile phone and the photographed object reaches 3 meters or more than 3 meters. When the alarm clock rings, the user holds the mobile phone, the camera faces to the front object, and the alarm clock can be turned off when the distance between the camera and the front object is 3 meters. Therefore, the user gets up, the alarm clock closing cost is increased, and the purpose of effectively waking up the user is achieved. The scheme comprises the following steps:
1) preparing in advance: firstly, the user needs to select an object as a target object to be identified when the alarm clock is turned off. The user selects the closing mode of the alarm clock as the mode of closing the alarm clock based on the double-camera ranging in advance on the alarm clock setting interface of the terminal, and the user needs to provide the picture of the target object selected by the user at the same time.
2) Starting the two cameras: when the alarm clock rings, the mobile phone starts the double cameras, a view finding window of the camera appears on a user interface of the mobile phone, and a user cannot directly turn off the alarm clock by operating the mobile phone.
3) Distance judgment: a user needs to hold the mobile phone by hand to aim the camera at a target object; after the mobile phone identifies the target object, the distance between the user and the target object is judged, and when the distance is larger than a set distance threshold value, the terminal can automatically turn off the alarm clock. The set distance threshold is longer than the distance that the user can reach with reaching, for example 3 meters, but allows free adjustment.
For example, the identification process for the target object is described in detail as follows: when the alarm clock is set, a user needs to select a target object, can select an existing photo or can shoot a photo through a camera, and after the target object is determined, the system can extract key characteristic information of the photo of the target object to be used as a reference for identifying the target object later. When the alarm clock rings, the system can open the camera, the user aims at the target object through the camera, the system judges whether the characteristic information of the target object at the moment is the target object set before, and if the characteristic information is the target object set before, the double-camera ranging is started.
By way of example, the principle of using dual-camera ranging is illustrated as follows: referring to fig. 4, the following formula can be obtained according to the principle of similar triangles: Z/T ═ Z-f/[ T- (x)l-xr)]Wherein Z is the physical distance of the connecting line between the point to be measured and the two cameras, and xlAnd xrRespectively, the coordinate of the point to be measured in the image is far from the central point, and the parallax d is xl-xrD units are pixel points; t is the physical distance of the two cameras, and the unit of T is millimeter level or 0.1 millimeter level; f is the focal length of the camera, the unit of f is a pixel point, and the focal lengths of the two cameras are assumed to be the same, so that the value of Z can be obtained according to the formula. The distance value between the mobile phone and the target object does not need an absolute accurate value, and the error is within an acceptable range.
For example, the process of using dual cameras to identify objects and measure distances to turn off an alarm clock is described as follows: the terminal identifies a target object through a camera, and then measures the distance between the terminal and the target object through two cameras; and when the measured distance is judged to be larger than the set distance threshold value, the terminal automatically turns off the alarm clock, otherwise, the alarm clock rings all the time until the duration time reaches the specified ring time length, and then the alarm clock is turned off, for example, ten minutes.
The technical scheme provided by the embodiment of the disclosure realizes the identification and distance measurement of the target object by using the double cameras, and provides a new interactive mode for turning off the alarm clock; because the two cameras are used for identifying objects and measuring the distance, a user needs to get up to hold the mobile phone to move and shoot, and the alarm clock cannot be directly turned off simply by operating the mobile phone, so that the user can be effectively helped to get up.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
FIG. 5 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment; the apparatus may be implemented in various ways, for example, with all of the components of the apparatus being implemented in a terminal, or with components of the apparatus being implemented in a coupled manner on the terminal side; the device can implement the method related to the present disclosure through software, hardware or a combination of the two, as shown in fig. 5, the alarm clock control device includes: a starting module 501, a calling module 502, a monitoring module 503 and a closing module 504, wherein:
the starting module 501 is configured to start the dual cameras of the terminal when the alarm clock rings;
illustratively, the dual cameras of the terminal include a first camera and a second camera. And when the alarm clock rings, the camera of the terminal is automatically started and the double cameras of the terminal are started.
The user needs to perform alarm setting in advance: the method comprises the steps that a user sets the closing mode of an alarm clock to a mode of closing the alarm clock based on double-camera ranging in advance on an alarm clock setting interface of a terminal, and the user needs to provide a picture/image of a target object selected by the user; the target object is used as a reference object when the double cameras are called to measure the distance. The user can use the picture of the target object already stored in the terminal, and can also call the camera to take the picture of the target object.
The calling module 502 is configured to call the two cameras to measure the distance between the terminal and a target object specified by a user in advance;
for example, when the alarm clock rings, the user needs to hold the terminal to move far enough away from a pre-specified target object and align the two cameras of the terminal with the target object. The terminal measures the distance between the terminal and the target object by calling the double cameras.
The alarm clock ringing method comprises the steps that the user does not get up before the alarm clock rings, the terminal is placed at the place where the user can directly take the alarm clock without stretching the hand, the linear distance between the terminal and the target object is smaller than a preset distance threshold value, and therefore the alarm clock can be closed only when the user moves the handheld terminal to the place where the distance from the target object is larger than the preset distance threshold value when the alarm clock rings, and therefore the user can be effectively helped to get up.
The monitoring module 503 is configured to monitor whether the measured distance is greater than a preset distance threshold;
the turn-off module 504 is configured to turn off the alarm clock when it is monitored that the measured distance is greater than a preset distance threshold.
In the process of alarm clock ringing, the terminal continuously calls the double cameras to measure the distance between the terminal and a target object, and monitors whether the measured distance is greater than a preset distance threshold value; when the measured distance is monitored to be larger than a preset distance threshold value, an alarm clock is turned off, and the double cameras of the terminal are turned off at the same time; illustratively, the alarm clock starts timing when it rings; when the measured distance is monitored not to exceed the preset distance threshold, the alarm clock is continuously rung until the timing duration reaches the preset ringing duration, and therefore the trouble of a user and the excessive consumption of the battery power caused by the fact that the alarm clock rings all the time can be avoided.
According to the alarm clock control device provided by the embodiment of the disclosure, the starting module 501 is configured to start the double cameras of the terminal when the alarm clock rings; the calling module 502 calls the two cameras to measure the distance between the terminal and a target object specified by a user in advance; the monitoring module 503 monitors whether the measured distance is greater than a preset distance threshold; when the closing module 504 monitors that the measured distance is greater than the preset distance threshold, the alarm clock is closed; therefore, when the alarm clock rings, the user needs to get up and the handheld terminal moves to a place far enough away from a target object, the alarm clock can be turned off, the difficulty and the cost of the user for turning off the alarm clock are increased, the purpose of effectively waking up the user is achieved, and the problem that the user cannot get up due to the fact that the user can turn off the alarm clock only by directly operating a mobile phone in the related art and cannot be forced to get up is solved; therefore, the use effect of the alarm clock can be guaranteed, and the user experience is improved.
In one possible implementation, as shown in fig. 6, the alarm clock control apparatus shown in fig. 5 may further include a start module 501 configured to include: a first start sub-module 601, a call sub-module 602, a judgment sub-module 603, and a second start sub-module 604, wherein:
the first starting sub-module 601 is configured to start a camera of the terminal when an alarm clock rings, and start the first camera;
the calling submodule 602 is configured to call the first camera to acquire an image of an object to be measured;
the judgment sub-module 603 is configured to judge whether the object to be detected is a target object according to the image of the object to be detected and second feature information of the target object acquired in advance;
the second starting sub-module 604 is configured to start the second camera when it is determined that the object to be measured is the target object.
In a possible implementation manner, the judgment sub-module 603 analyzes the image of the object to be detected to obtain first characteristic information of the object to be detected; and when the first characteristic information is matched with the second characteristic information of the target object, determining that the object to be detected is the target object.
In one possible implementation manner, as shown in fig. 7, the alarm clock control apparatus shown in fig. 5 may further include: a timing module 701 and a control module 702, wherein:
the timing module 701 is configured to start timing when the alarm clock rings;
the control module 702 is configured to continue to ring until the timed length reaches a preset ring time length when the measured distance does not exceed the preset distance threshold.
FIG. 8 is a block diagram illustrating an alarm clock control apparatus 800 according to an exemplary embodiment, the alarm clock control apparatus 800 may be implemented in various ways, such as implementing all components of the apparatus in a terminal or implementing components of the apparatus in a coupled manner on the terminal side; the alarm clock control apparatus 800 includes:
a processor 801;
a memory 802 for storing processor-executable instructions;
wherein the processor 801 is configured to: when the alarm clock rings, starting the double cameras of the terminal; calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance; and when the measured distance is monitored to be larger than the preset distance threshold value, the alarm clock is turned off.
For example, before the alarm clock rings, the linear distance between the terminal and the target object is smaller than the preset distance threshold.
In one embodiment, the processor 801 may be further configured to: starting a camera of the terminal when the alarm clock rings, and starting the first camera; calling the first camera to acquire an image of an object to be detected; judging whether the object to be detected is a target object or not according to the image of the object to be detected and second characteristic information of the target object acquired in advance; and starting the second camera when the object to be detected is determined to be the target object.
In one embodiment, the processor 801 may be further configured to: analyzing the image of the object to be detected to obtain first characteristic information of the object to be detected; and when the first characteristic information is matched with the second characteristic information of the target object, determining that the object to be detected is the target object.
In one embodiment, the processor 801 may be further configured to: starting timing when the alarm clock rings;
and when the measured distance does not exceed the preset distance threshold, continuing ringing until the timing duration reaches the preset ringing duration.
The alarm clock control device provided by the embodiment of the disclosure measures the distance between the terminal and the target object by calling the double cameras of the terminal, and the alarm clock is turned off only when the distance between the terminal and the target object is monitored to be larger than the preset distance threshold, so that the alarm clock can be turned off when a user needs to get up and the handheld terminal moves to a place far enough away from the target object when the alarm clock rings, the difficulty and the cost of the user for turning off the alarm clock are increased, the purpose of effectively waking up the user is achieved, and the problem that the user cannot be effectively helped to get up due to the fact that the user can turn off the alarm clock only by directly operating a mobile phone in the related technology is solved; therefore, the use effect of the alarm clock can be guaranteed, and the user experience is improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 9 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment; the alarm clock control apparatus 900 is applicable to a terminal; the alarm clock control device 900 may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916.
The processing component 902 generally controls the overall operation of the alarm clock control device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support the operation at the alarm clock control apparatus 900. Examples of such data include instructions for any application or method operating on alarm clock control device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 906 provides power to the various components of the alarm clock control device 900. The power components 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the alarm clock control apparatus 900.
The multimedia component 908 comprises a screen providing an output interface between the alarm clock control device 900 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. When the alarm clock control apparatus 900 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a Microphone (MIC) configured to receive an external audio signal when the alarm clock control device 900 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 914 includes one or more sensors for providing various aspects of state assessment for the alarm clock control apparatus 900. For example, sensor assembly 914 may detect an on/off state of alarm clock control 900, the relative positioning of components, such as a display and keypad of alarm clock control 900, sensor assembly 914 may also detect a change in position of alarm clock control 900 or a component of alarm clock control 900, the presence or absence of user contact with alarm clock control 900, orientation or acceleration/deceleration of alarm clock control 900, and a change in temperature of alarm clock control 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate wired or wireless communication between the alarm clock control apparatus 900 and other devices. The alarm clock control device 900 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the alarm clock control device 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 904 comprising instructions, executable by the processor 920 of the alarm clock control device 900 to perform the above method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an alarm clock control apparatus 900, enable the alarm clock control apparatus 900 to perform an event reminder method comprising: when the alarm clock rings, starting the double cameras of the terminal; calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance; and when the measured distance is monitored to be larger than the preset distance threshold value, the alarm clock is turned off.
In one embodiment, the dual cameras of the terminal include a first camera and a second camera; when the alarm clock rings, start the two cameras at terminal, include: starting a camera of the terminal when the alarm clock rings, and starting the first camera; calling the first camera to acquire an image of an object to be detected; judging whether the object to be detected is a target object or not according to the image of the object to be detected and second characteristic information of the target object acquired in advance; and starting a second camera when the object to be detected is determined to be the target object.
In one embodiment, the determining whether the object to be detected is the target object according to the image of the object to be detected and second feature information of the target object acquired in advance includes: analyzing the image of the object to be detected to obtain first characteristic information of the object to be detected; and when the first characteristic information is matched with the second characteristic information of the target object, determining that the object to be detected is the target object.
In one embodiment, the method further comprises: starting timing when the alarm clock rings; and when the measured distance does not exceed the preset distance threshold, continuing ringing until the timing duration reaches the preset ringing duration.
In one embodiment, before the alarm clock rings, the linear distance between the terminal and the target object is less than the preset distance threshold.
FIG. 10 is a block diagram illustrating an alarm clock control apparatus according to an exemplary embodiment. For example, the alarm clock control apparatus 1000 may be provided as a server. The alarm clock control device 1000 comprises a processing component 1002, which further comprises one or more processors, and memory resources, represented by memory 1003, for storing instructions, such as applications, executable by the processing component 1002. The application programs stored in memory 1003 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1002 is configured to execute instructions to perform the above-described methods.
The alarm clock control device 1000 may also include a power supply component 1006 configured to perform power management of the alarm clock control device 1000, a wired or wireless network interface 1005 configured to connect the alarm clock control device 1000 to a network, and an input/output (I/O) interface 1008. The alarm clock control 1000 may operate based on an operating system stored in memory 1003, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (7)

1. An alarm clock control method, comprising:
when the alarm clock rings, starting the double cameras of the terminal;
calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance; the target object does not include the user;
when the measured distance is monitored to be larger than a preset distance threshold value, closing an alarm clock;
before the alarm clock rings, the linear distance between the terminal and the target object is smaller than the preset distance threshold;
the double cameras of the terminal comprise a first camera and a second camera; when the alarm clock rings, start the two cameras at terminal, include:
starting a camera of the terminal when the alarm clock rings, and starting the first camera;
calling the first camera to acquire an image of an object to be detected;
judging whether the object to be detected is a target object or not according to the image of the object to be detected and second characteristic information of the target object acquired in advance;
and starting the second camera when the object to be detected is determined to be the target object.
2. The method according to claim 1, wherein determining whether the object to be detected is a target object according to the image of the object to be detected and second feature information of the target object acquired in advance comprises:
analyzing the image of the object to be detected to obtain first characteristic information of the object to be detected;
and when the first characteristic information is matched with the second characteristic information of the target object, determining that the object to be detected is the target object.
3. The method of claim 1, further comprising:
starting timing when the alarm clock rings;
and when the measured distance does not exceed the preset distance threshold, continuing ringing until the timing duration reaches the preset ringing duration.
4. An alarm clock control apparatus, comprising:
the starting module is used for starting the double cameras of the terminal when the alarm clock rings;
the calling module is used for calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance; the target object does not include the user;
the monitoring module is used for monitoring whether the measured distance is greater than a preset distance threshold value;
the closing module is used for closing the alarm clock when monitoring that the measured distance is greater than a preset distance threshold;
before the alarm clock rings, the linear distance between the terminal and the target object is smaller than the preset distance threshold;
the double cameras of the terminal comprise a first camera and a second camera; a start module comprising:
the first starting submodule is used for starting a camera of the terminal when an alarm clock rings and starting the first camera;
the calling submodule is used for calling the first camera to acquire an image of an object to be detected;
the judgment submodule is used for judging whether the object to be detected is the target object or not according to the image of the object to be detected and second characteristic information of the target object, wherein the second characteristic information is acquired in advance;
and the second starting submodule is used for starting the second camera when the object to be detected is determined to be the target object.
5. The device according to claim 4, wherein the judgment sub-module analyzes the image of the object to be detected to obtain first characteristic information of the object to be detected; and when the first characteristic information is matched with the second characteristic information of the target object, determining that the object to be detected is the target object.
6. The apparatus of claim 4, further comprising:
the timing module is used for starting timing when the alarm clock rings;
and the control module is used for continuing ringing until the timing duration reaches the preset ringing duration when the measured distance does not exceed the preset distance threshold.
7. An alarm clock control apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when the alarm clock rings, starting the double cameras of the terminal;
calling the double cameras to measure the distance between the terminal and a target object specified by a user in advance; the target object does not include the user;
when the measured distance is monitored to be larger than a preset distance threshold value, closing an alarm clock;
before the alarm clock rings, the linear distance between the terminal and the target object is smaller than the preset distance threshold;
the double cameras of the terminal comprise a first camera and a second camera; when the alarm clock rings, start the two cameras at terminal, include:
starting a camera of the terminal when the alarm clock rings, and starting the first camera;
calling the first camera to acquire an image of an object to be detected;
judging whether the object to be detected is a target object or not according to the image of the object to be detected and second characteristic information of the target object acquired in advance;
and starting the second camera when the object to be detected is determined to be the target object.
CN201611123187.XA 2016-12-08 2016-12-08 Alarm clock control method and device Active CN106791057B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611123187.XA CN106791057B (en) 2016-12-08 2016-12-08 Alarm clock control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611123187.XA CN106791057B (en) 2016-12-08 2016-12-08 Alarm clock control method and device

Publications (2)

Publication Number Publication Date
CN106791057A CN106791057A (en) 2017-05-31
CN106791057B true CN106791057B (en) 2020-03-17

Family

ID=58881723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611123187.XA Active CN106791057B (en) 2016-12-08 2016-12-08 Alarm clock control method and device

Country Status (1)

Country Link
CN (1) CN106791057B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107272424A (en) * 2017-06-13 2017-10-20 三星电子(中国)研发中心 The method and apparatus for controlling intelligent appliance
CN109040463A (en) * 2018-08-31 2018-12-18 上海与德通讯技术有限公司 Alarm clock prompting method, terminal and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012244435A (en) * 2011-05-19 2012-12-10 Fujitsu Ltd Portable electronic device and alarm notification program
CN104656430A (en) * 2013-11-19 2015-05-27 西安树正电子科技有限公司 Alarm clock with ultrasonic ranging device
CN104869260A (en) * 2015-06-19 2015-08-26 上海斐讯数据通信技术有限公司 Method and system for turning off alarm clock of mobile terminal
CN105141752A (en) * 2015-07-24 2015-12-09 努比亚技术有限公司 Mobile terminal control device and method
CN105898016A (en) * 2015-12-04 2016-08-24 乐视移动智能信息技术(北京)有限公司 Application starting method according to position information of mobile device and mobile device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012244435A (en) * 2011-05-19 2012-12-10 Fujitsu Ltd Portable electronic device and alarm notification program
CN104656430A (en) * 2013-11-19 2015-05-27 西安树正电子科技有限公司 Alarm clock with ultrasonic ranging device
CN104869260A (en) * 2015-06-19 2015-08-26 上海斐讯数据通信技术有限公司 Method and system for turning off alarm clock of mobile terminal
CN105141752A (en) * 2015-07-24 2015-12-09 努比亚技术有限公司 Mobile terminal control device and method
CN105898016A (en) * 2015-12-04 2016-08-24 乐视移动智能信息技术(北京)有限公司 Application starting method according to position information of mobile device and mobile device

Also Published As

Publication number Publication date
CN106791057A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US10649648B2 (en) Method and apparatus for screen capture processing
CN107582028B (en) Sleep monitoring method and device
KR101712301B1 (en) Method and device for shooting a picture
EP3136793A1 (en) Method and apparatus for awakening electronic device
US11361586B2 (en) Method for sending warning information, storage medium and terminal
CN106766022B (en) Sensor control method and device
US9491371B2 (en) Method and device for configuring photographing parameters
CN107438811B (en) Information screen display method and device
CN107463052B (en) Shooting exposure method and device
US10234924B2 (en) Method and apparatus for displaying time on mobile device
CN108769416B (en) Screen-off display method and device and non-transitory computer-readable storage medium
CN107480785B (en) Convolutional neural network training method and device
US20180238748A1 (en) Pressure detection method and apparatus, and storage medium
CN104243829A (en) Self-shooting method and self-shooting device
CN104332037A (en) Method and device for alarm detection
CN106792500B (en) Information output method and device and wearable device
CN109034747B (en) Task reminding method and device
CN106791057B (en) Alarm clock control method and device
CN107734303B (en) Video identification method and device
CN106527703B (en) Message reminding method and device
CN105786561B (en) Method and device for calling process
CN105607319B (en) The automatic method and device for improving light leakage of the screen
CN106791169A (en) Screen control method and device
CN108647074B (en) Method, device, hardware device and medium for displaying dynamic information in screen locking state
US10187498B2 (en) Method and apparatus for setting waiting time duration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant