Terminal device control method, device, equipment and readable storage medium
By obtaining the sleep parameters detected by the wearable device, determining whether the user is going to sleep, and sending a lock screen command to the terminal device after the user falls asleep, the problem of being unable to efficiently turn off multimedia playback in the prior art is solved, and efficient control of the terminal device during the user's sleep period is realized, and the efficiency of the device usage and power consumption management of the device is improved.
Patent Information
- Application Number
- CN202211715878.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-12-29
AI Technical Summary
The prior art cannot efficiently control the terminal device to turn off the multimedia playback function during the user's sleep period, resulting in the user's sleep quality being affected and the device's power consumption is increased.
By obtaining the sleep parameters detected by the wearable device, including the user's heart rate value and/or the wearable device's acceleration, it is determined whether the user is in a sleep state, and after confirming that the user falls asleep, the multimedia playback is stopped.
It realizes efficient control of the terminal device to turn off the multimedia function during the user's sleep period, improves the efficiency of the terminal device and reduces the power consumption of the device.
Smart Images

Figure CN116016767B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation control technology, and in particular provides a terminal device control method, device, equipment and readable storage medium. Background Art
[0002] In recent years, with the popularity of mobile phones and tablets, people use electronic products more and more frequently and for longer periods of time. Young people often continue to use mobile phones and tablets late at night due to work pressure. Some people even fall asleep, but their phones continue to play videos. In this case, it will not only affect the user's sleep quality, but also increase the power consumption of the phone.
[0003] There are two main solutions to the above problems: First, the mobile phone or tablet App will issue a reminder after a long time or late at night. This method is a weak reminder and will not automatically stop the playback when the user is asleep, and has no ability to control multimedia. Second, the front camera of the mobile phone or tablet is used to determine whether the user is watching. This method requires the camera to be turned on for a long time, which has high power consumption requirements and is not conducive to the battery life of electronic products. Summary of the invention
[0004] The purpose of the present application is to provide a terminal device control method, apparatus, device and storage medium, aiming to solve the existing problem that the existing technology cannot efficiently control the terminal device to turn off the multimedia playback function during the user's sleep period.
[0005] To achieve the above purpose, the technical solution adopted in this application is:
[0006] In a first aspect, the present application provides a terminal device control method, which includes: obtaining sleep parameters detected by a wearable device, the sleep parameters including a user's heart rate value and / or an acceleration of the wearable device; if it is determined based on the sleep parameters that the user has entered a sleep state, sending a lock screen instruction to the terminal device.
[0007] In one embodiment, if it is determined according to the sleep parameters that the user has entered a sleep state, before sending a lock screen instruction to the terminal device, the method also includes: obtaining a resting heart rate, where the resting heart rate is an average heart rate value of a human body in a sleep state; and determining whether the user has entered a sleep state based on the heart rate and the resting heart rate.
[0008] In one embodiment, before obtaining the resting heart rate, the method includes: obtaining a sample heart rate of the user during sleep; and calculating an average value of the sample heart rates to generate the resting heart rate.
[0009] In one embodiment, determining whether the user has entered a sleep state based on the heart rate and the resting heart rate includes: if the difference between the heart rate and the resting heart rate within a preset time period is within a preset range, determining that the user has entered a sleep state.
[0010] In one embodiment, determining whether the user has entered a sleep state based on the heart rate and the resting heart rate includes: when the difference between the heart rate and the resting heart rate within a preset time period is within a preset range, and the acceleration is greater than a preset threshold, determining that the user has entered a sleep state.
[0011] In one embodiment, the method further includes: acquiring an original acceleration signal, taking an absolute value and averaging the original acceleration signal to generate a mean sequence; smoothing the mean sequence to generate a smoothed sequence; and summing all sequence points in the smoothed sequence within a preset time window to obtain the acceleration.
[0012] In one embodiment, smoothing the mean sequence to generate a smoothed sequence includes: smoothing the mean sequence using a 10-point averaging algorithm to generate a smoothed sequence.
[0013] In the second aspect, the present application provides a terminal device control device, which includes: a parameter acquisition module, used to obtain sleep parameters detected by a wearable device, the sleep parameters including the user's heart rate value and / or the acceleration of the wearable device; a judgment control module, used to send a lock screen instruction to the terminal device if it is determined according to the sleep parameters that the user has entered a sleep state.
[0014] In a third aspect, the present application also provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, the terminal device control method of the first aspect described above is implemented.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the terminal device control method of the first aspect.
[0016] Beneficial effects of this application:
[0017] The present application provides a terminal device control method, apparatus, device and storage medium, which can efficiently control the terminal device to turn off multimedia functions during the user's sleep period.
[0018] Specifically, firstly, the sleep parameters detected by the wearable device are obtained to obtain the parameters necessary for judging the user's sleep state, wherein the sleep parameters include the user's heart rate value and / or the acceleration of the wearable device; then, whether the user has entered the sleep state is determined based on these parameters. If it is determined that the user has entered the sleep state based on the sleep parameters, a lock screen instruction is sent to the terminal device to drive the terminal device to lock the screen, thereby stopping multimedia playback and reducing power consumption.
[0019] It can be understood that the apparatus, terminal device and computer-readable storage medium that can implement the above method have the same beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0021] Figure 1 This is a flow chart of Embodiment 1 of the terminal device control method of the present application;
[0022] Figure 2 This is a flow chart of Embodiment 1 of the terminal device control method of the present application;
[0023] Figure 3 This is a flow chart of Embodiment 1 of the terminal device control method of the present application;
[0024] Figure 4 This is a flow chart of Embodiment 2 of the terminal device control method of the present application;
[0025] Figure 5 This is a schematic diagram of the X-axis original acceleration signal of the second embodiment of the terminal device control method of the present application;
[0026] Figure 6 This is a schematic diagram of the Y-axis original acceleration signal of the second embodiment of the terminal device control method of the present application;
[0027] Figure 7 This is a schematic diagram of the Z-axis original acceleration signal of the second embodiment of the terminal device control method of the present application;
[0028] Figure 8 This is a schematic diagram of the original X-axis acceleration signal after filtering in Embodiment 2 of the terminal device control method of this application;
[0029] Fig. 9 This is a schematic diagram of the Y-axis original acceleration signal after filtering in Embodiment 2 of the terminal device control method of the present application;
[0030] Fig.10 This is a schematic diagram of the filtered Z-axis original acceleration signal of the second embodiment of the terminal device control method of the present application;
[0031] Fig.11 This is a schematic diagram of an acceleration signal after taking the absolute value and averaging the original acceleration signal in Embodiment 2 of the terminal device control method of the present application;
[0032] Fig.12 This is a schematic diagram of an acceleration signal after 10-point averaging in Embodiment 2 of the terminal device control method of the present application;
[0033] Fig.13 This is a schematic diagram of the acceleration after summing up the 1-second window sequence points in the second embodiment of the terminal device control method of the present application;
[0034] Fig.14 This is a flow chart of Embodiment 3 of the terminal device control method of the present application;
[0035] Fig.15 This is a structural block diagram of an embodiment of a terminal device control device of the present application;
[0036] Fig.16 This is a structural block diagram of the terminal device of this application.
[0037] Among them, the reference numerals in the figure are:
[0038] DETAILED DESCRIPTION
[0039] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0040] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0041] In order to illustrate the technical solution described in this application, the following embodiments are used for illustration.
[0042] The terminal device control method provided in the embodiment of the present application can be executed on a wearable device (such as a watch), or on a terminal device (such as a mobile phone, computer, etc.) that is communicatively connected to the wearable device, or can be partially executed on the wearable device and partially executed on the terminal device.
[0043] The following introduces the terminal device control method provided in the embodiment of the present application by taking the terminal device control method that can be executed on the terminal device as an example.
[0044] Embodiment 1
[0045] See also Figure 1 , the terminal device control method provided in the embodiment of the present application includes:
[0046] Step S11, obtaining sleep parameters detected by the wearable device, wherein the sleep parameters include a heart rate value of the user and / or an acceleration of the wearable device.
[0047] In the application, the heart rate value can be detected by the PPG sensor on the wearable device. The PPG sensor uses the photoelectric volumetric pulse wave technique, using the green light emitted by the LED lamp to pass through the tissues and arterial veins in the skin, and is absorbed and reflected into the diode. The absorption of light by tissues such as muscles and bones is different from that of blood. Therefore, the light signal reflected or transmitted by the blood is used to detect the blood-related AC signal, thereby reflecting the human heart rate. In addition, the PPG sensor can work for a long time, with low power consumption and in silence, and continuously feedback the detected human heart rate, which is very suitable for unconscious scenarios when the user is asleep. The acceleration of the wearable device can be detected by the three-axis acceleration sensor installed in the device. The three-axis acceleration sensor can read the movement of the wearable device in the three-axis coordinate system of space.
[0048] After collecting the heart rate value and / or acceleration, the wearable device sends the heart rate value and / or acceleration to the terminal device.
[0049] Step S12: If it is determined according to the sleep parameters that the user has entered a sleep state, a screen lock instruction is sent to the terminal device.
[0050] If the processor of the terminal device determines that the user has entered a sleep state according to the sleep parameters, the processor of the terminal device sends a screen lock instruction to the display screen of the terminal device.
[0051] Wearable devices can send data to terminal devices by sending data protocol packets. The data protocol packet includes a packet header, a packet length, and command content. The APP installed on the terminal device parses the data protocol packet after receiving it. When the parsing result meets the protocol and the user is determined to have entered a sleep state based on the sleep parameters, the APP sends a lock screen command to the terminal device system to drive the phone to lock the screen. After the phone is locked, the audio and video files will stop playing, and the phone will automatically turn off the screen after a few seconds of locking the screen. The phone screen is the main component of the phone's power consumption, and timely turning off the screen can ensure that power is not wasted.
[0052] like Figure 2 As shown, in one embodiment, before sending a lock screen instruction to the terminal device if it is determined according to the sleep parameter that the user has entered a sleep state, the method further includes:
[0053] Step S21, obtaining a resting heart rate, where the resting heart rate is an average heart rate value of a human body in a sleeping state.
[0054] like Figure 3 As shown, in one embodiment, before obtaining the resting heart rate, the steps include:
[0055] Step S211, obtaining a sample heart rate of the user during sleep.
[0056] In the application, the user's sample heart rate during sleep is recorded for a preset period of time (e.g., 5 days). For example, the heart rate values between 3:00 and 5:00 a.m. are recorded for 5 days. During the test, the heart rate value can be sampled once every 15 minutes on average, and each test can last for 1 minute. In this way, a total of 40 heart rate values are tested in 5 days, and these 40 heart rate values are used as sample heart rates.
[0057] Step S212, calculating the average value of the sample heart rates to generate the resting heart rate.
[0058] In the application, the arithmetic mean method can be used to calculate the average value of the sample heart rate, that is, the 40 sample heart rates are summed and then divided by 40 to obtain the average value, and then the average value is used as the resting heart rate.
[0059] Step S22, determining whether the user has entered a sleeping state according to the heart rate and the resting heart rate.
[0060] In one embodiment, determining whether the user has entered a sleeping state according to the heart rate and the resting heart rate includes:
[0061] If the difference between the heart rate and the resting heart rate within the preset time period is within a preset range, it is determined that the user has entered a sleeping state.
[0062] In the application, when the user wears a smartwatch while watching a video on the phone, the PPG sensor will continuously detect the real-time human heart rate. When the difference between the real-time human heart rate and the resting heart rate (for example, 60 beats / minute) remains within a preset range (for example, within the range of ±2 beats / minute) and lasts for more than a preset time (for example, 5 minutes), the user is considered to have entered a sleep state. In other words, as long as the user's real-time human heart rate is between 58 beats / minute and 62 beats / minute within 5 minutes, the user can be considered to have entered a sleep state.
[0063] The embodiments of the present application can effectively control the terminal device to turn off multimedia functions during the user's sleep period.
[0064] Specifically, firstly, the sleep parameters detected by the wearable device are obtained to obtain the parameters necessary for judging the user's sleep state, wherein the sleep parameters include the user's heart rate value and / or the acceleration of the wearable device; then, whether the user has entered the sleep state is determined based on these parameters. If it is determined that the user has entered the sleep state based on the sleep parameters, a lock screen instruction is sent to the terminal device to drive the terminal device to lock the screen, thereby stopping multimedia playback, so that multimedia playback is automatically stopped after the user enters the sleep state, without the need for manual operation by the user, thereby improving the use efficiency of the terminal device and reducing the power consumption of the terminal device.
[0065] Embodiment 2
[0066] An embodiment of the present application provides a terminal device control method, including steps S11 to S12 in embodiment one. This embodiment is a further explanation of embodiment one. For details of the same or similar parts as embodiment one, please refer to the relevant description of embodiment one, which will not be repeated here.
[0067] In one embodiment, determining whether the user has entered a sleeping state according to the heart rate and the resting heart rate includes:
[0068] When the difference between the heart rate and the resting heart rate within a preset time period is within a preset range, and the acceleration is greater than a preset threshold, it is determined that the user has entered a sleeping state.
[0069] In the application, users often use mobile phones, tablets and other devices while sleeping in bed at night. If the acceleration is greater than the preset threshold, it means that the user is making a big movement, such as turning over, which may be an action before falling asleep. The difference between the heart rate and the resting heart rate during the preset time is within the preset range, which can be used to comprehensively judge whether the user has entered the sleep state.
[0070] In addition, the condition that the acceleration is greater than the preset threshold can be used as the condition for locking the screen. Even if the user is not asleep at this time, a simple turning over action can be used to lock the screen of the mobile phone or tablet computer. The user no longer needs to manually lock the screen, thereby improving the control efficiency of terminal devices such as mobile phones and tablet computers.
[0071] like Figure 4 As shown, in one embodiment, the method further includes:
[0072] Step S41, obtaining an original acceleration signal, taking an absolute value of the original acceleration signal and calculating an average value, and generating an average value sequence.
[0073] Figures 5 to 7 The three-axis original acceleration signals of the X-axis, Y-axis and Z-axis are respectively displayed. Before taking the absolute value and averaging the original acceleration signals to generate the mean value sequence, the original acceleration signals may be filtered to filter out noise signals. Figures 8 to 10 The three-axis original acceleration signals after filtering are shown respectively. In the application, one or more filters can be used for filtering, for example, a bandpass filter and an LSM filter can be used in sequence to improve the filtering effect.
[0074] Fig.11 The acceleration signal is displayed after taking the absolute value of the original acceleration signal and calculating the average. After filtering, the filtered original acceleration signal is taken and averaged to generate a mean sequence. For example, the filtered three-axis original acceleration signals are: X-axis -10, Y-axis -30, Z-axis -15, then the absolute value is taken and the average is calculated to obtain (|-12|+|-30|+|-15|) / 3=19.
[0075] Step S42, smoothing the mean sequence to generate a smoothed sequence.
[0076] In one embodiment, smoothing the mean sequence to generate a smoothed sequence includes: smoothing the mean sequence using a 10-point averaging algorithm to generate a smoothed sequence.
[0077] Fig.12The acceleration signal after 10-point averaging is shown. Smoothing can reduce the impact of sudden changes in individual signals on the accuracy of the overall data. The 10-point averaging algorithm is a more commonly used smoothing method. Specifically, ten points are used as a sliding window, and then the sliding process starts from the first ten sequence values of the mean sequence, and the mean of the first ten sequence values of the mean sequence is calculated, and the mean is used as the first sliding value. Then the sliding window slides forward one grid on the mean sequence, covering the second to eleventh values in the mean sequence, and then the mean of the second to eleventh values in the mean sequence is calculated, and the mean is used as the second sliding value, and so on, until the sliding window slides to the last sequence value covering the mean sequence, and the last sliding value is calculated. Finally, all sliding values are arranged in the order of calculation to generate a sliding sequence.
[0078] Step S43, summing up all sequence points in the smooth sequence within a preset time window to obtain the acceleration.
[0079] In the application, the preset time window can be set to 1 second. Within the 1-second event window, all sequence points in the smoothed sequence are summed to obtain the acceleration. Fig.13 The acceleration after summing up the sequence points in a 1-second window is displayed. This acceleration can then be compared with a preset threshold to determine whether the user has entered a sleep state.
[0080] The embodiments of the present application can effectively control the terminal device to turn off multimedia functions during the user's sleep period.
[0081] Specifically, firstly, the sleep parameters detected by the wearable device are obtained to obtain the parameters necessary for judging the user's sleep state, wherein the sleep parameters include the user's heart rate value and / or the acceleration of the wearable device; then, whether the user has entered the sleep state is determined based on these parameters. If it is determined that the user has entered the sleep state based on the sleep parameters, a lock screen instruction is sent to the terminal device to drive the terminal device to lock the screen, thereby stopping multimedia playback, so that multimedia playback is automatically stopped after the user enters the sleep state, without the need for manual operation by the user, thereby improving the use efficiency of the terminal device and reducing the power consumption of the terminal device.
[0082] Embodiment 3
[0083] An embodiment of the present application provides a terminal device control method, which is partially executed on a wearable device and partially executed on a terminal device.
[0084] like Fig.14 As shown, the steps performed on the wearable device include:
[0085] Step S141, obtaining sleep parameters detected by the wearable device, wherein the sleep parameters include a heart rate value of the user and / or an acceleration of the wearable device.
[0086] Step S142, determining whether the difference between the heart rate and the resting heart rate is within a preset range.
[0087] Step S143: when the determination is yes, it is determined that the difference between the heart rate and the resting heart rate is within a preset range for a preset time period.
[0088] In step S144, when the judgment is yes, it is determined that the sleep state has been entered.
[0089] In one embodiment, before determining that the sleep state has been entered, the method further includes:
[0090] It is determined whether the acceleration is greater than a preset threshold, and if it is determined to be yes, it is determined that the user has entered the sleep state.
[0091] Step S145, sending a screen lock instruction to the terminal device.
[0092] like Fig.14 As shown, the steps executed in the terminal device include:
[0093] Step S146, parsing the lock screen instruction.
[0094] Step S147, determine whether the analysis result satisfies the protocol.
[0095] Step S148: When the determination is yes, a screen lock instruction is sent to the mobile phone system.
[0096] The implementation methods, technical effects, etc. of the above steps S141 to S148 have been described in Example 1 and Example 2 and will not be repeated here.
[0097] The embodiments of the present application can effectively control the terminal device to turn off multimedia functions during the user's sleep period.
[0098] Specifically, first, the parameter acquisition module acquires the sleep parameters detected by the wearable device, thereby obtaining the parameters necessary to determine the user's sleep state, wherein the sleep parameters include the user's heart rate value and / or the acceleration of the wearable device; then, it is determined whether the user has entered a sleep state based on these parameters. If the judgment control module determines that the user has entered a sleep state based on the sleep parameters, a lock screen instruction is sent to the terminal device. The terminal device parses the lock screen instruction. When the parsing result satisfies the protocol, the terminal device sends a lock screen instruction to the mobile phone system, and then stops multimedia playback, thereby automatically stopping multimedia playback after the user enters a sleep state, without the need for manual operation by the user, thereby improving the use efficiency of the terminal device and reducing the power consumption of the terminal device.
[0099] Embodiment 4
[0100] Corresponding to the terminal device control method described in the above embodiment, Fig.15 The structure block diagram of the terminal device control device 150 provided in the embodiment of the present application is shown. The system can be a virtual appliance in the terminal device, which is run by the processor of the terminal device, or can be integrated into the terminal device itself. For the convenience of explanation, only the parts related to the embodiment of the present application are shown.
[0101] The terminal device control device 150 of the embodiment of the present application includes:
[0102] A parameter acquisition module 151 is used to acquire sleep parameters detected by a wearable device, wherein the sleep parameters include a heart rate value of a user and / or an acceleration of the wearable device;
[0103] The determination control module 152 is configured to send a screen lock instruction to the terminal device if it is determined according to the sleep parameters that the user has entered a sleep state.
[0104] The embodiments of the present application can effectively control the terminal device to turn off multimedia functions during the user's sleep period.
[0105] Specifically, first, the parameter acquisition module acquires the sleep parameters detected by the wearable device, thereby obtaining the parameters necessary for determining the user's sleep state, wherein the sleep parameters include the user's heart rate value and / or the acceleration of the wearable device; then, it is determined whether the user has entered a sleep state based on these parameters. If the determination control module determines that the user has entered a sleep state based on the sleep parameters, it sends a lock screen instruction to the terminal device to drive the terminal device to lock the screen, and then stop multimedia playback, thereby automatically stopping multimedia playback after the user enters a sleep state, without the need for manual operation by the user, thereby improving the use efficiency of the terminal device and reducing the power consumption of the terminal device.
[0106] Embodiment 5
[0107] like Fig.16 As shown, the present application also provides a terminal device 160, including a memory 161, a processor 162, and a computer program 163 stored in the memory and executable on the processor, for example. When the processor 162 executes the computer program 163, the steps in the above-mentioned terminal device control method embodiments are implemented, such as the method steps in Embodiment 1, Embodiment 2, and / or Embodiment 3. When the processor 162 executes the computer program 163, the functions of the modules in the above-mentioned device embodiments are implemented, such as the functions of the modules and units in Embodiment 4.
[0108] Exemplarily, the computer program 163 may be divided into one or more modules, which are stored in the memory 161 and executed by the processor 162 to complete the first, second, third and / or fourth embodiments of the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 163 in the terminal device 160. For example, the computer program 163 may be divided into a parameter acquisition module, a determination control module, etc. The specific functions of each module have been described in the above-mentioned fourth embodiment and will not be repeated here.
[0109] The terminal device 160 may be a receiving terminal device. The terminal device may include, but is not limited to, a memory 161 and a processor 162. Those skilled in the art will appreciate that Fig.16 It is only an example of the terminal device 160 and does not constitute a limitation of the terminal device 160. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0110] The memory 161 may be an internal storage unit of the terminal device 160, such as a hard disk or memory of the terminal device 160. The memory 161 may also be an external storage device of the terminal device 160, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 160. Further, the memory 161 may also include both an internal storage unit of the terminal device 160 and an external storage device. The memory 161 is used to store the computer program and other programs and data required by the terminal device. The memory 161 may also be used to temporarily store data that has been output or is to be output.
[0111] The processor 162 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0112] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0113] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0114] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0115] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0117] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0118] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0119] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A terminal device control method, characterized in that: The method comprises: Acquire a heart rate value of a user detected by a wearable device and an acceleration detected by the wearable device; According to the preset cycle and the preset detection duration, the user's sample heart rate during sleep is obtained; Calculate the average value of the sample heart rates to generate a resting heart rate; the resting heart rate is the average heart rate value of a human body in a sleeping state; When the difference between the heart rate value and the resting heart rate within the preset time period is within a preset range, and the acceleration is greater than a preset threshold, it is determined that the user has entered a sleeping state; When the user has entered a sleep state and the parsing result of the data protocol packet received by the APP installed on the terminal device from the wearable device satisfies the protocol, the APP installed on the terminal device sends a lock screen instruction to the system of the terminal device; Wherein, obtaining the acceleration detected by the wearable device includes: Acquire an original acceleration signal, take an absolute value of the original acceleration signal and calculate the average value to generate a mean value sequence; Smoothing the mean sequence to generate a smoothed sequence; All sequence points in the smooth sequence within a preset time window are summed to obtain the acceleration.
2. The method according to claim 1, characterized in that: Smoothing the mean sequence to generate a smoothed sequence includes: The mean sequence is smoothed using a 10-point average algorithm to generate a smoothed sequence.
3. A terminal device control device, characterized in that: include: A parameter acquisition module, used to acquire a heart rate value of a user detected by a wearable device and an acceleration detected by the wearable device; The parameter acquisition module is further used to obtain the sample heart rate of the user during the sleep period according to a preset cycle and a preset detection duration; Calculate the average value of the sample heart rates to generate a resting heart rate; the resting heart rate is the average heart rate value of a human body in a sleeping state; A determination control module, configured to determine that the user has entered a sleeping state when the difference between the heart rate value and the resting heart rate within a preset time period is within a preset range and the acceleration is greater than a preset threshold; The determination control module is further configured to, if it is determined according to the sleep parameter that the user has entered a sleep state, and the parsing result of the data protocol packet received by the APP installed on the terminal device from the wearable device satisfies the protocol, the APP installed on the terminal device sends a lock screen instruction to the system of the terminal device; Wherein, the parameter acquisition module is specifically used for: The original acceleration signal is obtained, and the absolute value and average of the original acceleration signal are taken to generate a mean sequence; the mean sequence is smoothed to generate a smoothed sequence; and all sequence points in the smoothed sequence within a preset time window are summed to obtain the acceleration.
4. A terminal device, characterized in that: The terminal device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor; When the processor executes the computer program, the terminal device control method according to claim 1 or 2 is implemented.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the terminal device control method according to claim 1 or 2 is implemented.
Citation Information
Patent Citations
Human body action modeling and recognizing method
CN104200234A
Method and equipment for locking intelligent terminal
CN110012168A
Sleep monitoring method, device and system and storage medium
CN113679339A