A prompt method, device, equipment and storage medium
Obtaining and detecting user location information through terminal devices solves the problem that users cannot accurately remind them of movement in the prior art, and accurately detect and remind users of their sitting status, protecting users' health.
Patent Information
- Application Number
- CN202111000423.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-08-27
AI Technical Summary
The prior art cannot accurately obtain the user's duration and posture changes in front of the terminal screen, and cannot effectively remind the user of exercise, resulting in health problems.
The terminal device obtains the target user's position information according to the preset frequency, and detects whether the relative change between the two adjacent position information is within the preset range. If there is no change within the preset time period, a prompt is made.
It realizes accurate detection and reminder of the user's sitting status, avoiding the damage to physical health due to long-term sitting posture.
Smart Images

Figure CN113706616B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent terminals, and in particular to a prompting method, device, equipment and storage medium. Background Art
[0002] With the gradual development of smart technology products, people are increasingly dependent on terminal products with screens in their work and study. Whether it is work, study or entertainment, people are tightly "bound" to the terminal screen, often for a long time without knowing it. However, in the long run, it will cause great damage to people's physical health. Sitting for a long time can cause insufficient blood supply to people's brains, causing health problems such as muscle soreness, stiff neck, cervical and lumbar diseases. At present, the existing technology is to install anti-sitting software on the terminal to remind users to exercise regularly; however, the prompt method of installing the anti-sitting software cannot accurately obtain the duration of the user in front of the terminal screen and the duration of the posture, and cannot detect whether the user has exercised during the time, and cannot provide users with accurate and effective prompt methods.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the main purpose of the present invention is to provide a prompt method, device, equipment and storage medium, aiming to solve the technical problem in the prior art that users cannot be effectively reminded when sitting in front of the terminal for a long time, without changing their posture or exercising.
[0005] To achieve the above object, the present invention provides a prompting method, the method comprising:
[0006] Obtaining the location information of the target user at a preset frequency;
[0007] Detecting whether a relative change between two adjacent position information is within a preset range, wherein the position information includes a height of the target user and a horizontal distance from the terminal;
[0008] When the relative change between any two adjacent position information within a preset time period is within a preset range, the target user is prompted.
[0009] Preferably, the step of acquiring the location information of the target user at a preset frequency includes: the terminal receiving a start instruction;
[0010] Capturing the image of the target user while starting the terminal;
[0011] The location information of the target user is obtained based on the image of the target user.
[0012] Preferably, the step of obtaining the location information of the target user based on the image of the target user further includes:
[0013] Acquire the ground information of the terminal camera, wherein the ground information includes: the vertical height of the terminal camera from the ground and the horizontal distance between the near-ground end of the image and the terminal camera;
[0014] The ground viewing angle of the terminal camera is calculated based on the ground information of the terminal camera.
[0015] Preferably, the step of obtaining the location information of the target user based on the image of the target user further includes:
[0016] Calculating the edge distance of the target user in the image, wherein the edge distance includes: the distance of the target user in the image from the top, bottom and left edge of the image;
[0017] The ground viewing angle of the image is calculated based on the edge distance.
[0018] Preferably, the step of obtaining the location information of the target user based on the image of the target user further includes:
[0019] The height of the target user and the horizontal distance from the terminal are calculated based on the ground viewing angle of the terminal camera and the ground viewing angle of the image.
[0020] Preferably, the step of detecting whether the relative change between two adjacent pieces of position information is within a preset range comprises:
[0021] Calculate the height difference of the target user in two adjacent position information and the horizontal distance difference from the terminal;
[0022] The two adjacent position information are the position information of the target user corresponding to two adjacent pictures in the collection sequence according to the preset frequency;
[0023] Detecting whether the height difference and the horizontal distance difference are within a preset range;
[0024] Preferably, when the relative change between any two adjacent pieces of position information within a preset time period is within a preset range, the terminal prompting step includes:
[0025] If the change in the two adjacent position information exceeds a preset range;
[0026] Then, the timing is restarted to detect whether the relative changes between any two adjacent position information within the preset time period are within the preset range.
[0027] In addition, in order to achieve the above object, the present invention also provides a prompting device, the device comprising:
[0028] An image processing module, used to collect image information of a target user and calculate location information of the target user based on the image information;
[0029] A detection module, used to detect whether the relative change between two adjacent position information is within a preset range and whether the relative change between any two adjacent position information within a preset time period is within a preset range;
[0030] The prompt module is used to issue prompt information.
[0031] In addition, in order to achieve the above-mentioned purpose, the present invention also provides a terminal device, including a memory, a processor, and a prompt program stored in the memory and executable on the processor, wherein the prompt program is configured to implement the steps of any of the prompt methods described above.
[0032] In addition, in order to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a prompt program is stored, and when the prompt program is executed by a processor, the steps of any of the prompt methods described above are implemented.
[0033] The prompt method proposed in the present invention includes: obtaining the location information of the target user at a preset frequency; detecting whether the change amount of two adjacent location information is within a preset range; when the change amount of the two adjacent location information within a preset time period is within the preset range, the terminal prompts. By analyzing the location information of the target user within the preset time period, it is determined whether the user is in a state of sitting in front of the terminal for a long time, so that the user's sedentary behavior can be reminded in time to avoid physical damage caused by sitting in front of the terminal for a long time. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the terminal\device structure of the hardware operating environment involved in the embodiment of the present invention;
[0035] Figure 2 A schematic diagram of a flow chart of an embodiment of a prompting method of the present invention;
[0036] Figure 3 for Figure 2 A detailed flow chart of step S10;
[0037] Figure 4 for Figure 3 Detailed flow chart of step S13;
[0038] Figure 5This is a schematic diagram of the installation position of the camera of the present invention;
[0039] Figure 6 A schematic diagram of the distance of the target user of the present invention in the image;
[0040] Figure 7 Schematic diagram of the ground viewing angle of the camera of the present invention and the longitudinal viewing angle and the lateral viewing angle of the target user image;
[0041] Figure 8 for Figure 2 Detailed flow chart of step S20;
[0042] Fig. 9 The figure is a schematic structural diagram of a prompting device according to another embodiment of the present invention.
[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0045] The main solution of the embodiment of the present invention is: obtaining the location information of the target user according to a preset frequency; detecting whether the change amount of two adjacent location information is within a preset range; when the change amount of the two adjacent location information within a preset time length is within the preset range, the terminal prompts.
[0046] In the prior art, people's lives are inseparable from various terminals. Life, study, and entertainment are all inseparable from terminals. However, sitting in front of terminals such as TVs and computers for a long time will cause great damage to people's physical health. At present, some terminal devices use timed reminder methods to remind users to exercise, but such reminder methods are not accurate enough to detect the duration of the user in front of the terminal, nor can they accurately detect whether the user has exercised during this period. Therefore, there is an urgent need for a method that can accurately and timely remind users to exercise.
[0047] The present invention provides a solution, through a terminal, the location information of the target user is obtained according to a preset frequency; the relative change between two adjacent location information is detected to be within a preset range; when the relative change between any two adjacent location information within a preset time length is within the preset range, the terminal gives a prompt. That is, in the present invention, the location information of the user is obtained according to a preset frequency, and when any two adjacent location information of the user within the preset time length are within the preset range, it indicates that the user has not moved within the preset time length, and the terminal gives the user a movement prompt.
[0048] like Figure 1 As shown, Figure 1It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.
[0049] The terminal of the embodiment of the present invention can be a PC, or it can be a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a portable computer, or other portable terminal devices with display function.
[0050] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0051] Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, sensors include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal may also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which will not be repeated here.
[0052] Those skilled in the art will understand that Figure 1The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0053] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and a prompt program.
[0054] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the prompt program stored in the memory 1005 and perform the following operations:
[0055] Obtaining the location information of the target user at a preset frequency;
[0056] Detecting whether a relative change between two adjacent position information is within a preset range, wherein the position information includes a height of the target user and a horizontal distance from the terminal;
[0057] When the relative change between any two adjacent position information within a preset time period is within a preset range, the target user is prompted.
[0058] Further, the processor 1001 may call the prompt program stored in the memory 1005, and further perform the following operations:
[0059] The step of obtaining the location information of the target user according to the preset frequency includes:
[0060] The terminal receives a start instruction;
[0061] Capturing the image of the target user while starting the terminal;
[0062] The location information of the target user is obtained based on the image of the target user.
[0063] Further, the processor 1001 may call the prompt program stored in the memory 1005, and further perform the following operations:
[0064] The step of obtaining the location information of the target user based on the image of the target user further includes:
[0065] Acquire the ground information of the terminal camera, wherein the ground information includes: the vertical height of the terminal camera from the ground and the horizontal distance between the near-ground end of the image and the terminal camera;
[0066] The ground viewing angle of the terminal camera is calculated based on the ground information of the terminal camera.
[0067] Further, the processor 1001 may call the prompt program stored in the memory 1005, and further perform the following operations:
[0068] The step of obtaining the location information of the target user based on the image of the target user further includes:
[0069] Calculating the edge distance of the target user in the image, wherein the edge distance includes: the distance of the target user in the image from the top, bottom and left edge of the image;
[0070] The ground viewing angle of the image is calculated based on the edge distance.
[0071] Further, the processor 1001 may call the prompt program stored in the memory 1005, and further perform the following operations:
[0072] The step of obtaining the location information of the target user based on the image of the target user further includes:
[0073] The height of the target user and the horizontal distance from the terminal are calculated based on the ground viewing angle of the terminal camera and the ground viewing angle of the image.
[0074] Further, the processor 1001 may call the prompt program stored in the memory 1005, and further perform the following operations:
[0075] The step of detecting whether the relative change between two adjacent position information is within a preset range comprises:
[0076] Calculate the height difference of the target user in two adjacent position information and the horizontal distance difference from the terminal;
[0077] The two adjacent position information are the position information of the target user corresponding to two adjacent pictures in the collection sequence of the preset frequency;
[0078] Detecting whether the height difference and the horizontal distance difference are within a preset range;
[0079] If yes, it is determined that the target user is in a non-moving state.
[0080] Further, the processor 1001 may call the prompt program stored in the memory 1005, and further perform the following operations:
[0081] When the relative change between any two adjacent pieces of position information within the preset time period is within a preset range, the terminal prompting step includes:
[0082] If the change in the two adjacent position information exceeds a preset range;
[0083] Then, the timing is restarted to detect whether the relative changes between any two adjacent position information within the preset time period are within the preset range.
[0084] Reference Figure 2 The first embodiment of the prompting method of the present invention provides a prompting method, the prompting method comprising:
[0085] Step S10, obtaining the location information of the target user according to a preset frequency;
[0086] Step S20, detecting whether the relative change between two adjacent position information is within a preset range, wherein the position information includes the height of the target user and the horizontal distance from the terminal; detecting
[0087] Step S30: When the relative change between any two adjacent position information within the preset time period is within a preset range, the target user is prompted.
[0088] Specifically, in this embodiment, the execution subject of collecting the location information of the target user can be a television, a computer, and a terminal device with a camera. In this embodiment, the television is taken as the execution subject as an example. When the user is in front of the television, the image acquisition device of the television, under the control of the television system, collects the real-time location information of the target user at a preset frequency; wherein the preset frequency is the frequency of collecting location information that can be set by technicians in this field as needed. For example, the preset picture acquisition frequency is once every 5 minutes, so that the picture acquisition device will collect the location information of the target user every five minutes, and calculate the change in the target user location information collected at the fifth minute and the target user location information collected initially, and calculate the change in the target user location information collected 10 minutes ago and the target user location information collected at the fifth minute, and so on.
[0089] In addition, the present invention is not limited to collecting the user's location information by taking photos. This embodiment does not impose any restrictions on this. In other embodiments, the TV can also collect the video information of the target user in front of the TV by recording a video, and obtain whether the location information of the target user changes within the corresponding time according to the preset time to determine whether the target user is in a sedentary state without moving. Before step S10, it also includes: the user sets the minimum sedentary time according to the length of time he thinks he is in a sedentary state.
[0090] Specifically, in this embodiment, the TV system determines whether the target user is in a non-moving state based on calculating the overlap rate of the location information of two adjacent target users. When the user turns on the TV, the TV camera has begun to collect the current location information of the target user, and then collects the next location information of the target user according to the pre-set collection frequency, and compares it with the previous location information of the target user to calculate the overlap rate of the location information of the two adjacent target users. When the overlap rate of the two adjacent location information is within the preset range, the second location information is marked and recorded, and the location information of the next two adjacent target users is calculated. If the number of marked location information reaches a preset number within the preset time length, it can be determined that the target user has been in a non-moving state within multiple frequency durations, that is, it is determined that the user is in a sedentary state, and the terminal prompts. The terminal prompt method includes but is not limited to: pop-up prompt information, screen display of rest screen, etc.
[0091] In this embodiment, the location information of the target user is obtained at a preset frequency, and it is determined whether the change amount of two adjacent location information is within a preset range; if and only if the change amount of the two adjacent location information is within the preset range within the preset time length, the terminal prompts the target user. By comparing the two adjacent location information to determine whether the user has moved within a collection interval, the user's movement is accurately and comprehensively measured, and a sedentary prompt is given to users who have not moved within a preset time length.
[0092] Further, see Figure 3 The second embodiment of the prompting method of the present invention provides a prompting method based on the above Figure 2 In the embodiment shown, step S10 further includes:
[0093] Step S11, the terminal receives a start instruction;
[0094] Step S12, collecting the image of the target user while starting the terminal;
[0095] Step S13: obtaining the location information of the target user based on the image of the target user.
[0096] Specifically, in this embodiment, when the user turns on the TV, the TV camera also turns on the prompt setting. If the TV is in playback mode and the target user is sitting in front of the TV screen, the current real-time image is collected by the TV camera. The TV system can obtain the initial position information of the target user relative to the TV based on the image information.
[0097] Further, refer to Figure 4 The third embodiment of the prompting method of the present invention provides a prompting method based on the above Figure 3In the embodiment shown, step S13 further includes:
[0098] Step S131, obtaining ground information of the terminal camera, wherein the ground information includes: a vertical height of the terminal camera from the ground and a horizontal distance between the near-ground end of the image and the terminal camera;
[0099] The ground viewing angle of the terminal camera is calculated based on the ground information of the terminal camera.
[0100] Specifically, in this embodiment, the formula for calculating the two viewing angles θ1 and θ2 of the camera installation position is:
[0101]
[0102]
[0103] Where H is the vertical height of the TV camera from the ground, L is the horizontal distance between the near-ground position of the captured image and the root position of the camera, f is the focal length of the camera, l H Indicates the vertical height value of the focal plane of the camera CCD (charge coupled device), f and l H is a known fixed parameter, tg -1 is the inverse tangent trigonometric function. This gives us the two ground viewing angles θ1 and θ2 of the TV camera (e.g. Figure 7 As shown in FIG. 1 , the ground viewing angle θ1 of the terminal camera is calculated by the horizontal distance L between the near-ground position of the captured image and the root position of the camera and the height H of the terminal camera from the ground according to the inverse tangent trigonometric function. According to the focal length f of the terminal camera, the CCD (charge coupled device) and the longitudinal height value of the focal plane, another ground viewing angle θ2 of the camera is obtained by the inverse tangent trigonometric function.
[0104] Furthermore, in the present invention, step S13 also includes:
[0105] Step S132, calculating the edge distance of the target user in the image, wherein the edge distance includes: the distance of the target user in the image from the top, bottom and left edge of the image;
[0106] The ground viewing angle of the image is calculated based on the edge distance.
[0107] Specifically, the image of the target user captured by the camera is used to calculate the three perspectives corresponding to the image. Specifically, the height and distance value of the captured target user in the image is actually calculated by measuring the pixel distance l1 from the bottom of the captured target user to the bottom edge of the image, the pixel distance l2 from the head of the target user to the bottom edge of the image, and the pixel distance l3 from the center of the target user to the left edge of the image. Among them:
[0108] The formula for calculating the two vertical viewing angles of the target user compared to the ground is:
[0109]
[0110]
[0111] The formula for calculating the horizontal viewing angle corresponding to the target user being photographed is:
[0112]
[0113] Among them, θ3 and θ4 are two longitudinal perspectives corresponding to the photographed person, θ5 represents the horizontal perspective of the person, sin is the sine trigonometric function, cos is the cosine trigonometric function, and tg is the tangent trigonometric function.
[0114] Where k represents the fixed parameter value of the pixel spacing of the camera CCD device, l H Indicates the vertical height value of the camera focal plane, l W Indicates the horizontal width of the camera focal plane, l H and l W These are fixed parameters of the camera.
[0115] Furthermore, step S13 in the above embodiment 2 further includes:
[0116] Step S133, calculating the height of the target user and the horizontal distance from the terminal based on the ground viewing angle of the terminal camera and the ground viewing angle of the image.
[0117] Specifically, combining the calculation results of the above steps S131 and S132, the formula for calculating the height of the photographed target user object is:
[0118]
[0119] At this point, the formula for calculating the height of the target user being photographed from the horizontal distance of the camera is:
[0120]
[0121] Among them, θ3 and θ4 are the two longitudinal perspectives corresponding to the target user being photographed, and θ5 represents the horizontal perspective of the target user (such as Figure 7 As shown), the horizontal viewing angle of the target user relative to the terminal camera is calculated by the fixed parameters of the camera, and the vertical viewing angle of the target user is calculated by combining the pixel distance between the bottom of the target user and the bottom edge of the image in the image information of the target user captured by the terminal camera, and another ground viewing angle of the target user is calculated by the fixed parameters of the terminal camera and the distance between the head of the target user in the image and the bottom edge of the image. Wherein, sin is the sine trigonometric function, cos is the cosine trigonometric function, and tg is the tangent trigonometric function.
[0122] In summary, the initial height value h0 and the initial horizontal distance d0 of the target user can be calculated. Then the h value and d value in the subsequent set time period are calculated and compared to see if there are any changes, and it is detected whether the target user needs to be reminded to get up and exercise, so as to avoid long-term sitting and causing health problems of the lumbar and cervical spine.
[0123] In addition, in other embodiments of the present invention, the height of the target user and the distance from the terminal can also be obtained by other measurement and calculation methods, and the present invention does not impose any restrictions thereto. For example, the height of the target user and the horizontal distance from the terminal can be measured and calculated by ultrasonic waves, position sensors, etc.
[0124] In this embodiment, based on the perspective geometric relationship between the angle of the target user photographed by the fixed camera of the TV and the projection of the center of the camera, the height and distance of the target user photographed are converted into the ground viewing angle of the image using a related algorithm, and the height of the target user photographed and the horizontal distance from the camera are determined according to the calibrated known parameter values. If the user stands up and walks within the set sedentary reminder calculation time, the height and distance values obtained by the camera combined with the algorithm will definitely change. Based on this, it is possible to detect whether to remind the user to stand up and walk around and rest in time based on whether the height and distance values change during this time period, thereby realizing the sedentary reminder function.
[0125] Further, refer to Figure 5 The step S20 further includes:
[0126] Step S201, calculating the height difference of the target user in two adjacent position information and the horizontal distance difference from the terminal;
[0127] The two adjacent position information are the position information of the target user corresponding to two adjacent pictures in the collection sequence of the preset frequency;
[0128] Step S202, detecting whether the height difference and the horizontal distance difference are within a preset range;
[0129] Step S203: If yes, it is determined that the target user is in a non-moving state.
[0130] Specifically, in this embodiment, in order to further accurately determine whether the target user is moving, the TV collects the target user's location information at a preset frequency, and calculates the height difference and horizontal distance difference of the target user from the terminal of two adjacent location information collected at the preset frequency. When the calculated change is within a preset range, it is determined that the target user is in a non-moving state during this period. To a certain extent, by calculating the change of two adjacent location information of the target user to determine whether the user is moving, it can avoid the situation where the target user's slow movement and slightly smaller movements are missed.
[0131] Furthermore, step 30 of the above embodiment 1 further includes:
[0132] Step S301, if the change amount of the two adjacent position information exceeds the preset range;
[0133] Step S302: restart the timing to detect whether the relative changes between any two adjacent position information within the preset time period are within a preset range.
[0134] Specifically, in this embodiment, the television system determines the location information of the target user based on the target user image collected at a preset frequency, and when the change in the two adjacent location information is within a preset range, it is determined that the target user has not moved during this period. However, if the change in the two adjacent location information exceeds the preset range, it can be detected that the user has moved during this period; for example, taking the preset duration of 30 minutes and the preset frequency of 5 minutes as an example, when the change in the location information at 5 minutes and the location information initially collected does not exceed the preset range, it is determined that the target user has not moved within 0-5 minutes, and then it is calculated whether the change in the location information of the target user collected at the 10th minute and the location information of the target user collected at the 5th minute exceeds the preset range, and so on until the location information collected at the 30th minute is exceeded. If the change in the target user's location information and the target user's location information collected at the 25th minute does not exceed the preset range, it is determined that the user has not moved within the 30 minutes. At this time, the terminal prompts the user to avoid sitting for a long time and damaging their health; however, if the change in the target user's location information collected at the 20th minute and the target user's location information collected at the 15th minute exceeds the preset range, it means that the target user has moved and exercised within the 5 minutes of 15-20 minutes. Therefore, the TV system will restart the timing with the target user's location information at the 25th minute as the initial location information. That is to say, in this case, the period for detecting whether the user is exercising is the 25th to 55th minutes, and the user will be prompted to sit for a long time if and only if the change in the 6 adjacent two location information does not exceed the preset range.
[0135] In this embodiment, when the change amount of two adjacent position information exceeds the preset range, the timing is restarted to detect whether the change amount of the two adjacent position information within the preset time is within the preset range, and then the target user is prompted to sit for a long time. The user's sedentary behavior is prompted more intelligently and timely, avoiding the user's health being harmed by sitting for a long time.
[0136] In addition, based on any of the above embodiments, a fourth embodiment of a prompting method of the present invention is proposed. Specifically, in this embodiment, the terminal selects a television as an example. The television manufacturer pre-sets the maximum time limit for the user to maintain a posture in the television system when the television leaves the factory. When the user turns on the television and maintains a fixed posture in front of the television, the camera of the television starts to collect the position information of the user in front of the television according to the pre-set collection frequency. Specifically, the current position relationship between the user and the television is determined according to the user image information collected by the camera, and the position information of the user at the next time point is collected according to the collection frequency of the camera, and the overlap rate of the position information in the two adjacent user image information is detected. When the position overlap rate in any two adjacent user image information within the pre-set time length is within the preset range, it indicates that the user has not moved and has maintained the same posture during the period. Among them, the user's relative position information of the television can be calculated by the ground viewing angle of the television camera and the ground viewing angle of the user image information to obtain the user's relative position information of the television, wherein the position information includes the height of the user and the horizontal distance from the television. Furthermore, in this embodiment, if the user's position information relative to the TV at a certain acquisition time point changes within the preset time period, the current acquisition point is used as the timing starting point for the next preset time period. In this way, the user's exercise status can be judged based on the user's position information relative to the TV, and a user who has not exercised within the preset time period is reminded that long-term sitting is harmful to health.
[0137] Reference Figure 8 , an embodiment of the present invention provides a prompting device, the device comprising:
[0138] An image processing module 10 is used to collect image information of a target user and calculate location information of the target user based on the image information;
[0139] A detection module 20, used to detect whether the relative change between two adjacent position information is within a preset range and to detect whether the relative change between any two adjacent position information within a preset time period is within a preset range;
[0140] The prompt module 30 is used to issue prompt information.
[0141] In addition, the present invention also proposes a terminal device, including a memory, a processor, and a prompt program stored in the memory and executable on the processor, wherein the prompt program is configured to implement the steps of the prompt method as described in any of the above embodiments.
[0142] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a prompt program is stored. When the prompt program is executed by a processor, the following operations are implemented:
[0143] Obtaining the location information of the target user through the terminal according to a preset frequency;
[0144] Detect whether the relative change between two adjacent position information is within a preset range;
[0145] When the changes of the two adjacent position information within the preset time period are both within the preset range, the terminal gives a prompt.
[0146] Furthermore, when the prompt program is executed by the processor, the following operations are also implemented:
[0147] The step of obtaining the location information of the target user through the terminal according to the preset frequency includes:
[0148] The terminal receives a start instruction;
[0149] Capturing the image of the target user while starting the terminal;
[0150] The location information of the target user is obtained based on the image of the target user.
[0151] Furthermore, when the prompt program is executed by the processor, the following operations are also implemented:
[0152] The step of obtaining the location information of the target user based on the image of the target user further includes:
[0153] Acquire the ground information of the terminal camera, wherein the ground information includes: the vertical height of the terminal camera from the ground and the horizontal distance between the near-ground end of the image and the terminal camera;
[0154] The ground viewing angle of the terminal camera is calculated based on the ground information of the terminal camera.
[0155] Furthermore, when the prompt program is executed by the processor, the following operations are also implemented:
[0156] The step of obtaining the location information of the target user based on the image of the target user further includes:
[0157] Calculating the edge distance of the target user in the image, wherein the edge distance includes: the distance of the target user in the image from the top, bottom and left edge of the image;
[0158] The ground viewing angle of the image is calculated based on the edge distance.
[0159] Furthermore, when the prompt program is executed by the processor, the following operations are also implemented:
[0160] The step of obtaining the location information of the target user based on the image of the target user further includes:
[0161] The height of the target user and the horizontal distance from the terminal are calculated based on the ground viewing angle of the terminal camera and the ground viewing angle of the image.
[0162] Furthermore, when the prompt program is executed by the processor, the following operations are also implemented:
[0163] The step of detecting whether the relative change between two adjacent position information is within a preset range comprises:
[0164] Calculate the height difference of the target user in two adjacent position information and the horizontal distance difference from the terminal;
[0165] The two adjacent position information are the position information of the target user corresponding to two adjacent pictures in the collection sequence according to the preset frequency;
[0166] Detecting whether the height difference and the horizontal distance difference are within a preset range;
[0167] If yes, it is determined that the target user is in a non-moving state.
[0168] Furthermore, when the prompt program is executed by the processor, the following operations are also implemented:
[0169] When the relative change between any two adjacent pieces of position information within the preset time period is within a preset range, the terminal prompting step includes:
[0170] If the change in the two adjacent position information exceeds a preset range;
[0171] Then, the timing is restarted to detect whether the relative changes between any two adjacent position information within the preset time period are within the preset range.
[0172] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0173] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0174] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0175] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A prompting method, It is characterized in that include: Obtaining the location information of the target user at a preset frequency; Detecting whether a relative change between two adjacent position information is within a preset range, wherein the position information includes a height of the target user and a horizontal distance from the terminal; When the relative change between any two adjacent position information within a preset time period is within a preset range, the target user is prompted; The step of obtaining the location information of the target user at a preset frequency includes: The terminal receives a start instruction; Capturing the image of the target user while starting the terminal; Obtaining location information of the target user based on the image of the target user; Wherein, the step of obtaining the location information of the target user based on the image of the target user further includes: Acquire ground information of the terminal camera, wherein the ground information includes: a vertical height of the terminal camera from the ground and a horizontal distance between the near-ground end of the image and the terminal camera; Calculate the ground viewing angle of the terminal camera based on the ground information of the terminal camera; Specifically, calculate the two viewing angles θ of the terminal camera installation position 1 and θ 2 The formula is: in, H Indicates the vertical height of the camera from the ground. L Indicates the horizontal distance between the near-ground position of the captured image and the root position of the camera. f Indicates the focal length of the camera. l H Indicates the vertical height value of the camera CCD focal plane. f and l H are known fixed parameters, tg -1 is the inverse tangent trigonometric function; Calculating the edge distance of the target user in the image, wherein the edge distance includes: the distance of the target user in the image from the top, bottom and left edge of the image; Calculating the ground viewing angle of the image based on the edge distance; Specifically, the formula for calculating the two vertical viewing angles of the target user compared to the ground is: The formula for calculating the horizontal viewing angle corresponding to the target user being photographed is: Calculating the height of the target user and the horizontal distance from the terminal based on the ground viewing angle of the terminal camera and the ground viewing angle of the image; Specifically, the formula for calculating the height of the target user being photographed is: At this point, the formula for calculating the height of the target user being photographed from the horizontal distance of the camera is: in, sin is the sine trigonometric function, cos is the cosine trigonometric function, tg is the tangent trigonometric function.
2. The prompting method according to claim 1, It is characterized in that The step of detecting whether the relative change between two adjacent position information is within a preset range comprises: Calculate the height difference of the target user in two adjacent position information and the horizontal distance difference from the terminal; The two adjacent position information are the position information of the target user corresponding to two adjacent pictures in the collection sequence according to the preset frequency; Detecting whether the height difference and the horizontal distance difference are within a preset range; If yes, it is determined that the target user is in a non-moving state.
3. The prompting method according to claim 1, It is characterized in that When the relative change between any two adjacent pieces of position information within the preset time period is within a preset range, the terminal prompting step includes: If the change in the two adjacent position information exceeds a preset range; Then, the timing is restarted to detect whether the relative changes between any two adjacent position information within the preset time period are within the preset range.
4. A prompting device, It is characterized in that The device comprises: An image processing module, used to collect image information of a target user and calculate location information of the target user based on the image information; A detection module, used to detect whether the relative change between two adjacent position information is within a preset range and whether the relative change between any two adjacent position information within a preset time period is within a preset range; A prompt module, used for issuing prompt information; The step of obtaining the location information of the target user at a preset frequency includes: The terminal receives a start instruction; Capturing the image of the target user while starting the terminal; Obtaining location information of the target user based on the image of the target user; Wherein, the step of obtaining the location information of the target user based on the image of the target user further includes: Acquire ground information of the terminal camera, wherein the ground information includes: a vertical height of the terminal camera from the ground and a horizontal distance between the near-ground end of the image and the terminal camera; Calculate the ground viewing angle of the terminal camera based on the ground information of the terminal camera; Calculating the edge distance of the target user in the image, wherein the edge distance includes: the distance of the target user in the image from the top, bottom and left edge of the image; Calculating the ground viewing angle of the image based on the edge distance; Calculating the height of the target user and the horizontal distance from the terminal based on the ground viewing angle of the terminal camera and the ground viewing angle of the image; Specifically, calculate the two viewing angles θ of the terminal camera installation position 1 and θ 2 The formula is: in, H Indicates the vertical height of the camera from the ground. L Indicates the horizontal distance between the near-ground position of the captured image and the root position of the camera. f Indicates the focal length of the camera. l H Indicates the vertical height value of the camera CCD focal plane. f and l H are known fixed parameters, tg -1 is the inverse tangent trigonometric function; Calculating the edge distance of the target user in the image, wherein the edge distance includes: the distance of the target user in the image from the top, bottom and left edge of the image; Calculating the ground viewing angle of the image based on the edge distance; Specifically, the formula for calculating the two vertical viewing angles of the target user compared to the ground is: The formula for calculating the horizontal viewing angle corresponding to the target user being photographed is: Calculating the height of the target user and the horizontal distance from the terminal based on the ground viewing angle of the terminal camera and the ground viewing angle of the image; Specifically, the formula for calculating the height of the target user being photographed is: At this point, the formula for calculating the height of the target user being photographed from the horizontal distance of the camera is: in, sin is the sine trigonometric function, cos is the cosine trigonometric function, tg is the tangent trigonometric function.
5. A terminal device, It is characterized in that The method comprises a memory, a processor and a prompting program stored in the memory and executable on the processor, wherein the prompting program is configured to implement the steps of the prompting method according to any one of claims 1 to 3.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a prompting program, and when the prompting program is executed by a processor, the steps of the prompting method according to any one of claims 1 to 3 are implemented.
