Equipment control method and device, electronic equipment and storage medium
By integrating detection modules in sleep-aid massage products, the user's physiological data is collected in real time and matched to the target physiological range, which solves the problem of low intelligence of existing products, achieves more accurate sleep state recognition and massage gear adjustment, and improves improve the user’s sleep quality.
Patent Information
- Application Number
- CN202411485023.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-24
AI Technical Summary
The existing sleep aid massage products are less intelligent, and cannot intelligently identify the user's sleep status and adjust the massage gear, resulting in poor sleep quality for users.
By integrating the detection module on the massage equipment, the user's physiological data is collected in real time, matched with the target physiological range corresponding to each sleep state, the user's sleep state is determined, and corresponding control instructions are sent to adjust the gear of the massage equipment.
Real -time collection of user physiological data, accurately identify sleep status and adjust the massage gear, and improve the user's sleep quality and comfort.
Smart Images

Figure CN119361116A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a device control method, device, electronic device and storage medium. Background Art
[0002] In recent years, the global sleep market has expanded rapidly, and sleep problems caused by urbanization have become increasingly prominent. People are paying more and more attention to sleep quality, and massage products with sleep-aiding effects have gradually come into people's view.
[0003] Most of the sleep-aiding massage products on the market currently use fixed modes for massage, and the user can adjust the massage intensity and frequency by himself. Although some products can adjust the gear of the massage product by collecting the user's physiological data, their intelligence level is relatively low. Therefore, it is particularly important to realize intelligent recognition of the user's sleep state and intelligently adjust the gear of the massage device accordingly. Summary of the invention
[0004] The present invention provides a device control method, an apparatus, an electronic device and a storage medium, so as to judge the sleep state of a user by collecting the physiological data of the user, and adjust the massage level of the massage device accordingly.
[0005] According to one aspect of the present invention, there is provided a device control method, comprising:
[0006] Acquire first physiological data and a first sleep state, wherein the first physiological data is data collected by a detection module on a first massage device;
[0007] determining a second sleep state and a target physiological range corresponding to the second sleep state, wherein the second sleep state is a sleep state subsequent to the first sleep state in a sleep pattern;
[0008] Matching the first physiological data with the target physiological range to obtain a matching result;
[0009] When the matching result indicates that the first physiological data is within the target physiological range, determining that the sleep state corresponding to the first physiological data is the second sleep state;
[0010] A control instruction corresponding to the second sleep state is sent to the first massage device, wherein the control instruction instructs the first massage device to operate according to the corresponding gear.
[0011] According to another aspect of the present invention, there is provided a device control apparatus, comprising:
[0012] An acquisition module, used for acquiring first physiological data and a first sleep state, wherein the first physiological data is data collected by a detection module on a first massage device;
[0013] A first determination module is used to determine a second sleep state and a target physiological range corresponding to the second sleep state, wherein the second sleep state is a sleep state located after the first sleep state in a sleep pattern;
[0014] A matching module, used for matching the first physiological data with the target physiological range to obtain a matching result;
[0015] a second determining module, configured to determine that the sleep state corresponding to the first physiological data is the second sleep state when the matching result indicates that the first physiological data is within the target physiological range;
[0016] The control module is used to send a control instruction corresponding to the second sleep state to the first massage device, wherein the control instruction instructs the first massage device to work according to the corresponding gear position.
[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device control method described in any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device control method described in any embodiment of the present invention when executed.
[0022] The technical solution of the embodiment of the present invention collects the physiological data of the user through the detection module on the massage device, matches the acquired physiological data with the target physiological range corresponding to each sleep state, determines the sleep state of the user, sends corresponding control instructions to the massage device, and adjusts the gear of the massage device according to the control instructions. By collecting the physiological data of the user in real time, this method reduces the problem of low intelligence of the massage device caused by improper gear adjustment, helps the user to obtain a more comfortable sleep experience, and improves the sleep quality of the user.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 is a flow chart of a device control method provided according to Embodiment 1 of the present invention;
[0026] Figure 2A is a flow chart of a method for setting a numerical value correction provided according to a second embodiment of the present invention;
[0027] Figure 2B is a principle diagram of a setting value correction method provided according to Embodiment 2 of the present invention;
[0028] Figure 3 is a structural schematic diagram of a device control apparatus provided according to Embodiment 3 of the present invention;
[0029] Figure 4 It is a block diagram of an electronic device provided according to a fourth embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of relevant laws and regulations.
[0033] Embodiment 1
[0034] Figure 1 A flow chart of a device control method is provided for the first embodiment of the present invention. This embodiment can be applied to collecting physiological data of a user to determine the user's sleep state, and adjusting the massage gear of a massage device according to the sleep state. The method can be executed by a device control device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. The electronic device can be various forms of computers or massage devices. Figure 1 As shown, the method includes:
[0035] S110, obtaining first physiological data and a first sleep state, where the first physiological data is data collected by a detection module on a first massage device.
[0036] In this embodiment, physiological data can be understood as various physiological parameters related to the physiological state of the human body, including movements, heart rate, respiratory rate, etc. Physiological data can be collected through various monitoring devices, such as a physiological monitoring module integrated with a piezoelectric sensor. The first physiological data can be understood as physiological data obtained by collecting multiple physiological states of the user at the current moment. The first physiological data is data collected in real time. The sleep state can be understood as a physiological state of the human body when resting, such as an awake state, a light sleep state, and a deep sleep state. The first sleep state can be understood as the sleep state of the user at the current moment. The massage device can be understood as a tool that provides massage relaxation, such as a massage mattress, a massage pillow, a massage chair, etc. The first massage device can be understood as a massage device used by the user. The detection module can be understood as a module integrated on the first massage device for real-time collection of human physiological data.
[0037] Specifically, the detection module integrated in the first massage device collects the first physiological data of the user at the current moment or for a set duration, and the sleep state of the user before the detection module collects the first physiological data of the user is used as the first sleep state.
[0038] Exemplarily, the detection module integrated in the first massage device is a piezoelectric sensor, which collects the user's current heart rate and respiratory rate through the piezoelectric sensor to obtain the first physiological data. The first sleep state of the user at the current moment can be one of the awake state, the light sleep state and the deep sleep state. For example, if the user has just started using the first massage device at this moment, the first sleep state at this moment is the awake state.
[0039] S120: Determine a second sleep state and a target physiological range corresponding to the second sleep state, wherein the second sleep state is a sleep state that is located after the first sleep state in a sleep pattern.
[0040] In this embodiment, the second sleep state can be understood as the next sleep state entered by the user after the first sleep state according to the sleep rule. The second sleep state is a sleep state different from the first sleep state. The sleep rule can be understood as a pattern of human body in terms of sleep. For example, from awake state to light sleep state and then to deep sleep state is a sleep rule. The target physiological range can be understood as a physiological range based on various types of physiological data. Each sleep state corresponds to a different target physiological range. The target physiological range can be used to determine the user's sleep state at a certain moment.
[0041] Specifically, after the user uses the first massage device for a period of time, following the sleeping rules, the user will enter a sleeping state after the first sleeping state, that is, the second sleeping state. The target physiological range corresponding to the second sleeping state is found from the set target physiological range.
[0042] Exemplarily, after the user uses the first massage device for a period of time, he enters the second sleep state. For example, if the user's first sleep state is a wakeful state, the second sleep state may be a light sleep state. The target physiological range may include target physiological ranges corresponding to different types of physiological data, such as a target physiological range for heart rate, a target physiological range for respiratory rate, or a target physiological range for movement. Then, the target physiological ranges corresponding to different types of physiological data in the light sleep state may be determined.
[0043] S130: Match the first physiological data with the target physiological range to obtain a matching result.
[0044] Specifically, according to the target physiological range corresponding to the second sleep state, it is determined whether the first physiological data acquired in S110 is within the target physiological range to obtain a matching result.
[0045] Exemplarily, according to the target physiological range corresponding to the second sleep state, it is determined whether each different type of physiological data in the first physiological data matches the target physiological range corresponding to each different type of physiological data. For example, if the first sleep state is a wakeful state and the second sleep state is a light sleep state, it is determined whether the user's heart rate, breathing rate and / or movement match the target physiological range of the heart rate, breathing rate and / or movement corresponding to the light sleep state, and a matching result is obtained.
[0046] S140: When the matching result indicates that the first physiological data is within the target physiological range, determine that the sleep state corresponding to the first physiological data is the second sleep state.
[0047] Specifically, according to the matching result, if the user's first physiological data at the current moment is within the target physiological range corresponding to the second sleep state, it means that the user's sleep state is already the second sleep state. If it does not match, it means that the user's sleep state at the current moment is still the first sleep state.
[0048] Exemplarily, according to the target physiological range of heart rate and the target physiological range of breathing rate corresponding to the second sleep state, if the heart rate and breathing rate of the first physiological data are respectively within the target physiological range of heart rate and breathing rate corresponding to the second sleep state, the sleep state of the user at the current moment is determined to be the second sleep state. For example, if the first sleep state is the awake state and the second sleep state is the light sleep state, when the heart rate and breathing rate of the first physiological data are respectively within the target physiological range of heart rate and breathing rate corresponding to the light sleep state, it means that the user has entered the light sleep state at the current moment, otherwise the user is still awake.
[0049] S150. Sending a control instruction corresponding to the second sleep state to the first massage device, wherein the control instruction instructs the first massage device to operate according to the corresponding gear position.
[0050] Specifically, when the user's current sleep state is the second sleep state, a control instruction corresponding to the second sleep state is sent to the first massage device, and the control instruction adjusts the gear of the first massage device, and adjusts the gear corresponding to the first sleep state to the gear corresponding to the second sleep state. Then, the first physiological data is continuously collected, and the user's sleep state is determined in the same way, and the gear corresponding to the first massage device is adjusted according to the sleep state. The first massage device may include multiple different gears, and each gear has a different massage intensity and / or massage frequency.
[0051] For example, if the first sleep state is the awake state and the second sleep state is the light sleep state, when it is determined that the user's sleep state at the current moment is the light sleep state, a control instruction for adjusting the gear is sent to the first massage device, and the control instruction adjusts the gear of the first massage device to the gear corresponding to the light sleep state. Compared with the awake state, the massage intensity and / or massage frequency of the gear corresponding to the light sleep state are smaller. Then continue to collect the first physiological data, and judge the user's sleep state according to the same method, including the awake state, the light sleep state and the deep sleep state, and adjust the different gears corresponding to the first massage device according to different sleep states.
[0052] The technical solution of the embodiment of the present invention collects the physiological data of the user through the detection module on the massage device, matches the acquired physiological data with the target physiological range corresponding to each sleep state, determines the sleep state of the user, sends corresponding control instructions to the massage device, and adjusts the gear of the massage device according to the control instructions. By collecting the physiological data of the user in real time, this method reduces the problem of low intelligence of the massage device caused by improper gear adjustment, helps the user to obtain a more comfortable sleep experience, and improves the sleep quality of the user.
[0053] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.
[0054] In one embodiment, the obtaining of the first physiological data includes: obtaining multiple first physiological data within a set time period; correspondingly, matching the first physiological data with the target physiological range to obtain a matching result includes: determining a first physiological mean of multiple first physiological data; determining whether the first physiological mean is within the target physiological range; when the first physiological mean is within the target physiological range, determining that the matching result indicates that the first physiological data is within the target physiological range.
[0055] In this embodiment, the first physiological mean value can be understood as the mean value of a plurality of first physiological data of the user within a certain set time period.
[0056] Specifically, a plurality of first physiological data of the user within a set time period is obtained through the detection module, wherein the first physiological data includes different types of physiological data. The first physiological means of different types of first physiological data are obtained by averaging the multiple first physiological data of different types. The first physiological means of different types are compared with their corresponding target physiological ranges of different types to determine whether the first physiological means are within the target physiological range. If the first physiological mean is within the target physiological range, it can be determined that the first physiological data is within the target physiological range.
[0057] Optionally, the first physiological data includes heart rate and respiratory rate; the target physiological range includes a target heart rate range and a target respiratory rate range; determining the mean of multiple first physiological data includes: determining a first mean of multiple heart rates; determining a second mean of multiple respiratory rates; determining whether the mean is within the target physiological range includes: determining whether the first mean is within the target heart rate range, determining whether the second mean is within the target respiratory rate range, and the mean being within the target physiological range includes the first mean being within the target heart rate range, and the second mean being within the target respiratory rate range.
[0058] In this embodiment, the target heart rate range can be understood as the physiological range for heart rate in the target physiological range, and the target heart rate range is related to the heart rate in the physiological data. The target respiratory rate range can be understood as the physiological range for respiratory rate in the target physiological range, and the target respiratory rate range is related to the respiratory rate in the physiological data. The first mean can be understood as the mean of multiple heart rates in the first physiological data within a certain set time period. The second mean can be understood as the mean of multiple respiratory rates in the first physiological data within a certain set time period.
[0059] Specifically, the first physiological data includes heart rate and respiratory rate. Similarly, the target physiological range also includes a target heart rate range and a target respiratory rate range. The detection module obtains multiple heart rates within a set time period, and the average thereof is the first mean. Similarly, the average of multiple respiratory rates within the set time period is the second mean. It is determined whether the first mean corresponding to the heart rate is within the target heart rate range, and it is determined whether the second mean corresponding to the respiratory rate is within the target respiratory rate range. When both the first mean and the second mean are within the corresponding target heart rate range and target respiratory rate range, it means that the mean of the first physiological data is within the target physiological range.
[0060] Exemplarily, the first physiological data includes heart rate H and respiratory rate B, and the target physiological range also includes a target heart rate range and a target respiratory rate range. The first mean μH is averaged over a certain set time period of the user, and the second mean μB is averaged over a certain set time period of the user. It is determined whether the first mean μH and the second mean μB are both within the corresponding target heart rate range and target respiratory rate range. If both are satisfied, it is considered that the mean of the first physiological data is within the target physiological range.
[0061] In one embodiment, the target physiological range includes a physiological range centered on a second physiological mean, and the interval size of the target physiological range is determined based on the product of a set value and a physiological standard deviation. The second physiological mean and the physiological standard deviation are respectively the mean and standard deviation determined based on second physiological data, and the second physiological data is data collected by a detection module on the second massage device.
[0062] In this embodiment, the second physiological data can be understood as collecting multiple physiological states of the subject in multiple sleep states, and obtaining multiple physiological data of the subject in multiple sleep states. The second physiological data is real-time collected data, and there is no necessary connection between the second physiological data and the first physiological data. The second physiological mean can be understood as the mean of multiple second physiological data of the subject in a certain period of time, and there is no necessary connection between the second physiological mean and the first physiological mean. The set value can be understood as a coefficient that links the second physiological mean and the physiological standard deviation. For example, the multiple of the product of the set value and the physiological standard deviation can be used as the interval size of the target physiological range. The coefficient is related to the user's personal preference. The physiological standard deviation can be understood as the standard deviation of multiple second physiological data of the subject within a certain set time. The second massage device can be understood as a massage device for the subject to use, and the first massage device and the second massage device must be massage devices of the same type or model. The second massage device can include multiple different gears, and the massage intensity and / or massage frequency of each gear are different. The subject can be understood as an individual who accepts data collection during the experiment.
[0063] Specifically, a plurality of second physiological data of the subject within a set time period is obtained through the detection module, wherein the second physiological data includes different types of physiological data. The mean and standard deviation of the plurality of second physiological data of different types are respectively calculated to obtain the second physiological mean and physiological standard deviation of the different types of second physiological data. The standard deviation of the different types of second physiological data is multiplied by the corresponding set value respectively, and the multiple of the product is used as the interval size of the different types of target physiological ranges. Finally, the second physiological mean of the different types of second physiological data is taken as the center, and the target physiological range is formed in combination with the interval size.
[0064] Exemplarily, the second physiological data includes heart rate and respiratory rate, and the target physiological range also includes a target heart rate range and a target respiratory rate range. The average μH of multiple heart rates of the subject within a set time period is calculated. R and standard deviation σH R , calculate the average value μB of multiple breathing rates within a set time R and standard deviation σB R Multiply the standard deviation of heart rate and respiratory rate by the corresponding set value to obtain the interval size k of the target heart rate range and target respiratory rate range. x σH R and k y σB R . Taking the heart rate mean μH R and the mean respiratory rate μB R Centered by interval size K x σH R and K y σB R, get the target heart rate range μH R ±k x σH R and target respiratory rate range μB R ±k y σB R . Where k x and k y Set initial values for the target physiological range.
[0065] In one embodiment, the device control method further includes: obtaining an adjustment instruction for the gear position corresponding to the control instruction through a human-computer interaction interface; and adjusting the gear position corresponding to the control instruction.
[0066] In this embodiment, the human-computer interaction interface is a medium for information exchange between people and computers, and can provide user settings, status and feedback functions. The human-computer interaction interface may include input devices and output devices. The human-computer interaction interface can be integrated on various smart devices other than sleep-aid massage devices, including mobile phones, tablet computers, etc.; or integrated on massage devices.
[0067] Specifically, the gears of the first massage device corresponding to a plurality of sleep states are set for the user through the human-computer interaction interface. When an adjustment instruction corresponding to the gear is obtained, the gear of the first massage device is adjusted according to the adjustment instruction.
[0068] Exemplarily, when the user uses the first massage device, the human-computer interaction interface will display the current massage gear and an overview of the human sleep state. Through the human-computer interaction interface, the user can set the massage gear and sleep monitoring sensitivity according to personal preferences. The sleep monitoring sensitivity is an indicator of the quality of the user's sleep. Through the human-computer interaction interface, the gear of the first massage device corresponding to the awake state, light sleep state and deep sleep state is set for the user. When an adjustment instruction corresponding to a certain sleep state is obtained, the gear of the first massage device is adjusted to the gear corresponding to the sleep state through the human-computer interaction interface.
[0069] Embodiment 2
[0070] Figure 2A This is a flow chart of a method for setting a numerical value correction provided by Embodiment 2 of the present invention. This embodiment expands the target physiological range in the above embodiment. Figure 2A As shown, the method includes:
[0071] S210. When the first sleep state is a light sleep state, determine whether a strength adjustment instruction is obtained, where the strength adjustment instruction includes an instruction for adjusting the massage strength of the first massage device.
[0072] In this embodiment, the force adjustment instruction is an instruction for controlling the gear size of the massage device to adapt to the needs of the human body in different sleeping states.
[0073] Specifically, when the first sleep state is a light sleep state, it is determined whether the user triggers the strength adjustment instruction through the human-computer interaction interface. If triggered, it means that the user's sleep state is not a light sleep state, but a wakeful state, otherwise the user's sleep state is a light sleep state.
[0074] S220: If yes, calibrate the set value of the target physiological range corresponding to the first sleep state.
[0075] Specifically, if the first massage device receives a strength adjustment instruction, it means that the set value corresponding to the first sleep state of the user is too large, and then the set value of the target physiological range corresponding to the first sleep state at this time is corrected.
[0076] For example, when the first massage device receives a strength adjustment instruction, if the strength adjustment instruction indicates that the massage strength of the first massage device is adjusted by the user, the set value k of the target physiological range corresponding to the light sleep state is set to x and k y Adjust the corrected light sleep state to obtain the set values k1 and k2. The corrected light sleep state target physiological range is μH R ±k1σH R and μB R ±k2σB R .
[0077] S230, setting the first sleep state to the awake state, returning to continue acquiring the first physiological data, and matching the first physiological data with the target physiological range after correcting the set value, to determine whether the sleep state corresponding to the first physiological data is the second sleep state.
[0078] Specifically, after receiving the strength adjustment instruction, it means that the user has not entered the light sleep state at this time, and the first sleep state at this time is set to the awake state. Then, the first physiological data is continuously acquired through the detection module on the first massage device, and the first physiological data is matched with the target physiological range corrected in S220. Until the first physiological data is in the target physiological range of the light sleep state after correction, the sleep state at this time is the second sleep state.
[0079] Exemplarily, the first sleep state at the current moment is set to the awake state, and the heart rate and respiratory rate at the current moment are obtained through the detection module to determine whether the heart rate and respiratory rate are within the corrected target heart rate range and target respiratory rate range. Until the heart rate and respiratory rate at the current moment match the corresponding target physiological ranges, the sleep state at this time changes from the awake state of the first sleep state to the light sleep state of the second sleep state.
[0080] The technical solution of the embodiment of the present invention corrects the set value of the target physiological range in each sleep state by judging whether the massage device has obtained the force adjustment instruction. According to the user's personal preferences, personalized sleep state judgment is achieved for different users, making it more accurate to adjust the gear of the massage device according to the sleep state, thereby meeting the massage needs of different users.
[0081] Optionally, when the first sleep state is a deep sleep state, determine whether a massage start instruction is obtained, the massage start instruction including an instruction to control the first massage device to perform massage; if so, correct the set value of the target physiological range corresponding to the first sleep state; set the first sleep state to a light sleep state, return to continue to obtain the first physiological data, and match the first physiological data with the target physiological range after correcting the set value, to determine whether the sleep state corresponding to the first physiological data is the second sleep state.
[0082] In this embodiment, the massage start instruction is an instruction for controlling whether the massage device starts massage.
[0083] Specifically, when the first sleep state is a deep sleep state, determine whether the user triggers the massage start instruction through the human-computer interaction interface. If triggered, it means that the user's sleep state is not a deep sleep state, but a light sleep state. If the first massage device receives the massage start instruction, it means that the set value corresponding to the user's first sleep state is too large, so the set value in the target physiological range corresponding to the first sleep state at this time is corrected. When the first massage device receives the massage start instruction, it means that the user is not in a deep sleep state at this time, but a light sleep state, so the first sleep state is set to a light sleep state. Then, the first physiological data continues to be acquired through the detection module on the first massage device, and the first physiological data is matched with the corrected target physiological range. Until the first physiological data is in the target physiological range of the corrected deep sleep state, the sleep state at this time is the second sleep state.
[0084] For example, when the first massage device receives a massage start instruction, if the massage start instruction indicates that the first massage device is turned on by the user, the set value k of the target physiological range corresponding to the deep sleep state is set to x and k yAdjust to get the target physiological range μH corresponding to the deep sleep state after correction R ±k3σH R and μB R ±k4σB R The first sleep state at the current moment is set to the light sleep state, and the heart rate and breathing rate at the current moment are obtained through the detection module to determine whether the heart rate and breathing rate are within the corrected target heart rate range and target breathing rate range. Until the heart rate and breathing rate at the current moment match the corresponding target physiological ranges, the sleep state at this time changes from the light sleep state of the first sleep state to the deep sleep state of the second sleep state.
[0085] like Figure 2B It is a schematic diagram of a setting value correction method provided according to the second embodiment of the present invention, and the schematic diagram includes corrections to the setting values of the target physiological range of the light sleep state and the setting values of the target physiological range of the deep sleep state. Initially, the default sleep state is the awake state, and the first massage device is controlled to massage. The first physiological data is used to determine whether the user has entered a light sleep state, thereby realizing the judgment of whether the user has entered a light sleep state. If the force is reduced, that is, if the user is in a light sleep state, the massage gear is adjusted down. At this time, if the user sends a force adjustment instruction through the human-computer interaction interface and increases the gear, it means that the judgment is wrong, and the user has not entered a light sleep state at this time. Based on this, the setting value corresponding to the light sleep state can be corrected.
[0086] Then determine whether the user's sleep state has entered a deep sleep state. If so, turn off the massage device. At this time, if the user sends a massage start instruction through the human-computer interaction interface and turns on the massage device, it means that the judgment is wrong and the user has not entered a deep sleep state at this time. Based on this, the set value corresponding to the deep sleep state can be corrected.
[0087] Embodiment 3
[0088] Figure 3 This is a schematic diagram of the structure of a device control device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0089] An acquisition module 310 is used to acquire first physiological data and a first sleep state, wherein the first physiological data is data collected by a detection module on a first massage device;
[0090] A first determination module 320 is used to determine a second sleep state and a target physiological range corresponding to the second sleep state, wherein the second sleep state is a sleep state after the first sleep state in the sleep pattern;
[0091] A matching module 330, configured to match the first physiological data with the target physiological range to obtain a matching result;
[0092] A second determination module 340 is configured to determine that the sleep state corresponding to the first physiological data is the second sleep state when the matching result indicates that the first physiological data is within the target physiological range;
[0093] The control module 350 is used to send a control instruction corresponding to the second sleep state to the first massage device, and the control instruction instructs the first massage device to work according to the corresponding gear.
[0094] The device control device provided by the present invention acquires the physiological data of the user collected by the detection module on the massage device through the acquisition module, matches the acquired physiological data with the target physiological range corresponding to each sleep state through the first determination module, the matching module and the second determination module, determines the sleep state of the user, and sends corresponding control instructions to the massage device through the control module, and adjusts the gear of the massage device according to the control instructions. The real-time collection of the user's physiological data is completed, the problem of low intelligence of the massage device caused by improper gear adjustment is reduced, and the user is helped to obtain a more comfortable sleep experience and improve the sleep quality of the user.
[0095] In one embodiment, the acquisition module 310 includes:
[0096] Acquire multiple first physiological data within a set time period; accordingly, the matching module 330 includes:
[0097] a mean value determining unit, configured to determine a first physiological mean value of a plurality of the first physiological data;
[0098] a range determination unit, configured to determine whether the first physiological mean is within the target physiological range;
[0099] An indication unit is used to determine that the matching result indicates that the first physiological data is within the target physiological range when the first physiological mean is within the target physiological range.
[0100] In one embodiment, the first physiological data includes heart rate and respiratory rate; the target physiological range includes a target heart rate range and a target respiratory rate range;
[0101] The mean determination unit is specifically used for:
[0102] determining a first mean of a plurality of said heart rates;
[0103] determining a second mean of a plurality of said respiratory rates;
[0104] Determining whether the mean value is within the target physiological range includes:
[0105] Determine whether the first mean is within the target heart rate range, determine whether the second mean is within the target respiratory rate range, and the mean being within the target physiological range includes the first mean being within the target heart rate range and the second mean being within the target respiratory rate range.
[0106] In one embodiment, the target physiological range includes a physiological range centered on a second physiological mean, and the interval size of the target physiological range is determined based on the product of a set value and a physiological standard deviation. The second physiological mean and the physiological standard deviation are respectively the mean and standard deviation determined based on second physiological data, and the second physiological data is data collected by a detection module on the second massage device.
[0107] In one embodiment, the device control apparatus further includes a first correction module, which is used to:
[0108] In the case where the first sleep state is a light sleep state, determining whether a strength adjustment instruction is obtained, the strength adjustment instruction including an instruction for adjusting the massage strength of the first massage device;
[0109] If so, correcting the set value of the target physiological range corresponding to the first sleep state;
[0110] The first sleep state is set to the awake state, and the first physiological data is returned to continue to be acquired, and the first physiological data is matched with the target physiological range after the set value is corrected to determine whether the sleep state corresponding to the first physiological data is the second sleep state.
[0111] In one embodiment, the device control apparatus further includes a second correction module, which is used to:
[0112] When the first sleep state is a deep sleep state, determining whether a massage start instruction is obtained, wherein the massage start instruction includes an instruction for controlling the first massage device to perform massage;
[0113] If so, correcting the set value of the target physiological range corresponding to the first sleep state;
[0114] The first sleep state is set to a light sleep state, and the first physiological data is returned to continue to be acquired, and the first physiological data is matched with the target physiological range after the set value is corrected to determine whether the sleep state corresponding to the first physiological data is the second sleep state.
[0115] In one embodiment, the equipment control device further includes a regulating module, which is used to:
[0116] Obtaining an adjustment instruction for the gear position corresponding to the control instruction through a human-computer interaction interface;
[0117] Adjust the gear position corresponding to the control instruction.
[0118] The equipment control device provided in the embodiment of the present invention can execute the file storage method provided in any embodiment of the present invention, completes the storage of files through the mutual cooperation and collaboration between the modules, and has the functional modules and beneficial effects corresponding to the execution method.
[0119] Embodiment 4
[0120] According to an embodiment of the present invention, the present invention also provides an electronic device and a computer-readable storage medium.
[0121] Figure 4 It is a block diagram of an electronic device provided according to Embodiment 4 of the present invention, and the electronic device can implement the device control method described in the embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0122] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0123] A number of components in the electronic device are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0124] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 performs the various methods and processes described above, such as a device control method.
[0125] In some embodiments, the device control method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the device control method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to perform the device control method in any other appropriate manner (e.g., by means of firmware).
[0126] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0127] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0128] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0129] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0130] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0131] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0132] The technical solution of the embodiment of the present invention is to collect the physiological data of the user by using a device control method, apparatus, electronic device and storage medium, match the acquired physiological data with the target physiological range corresponding to each sleep state, determine the sleep state of the user, send corresponding control instructions to the massage device, and adjust the gear of the massage device according to the control instructions. By collecting the physiological data of the user in real time, the method reduces the problem of low intelligence of the massage device caused by improper gear adjustment, helps the user to obtain a more comfortable sleep experience, and improves the sleep quality of the user.
[0133] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0134] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A device control method, characterized in that: include: Acquire first physiological data and a first sleep state, wherein the first physiological data is data collected by a detection module on a first massage device; determining a second sleep state and a target physiological range corresponding to the second sleep state, wherein the second sleep state is a sleep state subsequent to the first sleep state in a sleep pattern; Matching the first physiological data with the target physiological range to obtain a matching result; When the matching result indicates that the first physiological data is within the target physiological range, determining that the sleep state corresponding to the first physiological data is the second sleep state; A control instruction corresponding to the second sleep state is sent to the first massage device, wherein the control instruction instructs the first massage device to operate according to the corresponding gear.
2. The method according to claim 1, characterized in that: The obtaining of the first physiological data comprises: Acquiring a plurality of first physiological data within a set time period; correspondingly, matching the first physiological data with the target physiological range to obtain a matching result includes: determining a first physiological mean of a plurality of the first physiological data; determining whether the first physiological mean is within the target physiological range; When the first physiological mean is within the target physiological range, determining the matching result indicates that the first physiological data is within the target physiological range.
3. The method according to claim 2, characterized in that The first physiological data includes heart rate and respiratory rate; the target physiological range includes a target heart rate range and a target respiratory rate range; The determining the mean of the plurality of the first physiological data comprises: determining a first mean of a plurality of said heart rates; determining a second mean of a plurality of said respiratory rates; Determining whether the mean value is within the target physiological range includes: Determine whether the first mean is within the target heart rate range, determine whether the second mean is within the target respiratory rate range, and the mean being within the target physiological range includes the first mean being within the target heart rate range and the second mean being within the target respiratory rate range.
4. The method according to claim 1, characterized in that: The target physiological range includes a physiological range centered on a second physiological mean, and the interval size of the target physiological range is determined based on the product of a set value and a physiological standard deviation. The second physiological mean and the physiological standard deviation are respectively the mean and standard deviation determined based on second physiological data, and the second physiological data is data collected by a detection module on the second massage device.
5. The method according to claim 4, characterized in that Also includes: In the case where the first sleep state is a light sleep state, determining whether a strength adjustment instruction is obtained, the strength adjustment instruction including an instruction for adjusting the massage strength of the first massage device; If so, correcting the set value of the target physiological range corresponding to the first sleep state; The first sleep state is set to the awake state, and the first physiological data is returned to continue to be acquired, and the first physiological data is matched with the target physiological range after the set value is corrected to determine whether the sleep state corresponding to the first physiological data is the second sleep state.
6. The method according to claim 4, characterized in that Also includes: When the first sleep state is a deep sleep state, determining whether a massage start instruction is obtained, wherein the massage start instruction includes an instruction for controlling the first massage device to perform massage; If so, correcting the set value of the target physiological range corresponding to the first sleep state; The first sleep state is set to a light sleep state, and the first physiological data is returned to continue to be acquired, and the first physiological data is matched with the target physiological range after the set value is corrected to determine whether the sleep state corresponding to the first physiological data is the second sleep state.
7. The method according to claim 1, characterized in that Also includes: Obtaining an adjustment instruction for the gear position corresponding to the control instruction through a human-computer interaction interface; Adjust the gear position corresponding to the control instruction.
8. A device control device, characterized in that: include: An acquisition module, used for acquiring first physiological data and a first sleep state, wherein the first physiological data is data collected by a detection module on a first massage device; A first determination module is used to determine a second sleep state and a target physiological range corresponding to the second sleep state, wherein the second sleep state is a sleep state located after the first sleep state in a sleep pattern; A matching module, used for matching the first physiological data with the target physiological range to obtain a matching result; a second determining module, configured to determine that the sleep state corresponding to the first physiological data is the second sleep state when the matching result indicates that the first physiological data is within the target physiological range; The control module is used to send a control instruction corresponding to the second sleep state to the first massage device, and the control instruction instructs the first massage device to work according to the corresponding gear.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device control method according to any one of claims 1 to 7 when executed.