Step frequency determination method, heart rate determination method, device, and storage medium
By acquiring the number of steps and acceleration spectrum within a preset time window, and determining the step frequency range based on energy extremes and the number of steps, the problem of step frequency misjudgment in the prior art is solved, and accurate step frequency measurement is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI HUAMI HEALTH TECH CO LTD
- Filing Date
- 2022-07-26
- Publication Date
- 2026-07-21
Smart Images

Figure CN117481636B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a method for determining step frequency, a method for determining heart rate, an apparatus, and a storage medium. Background Technology
[0002] With the development of smart hardware and artificial intelligence, smart wearable devices such as watches and wristbands have become widely popular. Using built-in sensors such as motion sensors and optical sensors, combined with artificial intelligence or machine learning algorithms, to measure motion and physiological parameters has become a basic function provided by smart wearable devices.
[0003] Based on cadence information, further measurements of exercise and physiological parameters, such as step count and exercise heart rate, can be easily performed. Inaccurate cadence information will lead to inaccurate results in these measurements. Therefore, obtaining accurate cadence information is crucial for accurate measurement of exercise and physiological parameters. Summary of the Invention
[0004] The purpose of this application is to at least partially solve one of the technical problems in the related art.
[0005] A first aspect of this application proposes a step frequency determination method, comprising: acquiring the number of steps taken by a moving object within a first preset time window, and the acceleration spectrum corresponding to acceleration information within a second preset time window; wherein the first and second preset time windows end at the current moment; determining a target frequency from the frequencies based on the energy extreme values corresponding to the energy of each frequency in the acceleration spectrum; determining the frequency range of the step frequency of the moving object at the current moment based on the number of steps and the target frequency; and determining the step frequency of the moving object at the current moment from the frequency range based on the energy corresponding to each frequency in the acceleration spectrum.
[0006] Optionally, determining the frequency range of the movement object's step frequency at the current moment based on the number of steps and the target frequency includes: determining the movement object's step frequency within a preset time period based on the number of steps; determining the target frequency relative to the step frequency; and determining the frequency range based on the target frequency and the target multiple.
[0007] Optionally, determining the step frequency of the moving object at the current moment based on the energy corresponding to each frequency in the acceleration spectrum from the frequency range includes: determining the frequency corresponding to the extreme point of maximum energy from the frequency range based on the energy corresponding to each frequency in the acceleration spectrum; and determining the frequency corresponding to the extreme point of maximum energy in the frequency range as the step frequency of the moving object at the current moment.
[0008] Optionally, the method further includes: if the frequency range does not include the extreme point of maximum energy, determining the ratio of the target frequency to the target multiple as the step frequency of the moving object at the current moment.
[0009] Optionally, determining the target frequency from the frequencies based on the energy extrema corresponding to each frequency in the acceleration spectrum includes: determining the frequency corresponding to the highest energy extremum from the frequencies based on the energy corresponding to each frequency in the acceleration spectrum; and determining the frequency corresponding to the highest energy extremum among the frequencies as the target frequency.
[0010] Optionally, obtaining the number of steps taken by the moving object within a first preset time window includes: determining the number of steps based on the wearing position of the pedometer device on the moving object and the number of steps collected by the pedometer device within the first preset time window; or, determining a step difference based on the number of steps counted by the pedometer device within a third preset time window and the step frequency of the moving object at the previous moment converted to the number of steps counted in the third preset time window; and determining the number of steps based on the number of steps counted by the pedometer device within the first preset time window and the step difference; wherein the third preset time window ends at the previous moment.
[0011] The step frequency determination method of this application embodiment acquires the number of steps taken by a moving object within a first preset time window and the acceleration spectrum corresponding to the acceleration information within a second preset time window. The first and second preset time windows end at the current moment. Based on the energy extreme values corresponding to each frequency in the acceleration spectrum, a target frequency is determined from each frequency. Based on the number of steps and the target frequency, the frequency range of the moving object's step frequency at the current moment is determined. Based on the energy corresponding to each frequency in the acceleration spectrum, the step frequency of the moving object at the current moment is determined from the frequency range. Thus, a simple, fast, and accurate method for determining the step frequency of a moving object at the current moment is achieved.
[0012] A second aspect of this application provides a method for determining heart rate, comprising: acquiring the heart rate of a moving object at the current moment and the previous moment; acquiring the step frequency at the current moment and the previous moment as determined by the method described in the first aspect embodiment; and correcting the heart rate at the current moment based on the heart rate at the previous moment, the current moment, and the step frequency at the previous moment to obtain the corrected heart rate at the current moment.
[0013] Optionally, the step of correcting the heart rate at the current moment based on the heart rate at the previous moment, the current moment, and the cadence at the previous moment includes: determining the cadence change trend at the current moment relative to the previous moment based on the cadence at the current moment and the previous moment; determining the heart rate change trend at the current moment relative to the previous moment based on the cadence change trend; and correcting the heart rate at the current moment based on the heart rate at the previous moment and the heart rate change trend.
[0014] The heart rate determination method of this application embodiment obtains the heart rate of the moving object at the current moment and the previous moment, obtains the step frequency at the current moment and the previous moment, and corrects the heart rate at the current moment based on the heart rate at the previous moment, the current moment and the step frequency at the previous moment, to obtain the corrected heart rate at the current moment, thereby improving the accuracy of heart rate determination.
[0015] A third aspect of this application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the cadence determination method described in the first aspect embodiment, or to perform the heart rate determination method described in the second aspect embodiment.
[0016] Optionally, the electronic device is a wearable device or a mobile terminal bound to the wearable device via wireless communication.
[0017] Optionally, if the electronic device is a wearable device, the electronic device further includes a motion sensor for collecting motion data of a moving object.
[0018] Optionally, the motion sensor is a 3-axis accelerometer.
[0019] Optionally, the wearable device and the mobile terminal communicate via short-range wireless communication.
[0020] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to cause the computer to perform a cadence determination method as described in a first aspect embodiment, or to perform a heart rate determination method as described in a second aspect embodiment.
[0021] A fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the step frequency determination method described in the first aspect embodiment, or executes the heart rate determination method described in the second aspect embodiment.
[0022] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0023] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein,
[0024] Figure 1 This is the spectrum of the acceleration signal over a period of time, ending at the current time.
[0025] Figure 2 This is the spectrum of another acceleration signal over a period of time, ending at the current time.
[0026] Figure 3 A block diagram illustrating an example of a system provided in this application embodiment;
[0027] Figure 4 A flowchart illustrating a step frequency determination method provided in an embodiment of this application;
[0028] Figure 5 A flowchart illustrating another step frequency determination method provided in an embodiment of this application;
[0029] Figure 6 This application provides a spectrum diagram of a continuous acceleration signal as shown in the embodiments of the present application.
[0030] Figure 7 A flowchart illustrating a heart rate determination method provided in an embodiment of this application;
[0031] Figure 8 A spectrum diagram of a continuous heart rate PPG signal provided in an embodiment of this application;
[0032] Figure 9 This is a schematic block diagram of an example electronic device used to implement embodiments of this application. Detailed Implementation
[0033] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0034] Wearable devices are increasingly being used to monitor users' physiological information, such as exercise data like cadence, stride length, steps, and calories burned, as well as health data like heart rate, blood oxygen levels, and blood pressure. Many wearable devices record physiological measurements in response to user input, such as when a user clicks a button on the wearable device or another interface element to trigger a measurement.
[0035] Related technologies, when monitoring a user's step frequency information, typically assume that the movement of the moving object (e.g., the user of a wearable device) is regular, and then use frequency domain analysis to obtain the step frequency of the moving object during the movement based on the acceleration signal. Specifically, the process involves acquiring the acceleration signal of the moving object over a period of time ending at the current moment, or the modulo-dilated signal of that acceleration signal; performing a Fourier transform on the acceleration signal or the modulo-dilated signal to obtain the corresponding spectrum; and determining the frequency corresponding to the highest energy extreme point in the spectrum as the step frequency (i.e., the fundamental frequency) at the current moment.
[0036] For example, refer to Figure 1 The image shown is a spectrum of the acceleration signal over a period of time, ending at the current time. Figure 1 The horizontal axis represents frequency, and the vertical axis represents the energy contained in the signal at a specific frequency. According to... Figure 1 It can be seen that the highest energy extreme point is the second extreme point. Assuming that the frequency corresponding to this extreme point is 3Hz, then according to the step frequency determination method in the relevant technology, the frequency corresponding to this extreme point can be directly determined as the step frequency at the current moment, that is, the step frequency at the current moment is determined to be 3 (step / s), or 180 (step / min).
[0037] However, in practical applications, since the energy corresponding to the step frequency may be lower than the energy corresponding to its harmonics, it is possible to determine the harmonics as the step frequency, leading to an incorrect determined step frequency. For example, refer to... Figure 2 The spectrum diagram shown, in which, Figure 2 The horizontal axis represents frequency, and the vertical axis represents the energy contained in the signal at a specific frequency. Figure 2 The highest energy extreme point is the third extreme point, which corresponds to a frequency of 2 harmonics. The actual step frequency is the frequency corresponding to the second extreme point, but the energy corresponding to this frequency is lower than that corresponding to the 2 harmonic. If the frequency corresponding to the highest energy extreme point is directly determined as the step frequency, the final determined step frequency at the current moment actually corresponds to a 2 harmonic. Therefore, it is evident that the method described above, which directly determines the step frequency at the current moment by the frequency corresponding to the highest energy extreme point in the spectrum, has low accuracy in determining the step frequency.
[0038] This application proposes a step frequency determination method to address the aforementioned problems. The method first acquires the number of steps taken by the moving object within a first preset time window and the acceleration spectrum corresponding to the acceleration information within a second preset time window. The first and second preset time windows end at the current moment. Based on the energy extreme values corresponding to each frequency in the acceleration spectrum, a target frequency is determined from each frequency. Based on the number of steps and the target frequency, the frequency range of the moving object's step frequency at the current moment is determined. Based on the energy corresponding to each frequency in the acceleration spectrum, the step frequency of the moving object at the current moment is determined from the frequency range. Thus, a simple, fast, and accurate method for determining the step frequency of the moving object at the current moment is achieved.
[0039] To describe some implementations in more detail, first refer to examples of hardware and software architectures used to determine cadence or heart rate based on cadence. Figure 3 This is a block diagram illustrating an example of a system 100. System 100 includes a wearable device 102, a server device 104, and an intermediate device 106, which is an intermediary between the wearable device 102 and the server device 104.
[0040] Wearable device 102 is a computing device configured to be worn by a human user during operation. Wearable device 102 may be implemented as a watch, bracelet, wristband, support, wristband, armband, legband, ring, headband, necklace, or earphones, or in the form of another wearable device. Wearable device 102 includes one or more sensors 108 for detecting physiological parameters indicative of the user of wearable device 102. Sensors 108 may include one or more of the following: photoplethysmograph (PPG) sensor, electrocardiogram (ECG) sensor, electrodes, pulse pressure sensor, vascular characteristic sensor, another sensor, or combinations thereof. Physiological parameters refer to one or more physiological parameters of the user of wearable device 102. Physiological parameters represent measurable physiological parameters related to one or more important systems of the body of the user of wearable device 102 (e.g., cardiovascular system, respiratory system, autonomic nervous system, or another system). For example, physiological parameters may be the user of wearable device 102's heart rate, heart rate variability, blood oxygen level, blood pressure, or one or more of another physiological parameter.
[0041] The wearable device 102 runs a program 110 for processing physiological signal data generated based on physiological parameters collected by the sensor 108. The program 110 may be an application program.
[0042] Server device 104 is a computing device that runs server program 112 to process physiological signal data. Server device 104 may be or include a hardware server (e.g., a server device), a software server (e.g., a web server and / or a virtual server), or both. For example, if server device 104 is or includes a hardware server, server device 104 may be a server device located in a rack, such as a rack in a data center.
[0043] Server program 112 is software used to detect one or more of the following: the health status, activity status, sleep status, or a combination thereof of the user of wearable device 102. This detection utilizes physiological signal data. For example, server program 112 may receive physiological signal data from intermediate device 106 and then use the received physiological signal data to detect one or more of the following: the health status, activity status, sleep status, or a combination thereof of the user of wearable device 102. For instance, server program 112 may use the physiological signal data to determine changes in the user's physiological state and then, based on the determined changes, detect one or more of the following: the health status, activity status, sleep status, or a combination thereof of the user of wearable device 102.
[0044] Server program 112 can access database 114 on server device 104 to perform at least some of its functions. Database 114 is a database or other data storage used to store, manage, or otherwise provide data for delivering the functions of server program 112. For example, database 114 may store physiological signal data received by server device 104, information generated or otherwise determined by the physiological signal data. For example, database 114 may be a relational database management system, an object database, an XML database, a configuration management database, a management information base, one or more flat files, other suitable non-transient storage mechanisms, or combinations thereof.
[0045] Intermediate device 106 is a device used to facilitate communication between wearable device 102 and server device 104. Specifically, intermediate device 106 receives data from wearable device 102 and sends the received data to server device 104, for example, for use by server program 112. Intermediate device 106 may be a computing device, such as a mobile device (e.g., a smartphone, tablet, laptop, or other mobile device) or another computer (e.g., a desktop computer or other non-mobile computer). Alternatively, intermediate device 106 may be or include network hardware, such as a router, switch, load balancer, another network device, or a combination thereof. As another alternative, intermediate device 106 may be another network connectivity device. For example, intermediate device 106 may be a network-connected power charger for wearable device 102.
[0046] For example, depending on a specific implementation of intermediate device 106, intermediate device 106 may run application 118, which may be one or more application software installed on intermediate device 106. In some implementations, the application software may be installed on intermediate device 106 by the user of intermediate device 106 (typically the same person as the user of wearable device 102, but in some cases may not be the same person as the user of wearable device 102) after purchasing intermediate device 106, or it may be pre-installed on intermediate device 106 by the manufacturer of intermediate device 106 before it leaves the factory. Application 118 configures intermediate device 106 to send or receive data to or from wearable device 102, and / or send or receive data to or from server device 104. Application 118 may receive commands from the user of intermediate device 106. Application 118 may receive commands from its user through its user interface. For example, if the intermediate device 106 is a computing device with a touch screen display, the user of the intermediate device 106 can receive commands by touching a portion of the display that corresponds to a user interface element in the application.
[0047] For example, a command received by application 118 from a user of intermediate device 106 could be a command to transmit physiological signal data received at intermediate device 106 (e.g., from wearable device 102) to server device 104. Intermediate device 106 responds to such a command by sending the physiological signal data to server device 104. In another example, a command received by application 118 from a user of intermediate device 106 could be a command to review information received from server device 104, such as information relating to one or more of the detected health status, activity level, sleep patterns, or combinations thereof of the user of wearable device 102.
[0048] In some implementations, the client device is granted access to server program 112. For example, the client device can be a mobile device, such as a smartphone, tablet, or laptop. In another example, the client device can be a desktop computer or another non-mobile computer. The client device can run a client application to communicate with server program 112. For example, the client application can be a mobile application capable of accessing some or all of the functionality and / or data of server program 112. For example, the client device can communicate with server device 104 via network 116. In some such implementations, the client device can be an intermediate device 106.
[0049] In some implementations, server device 104 may be a virtual server. For example, a virtual machine (e.g., a Java Virtual Machine) may be used to implement the virtual server. The virtual machine may be implemented using one or more virtual software systems, such as an HTTP server, a Java servlet container, a hypervisor, or other software systems. In some such implementations, the one or more virtual software systems used to implement the virtual server may instead be implemented in hardware.
[0050] In some implementations, the intermediate device 106 receives data from the wearable device 102 using a short-range communication protocol. For example, the short-range communication protocol could be Bluetooth. Low-energy, infrared, Z-wave, ZigBee, other protocols, or combinations thereof. Intermediate device 106 transmits data received from wearable device 102 to server device 104 via network 116. For example, network 116 can be a local area network (LAN), wide area network (WAN), machine-to-machine network, virtual private network (VPN), or another public or private network. Network 116 can use remote communication protocols. For example, remote communication protocols can be Ethernet, Transmission Control Protocol (TCP), Internet Protocol (IP), power line communication, wireless fidelity (Wi-Fi), General Packet Radio Service (GPRS), Global System for Mobile Communications (GSM), Code Division Multiple Access (CDMA), other protocols, or combinations thereof.
[0051] System 100 is used to continuously transmit physiological signal data from wearable device 102 to server device 104. Sensor 108 can continuously or otherwise frequently and periodically collect physiological signal data of the user of wearable device 102.
[0052] The implementation of System 100 may differ from that of... Figure 3 As shown and described. In some implementations, intermediate device 106 may be omitted. For example, wearable device 102 may be configured to communicate directly with server device 104 via network 116. For example, direct communication between wearable device 102 and server device 104 via network 116 may include using a remote, low-power system or another communication mechanism. In some implementations, both intermediate device 106 and server device 104 may be omitted. For example, wearable device 102 may be configured to perform the functions described above regarding server device 104. In such implementations, wearable device 102 can process and store data independently of other computing devices.
[0053] The step frequency determination method, apparatus, electronic device, and storage medium of this application are described below with reference to the accompanying drawings.
[0054] Figure 4 This is a flowchart illustrating a step frequency determination method provided in an embodiment of this application.
[0055] It should be noted that the step frequency determination method provided in this application embodiment can be applied to electronic devices to achieve simple, fast and accurate determination of the step frequency of a moving object at the current moment.
[0056] The electronic device can be a wearable device, or a mobile terminal such as a smartphone, tablet, or laptop that wirelessly communicates with the wearable device, or a cloud device, etc., and this application does not impose any restrictions on this. Wearable devices can be watches, bracelets, bangles, stands, wristbands, armbands, legbands, rings, headbands, necklaces, or headphones, etc. This application uses a wearable device as an example for illustration in its embodiments.
[0057] like Figure 4 As shown, the step frequency determination method includes the following steps 401-404.
[0058] Step 401: Obtain the number of steps of the moving object within the first preset time window, and the acceleration spectrum corresponding to the acceleration information within the second preset time window; wherein the first preset time window and the second preset time window end at the current time.
[0059] The term "moving object" refers to an object in motion, such as a person walking, a person running, or other objects in motion; this application does not impose any restrictions on this term.
[0060] The acceleration information refers to information related to the acceleration of the moving object within a second preset time window. For example, the acceleration information may include acceleration signals collected by an acceleration sensor, such as triaxial signals collected by a triaxial acceleration sensor, or it may include signals obtained after processing the acceleration signals, such as signals obtained by taking the modulus of the triaxial signals collected by a triaxial acceleration sensor, or it may include other acceleration information, which is not limited in this application.
[0061] In this embodiment, the person exercising may wear a pedometer with step counting functionality. In this embodiment, the number of steps collected by the pedometer is referred to as the step count. The pedometer may be an electronic device, a device configured within an electronic device, or a device independent of the electronic device but capable of communicating with it. For example, the pedometer may be a wearable device, and the electronic device may be the wearable device or a mobile terminal bound to the wearable device via wireless communication. This application does not impose any restrictions on this.
[0062] During the movement of the moving object, the pedometer device worn by it can collect and output the number of steps taken by the moving object within a preset time window A with the current time as the end time at each moment. For ease of distinction, in this embodiment, the preset time window A with the current time as the end time is called the first preset time window, and the preset time window A with the previous time as the end time is called the third preset time window. Thus, the electronic device can determine the number of steps taken by the moving object within the first preset time window based on the number of steps collected by the pedometer device within the first preset time window.
[0063] In the embodiments of this application, a triaxial accelerometer can be configured in the electronic device. The triaxial accelerometer can collect and output the triaxial signal of the moving object within a preset time window B with the current time as the end time at each moment. For ease of distinction, in the embodiments of this application, the preset time window B with the current time as the end time is referred to as the second preset time window. Thus, the electronic device can take the modulus of the triaxial signal collected within the second preset time window to obtain the modulo-taken signal, and then perform a Fourier transform on the modulo-taken signal to obtain the acceleration spectrum corresponding to the current time.
[0064] Assuming the three-axis signals are fx, fy, and fz, the modulo signal fnorm can be obtained by using the following formula (1).
[0065]
[0066] The duration of the first preset time window (i.e., the duration of preset time window A) and the duration of the second preset time window (i.e., the duration of preset time window B) can be set arbitrarily as needed. For example, the duration of the first preset time window can be 1 minute, 30 seconds, etc., and the duration of the second preset time window can be 10 seconds, 20 seconds, etc. This application does not impose any restrictions on this.
[0067] It should be noted that the length of the first preset time window and the length of the second preset time window can be the same or different, and this application does not impose any restrictions on this.
[0068] Step 402: Determine the target frequency from each frequency based on the energy extrema corresponding to each frequency in the acceleration spectrum.
[0069] It is understood that within the acceleration spectrum corresponding to the acceleration information in the second preset time window, there are usually multiple energy extreme points. In the embodiments of this application, based on the energy extremes corresponding to each frequency in the acceleration spectrum, the frequency corresponding to one of the energy extreme points can be determined as the target frequency. For example, the frequency corresponding to the extreme point with the highest energy can be determined as the target frequency, or the frequency corresponding to any energy extreme point can be determined as the target frequency.
[0070] refer to Figure 2 The frequency corresponding to the second extreme point or the frequency corresponding to the third extreme point can be determined as the target frequency.
[0071] Step 403: Based on the number of steps and the target frequency, determine the frequency range of the moving object's step frequency at the current moment.
[0072] In this embodiment of the application, the step frequency of the moving object at the current moment can be predicted based on the number of steps and the target frequency, so as to obtain the predicted step frequency of the moving object at the current moment, and then the range near the predicted step frequency is determined as the frequency range of the moving object's step frequency at the current moment.
[0073] The range near the predicted step frequency can be a range centered on the predicted step frequency, and the size of this range can be set arbitrarily as needed; this application does not impose any restrictions on it. For example, the range can be set to [predicted step frequency * 90%, predicted step frequency * 110%], or [predicted step frequency * 85%, predicted step frequency * 115%], etc.
[0074] The predicted step frequency can be obtained in several ways based on the number of steps and the target frequency. For example, the target frequency and / or the number of steps can be converted to the same unit, and the difference between the converted target frequency and the number of steps can be determined. If the difference is less than a preset threshold, it means that the target frequency is the fundamental frequency, and the target frequency can be determined as the predicted step frequency. If the difference is greater than the preset threshold, it means that the target frequency is not the fundamental frequency, and the multiple of the converted target frequency relative to the number of steps can be determined. The ratio of the converted target frequency to this multiple is then determined as the predicted step frequency. The preset threshold can be set as needed, and this application does not limit it. The multiple can be a positive integer or 0.5.
[0075] For example, taking a preset threshold of 10 as an example, assuming the length of the first preset time window is 1 minute, the number of steps the moving object takes within the first preset time window is 185, and the target frequency is 3Hz, then in order to convert the target frequency and the number of steps to the same unit, the target frequency 3Hz can be multiplied by 60, and then the difference between the number of steps 185 and the target frequency * 60 can be determined. Since this difference is 5, which is less than the preset threshold, it means that the target frequency is the fundamental frequency, and the predicted step frequency can be determined to be 3 (step / s), that is, 180 (step / min).
[0076] Assuming the first preset time window has a duration of 30 seconds, the moving object takes 85 steps within the first preset time window, and the target frequency is 6Hz, in order to convert the target frequency and the number of steps to the same unit, the number of steps 85 can be multiplied by 2, and the target frequency 6Hz can be multiplied by 60, thus determining the difference between 85*2 and 6*60. Since this difference is 190, which is greater than the preset threshold, it indicates that the target frequency is not the fundamental frequency. Therefore, the multiple of 6*60 relative to 85*2 can be determined. Since 6*60 / (85*2) is approximately equal to 2, the predicted step frequency can be determined as 6*60 / 2 (step / min), which is 180 (step / min).
[0077] Step 404: Based on the energy corresponding to each frequency in the acceleration spectrum, determine the step frequency of the moving object at the current moment from the frequency range.
[0078] In this embodiment, after determining the frequency range of the moving object's step frequency at the current moment based on the number of steps and the target frequency, it can be determined whether the target frequency is within the frequency range. If the target frequency is within the frequency range, it can be determined as the moving object's step frequency at the current moment. If the target frequency is not within the frequency range, an extreme point that is a multiple of the target frequency can be found within the frequency range, and the frequency corresponding to the found extreme point can be determined as the moving object's step frequency at the current moment. If no extreme point is found, the predicted step frequency can be determined as the moving object's step frequency at the current moment.
[0079] The step frequency determination method provided in this application embodiment can easily and quickly determine the step frequency of a moving object at the current moment. By first determining the frequency range of the moving object's step frequency at the current moment based on the number of steps and the target frequency, and then determining the moving object's step frequency at the current moment from the frequency range based on the energy corresponding to each frequency in the acceleration spectrum, the situation of determining the harmonic frequency as the step frequency can be avoided, thereby obtaining an accurate step frequency.
[0080] In summary, the step frequency determination method of this application embodiment obtains the number of steps taken by a moving object within a first preset time window and the acceleration spectrum corresponding to the acceleration information within a second preset time window. The first and second preset time windows end at the current moment. Based on the energy extreme values corresponding to each frequency in the acceleration spectrum, a target frequency is determined from each frequency. Based on the number of steps and the target frequency, the frequency range of the moving object's step frequency at the current moment is determined. Based on the energy corresponding to each frequency in the acceleration spectrum, the step frequency of the moving object at the current moment is determined from the frequency range. Therefore, a simple, fast, and accurate method for determining the step frequency of a moving object at the current moment is achieved.
[0081] The following is combined Figure 5 The step frequency determination method provided in the embodiments of this application will be further explained.
[0082] Figure 5 This is a flowchart illustrating another step frequency determination method provided in an embodiment of this application.
[0083] like Figure 5 As shown, the step frequency determination method may include the following steps 501-507.
[0084] Step 501: Obtain the number of steps of the moving object within the first preset time window, and the acceleration spectrum corresponding to the acceleration information within the second preset time window; wherein the first preset time window and the second preset time window end at the current time.
[0085] The description of step 401 in the above embodiments also applies to step 501, and will not be repeated here.
[0086] It is understandable that a person in motion can wear a pedometer. During the person's movement, the pedometer can collect and output the number of steps taken within a preset time window A, with that time as the end time. Based on the number of steps collected within the first preset time window, the total number of steps taken within that time window can be determined. However, in practical applications, when the pedometer is worn in certain positions, the number of steps collected by the pedometer may differ from the actual number of steps taken. For example, when the pedometer is worn on the wrist, since the arm swing frequency is half the step frequency (two steps per arm swing), the number of steps collected by the pedometer in the same time period will be half the actual number of steps taken. Therefore, in one possible implementation, the number of steps taken within the first preset time window can be obtained as follows: based on the wearing position of the pedometer and the number of steps collected by the pedometer within the first preset time window, the total number of steps taken can be determined.
[0087] For example, assuming the pedometer is worn on the wrist, and the device counts 80 steps within a first preset time window, then the total number of steps taken by the subject within that time window is 80*2. Similarly, assuming the pedometer is worn on the waist, and the device counts 160 steps within a first preset time window, then the total number of steps taken by the subject within that time window is 160.
[0088] In another possible implementation, the number of steps taken by the moving object within the first preset time window can be determined in the following way: based on the number of steps taken by the pedometer in the third preset time window and the number of steps taken by the moving object in the previous moment converted to the number of steps taken in the third preset time window, a step difference is determined; based on the number of steps taken by the pedometer in the first preset time window and the step difference, the number of steps taken is determined; wherein the third preset time window ends at the previous moment.
[0089] It should be noted that when the pedometer is worn on the wrist or other parts of the body, the number of steps collected by the pedometer in the same time period is different from the number of steps taken by the person. Therefore, the number of steps collected by the pedometer in the first preset time window and the number of steps collected by the pedometer in the third preset time window are the steps obtained after converting the number of steps collected by the pedometer into the number of steps taken.
[0090] The step frequency of the moving object at the previous moment can be determined by the step frequency determination method provided in the embodiments of this application. That is, the step frequency determined at any moment in the embodiments of this application can be used to determine the number of steps at the next moment.
[0091] In the embodiments of this application, at each current moment, a step count difference can be determined based on the step frequency of the previous moment and the number of steps counted within a preset time window A ending at the previous moment, as described above. The number of steps counted within the preset time window A ending at the current moment is then corrected based on the step count difference. Specifically, if the number of steps counted within the preset time window A ending at the previous moment is greater than the number of steps counted within the preset time window A converted from the step frequency of the previous moment, the step count difference is subtracted at the current moment. If the number of steps counted within the preset time window A ending at the previous moment is less than the number of steps counted within the preset time window A converted from the step frequency of the previous moment, the step count difference is added at the current moment, thereby obtaining a more accurate number of steps.
[0092] For example, suppose the pedometer is worn on the wrist, and the preset time window A is 10 seconds long (meaning the time between the first and third preset time windows is 10 seconds). The pedometer collects 8 steps in the third preset time window, equivalent to 16 steps. It collects 7 steps in the first preset time window, equivalent to 14 steps. Assuming the previous step frequency was 72 steps / min, this translates to 72 / 6 = 12 steps in the third preset time window. Therefore, the step difference is 16 - 12 = 4 steps, meaning the pedometer overcounted by 4 steps. Subtracting the step count of 14 in the first preset time window from this difference of 4 gives a result of 10 steps in the first preset time window.
[0093] Step 502: Determine the target frequency from each frequency based on the energy extrema corresponding to each frequency in the acceleration spectrum.
[0094] In the embodiments of this application, the frequency corresponding to the highest energy extreme point can be determined from each frequency based on the energy corresponding to each frequency in the acceleration spectrum. The frequency corresponding to the highest energy extreme point in each frequency can be determined as the target frequency. Then, the accurate step frequency can be determined more reliably based on the target frequency.
[0095] Step 503: Based on the number of steps taken, determine the step frequency of the moving object within a preset time period.
[0096] The preset time period can be either 1 minute or 1 second; this application does not impose any restrictions on this, as long as it can convert the number of steps into a unit of time that corresponds to the target frequency. For example, if the unit of time corresponding to the target frequency is seconds, then the preset time period is 1 second; if the unit of time corresponding to the target frequency is minutes, then the preset time period is 1 minute.
[0097] In the embodiments of this application, the number of steps can be converted based on the relationship between the length of the first preset time window and the length of the preset time period to obtain the step count frequency of the moving object within the preset time period. For example, if the length of the first preset time window is 30 seconds, the number of steps is 35, and the preset time period is 1 minute, then the step count frequency of the moving object within the preset time period can be determined to be 35*2=70 (steps / min).
[0098] Step 504: Determine the target frequency relative to the target step frequency.
[0099] The target multiple can be 0.5 or a positive integer.
[0100] In the embodiments of this application, the target frequency can be accurately determined by the following formula (2) as a multiple of the target step frequency.
[0101]
[0102] Where m represents the target multiple; Fsummit represents the target frequency; and Fstep represents the number of steps. Indicates taking The integer part.
[0103] That is, in When the integer part is 0, the target multiple is determined to be 0.5; When the integer part is not 0, the integer part is determined as the target multiple.
[0104] Step 505: Determine the frequency range based on the target frequency and the target multiple.
[0105] It is understandable that when the target frequency is a multiple of the target step frequency (m), if m is 1, the target frequency is the fundamental frequency; if m is any other value, the target frequency is a multiple of m. Correspondingly, the ratio of the target frequency to the target multiple is the frequency value corresponding to the fundamental frequency.
[0106] Therefore, in the embodiments of this application, the ratio of the target frequency to the target multiple can be determined as the predicted step frequency, and the range near the predicted step frequency can be determined as the frequency range of the moving object's step frequency at the current moment. Thus, the accurate frequency range of the moving object's step frequency at the current moment can be obtained.
[0107] Step 506: Based on the energy corresponding to each frequency in the acceleration spectrum, determine the frequency corresponding to the extreme point of maximum energy within the frequency range.
[0108] Step 507: Determine the frequency corresponding to the extreme point of maximum energy within the frequency range as the step frequency of the moving object at the current moment.
[0109] It is understood that step frequency, or fundamental frequency, is the frequency corresponding to an energy extreme point in the acceleration spectrum. In the embodiments of this application, the frequency corresponding to the extreme point with the highest energy can be found within the frequency range. The frequency corresponding to this extreme point with the highest energy is the step frequency of the moving object at the current moment. Thus, the step frequency of the moving object at the current moment can be accurately determined.
[0110] Furthermore, since the target frequency relative to the target number of steps can be accurately determined, the ratio of the target frequency to the target multiple can be used as the step frequency of the moving object at the current moment, excluding the extreme point of maximum energy within the frequency range, thus obtaining the accurate step frequency of the moving object at the current moment.
[0111] refer to Figure 6 The spectrum diagram shown is a sequence of continuous acceleration signals. This spectrum includes acceleration spectra corresponding to multiple consecutive moments within a time period x. The acceleration spectrum at each moment can be obtained based on the triaxial signal within a preset time window B, ending at that moment. Figure 6 The horizontal axis represents time (in seconds), and the vertical axis represents frequency. The color at a specific moment and frequency indicates the magnitude of energy; for example, a yellower color indicates greater energy, and a bluer color indicates less energy. This is reflected in… Figure 6 In the diagram, brighter colors indicate greater energy, while darker colors indicate lower energy. Figure 6 The energy is highest at the second harmonic. The upper curve represents the step frequency curve at each moment within the time period x determined by the method in the related art; the lower curve represents the step frequency curve at each moment within the time period x determined by the method in the embodiment of this application.
[0112] refer to Figure 6 In related technologies, the second harmonic frequency may be determined as the step frequency. However, in the step frequency determination method of this application embodiment, although the fundamental frequency energy is very small in the range of 0 to 100 seconds and 1200 to 1500 seconds, the second harmonic frequency with the highest energy can be obtained from each frequency in this application embodiment. This second harmonic frequency is determined as the target frequency, and then the step frequency of the moving object at the current moment can be accurately determined based on the number of steps and the target frequency in the above manner.
[0113] In summary, the step frequency determination method of this application embodiment obtains the number of steps taken by a moving object within a first preset time window and the acceleration spectrum corresponding to the acceleration information within a second preset time window. The first and second preset time windows end at the current moment. Based on the energy extreme values corresponding to each frequency in the acceleration spectrum, a target frequency is determined from each frequency. Based on the number of steps taken, the step frequency of the moving object within a preset time period is determined. A target multiple of the target frequency relative to the step frequency is determined. Based on the target frequency and the target multiple, a frequency range is determined. Based on the energy corresponding to each frequency in the acceleration spectrum, the frequency corresponding to the extreme point of maximum energy within the frequency range is determined. The frequency corresponding to the extreme point of maximum energy within the frequency range is determined as the step frequency of the moving object at the current moment. Thus, a simple, fast, and accurate determination of the step frequency of a moving object at the current moment is achieved.
[0114] Based on the above-described cadence determination method, this application also provides a heart rate determination method. The following is in conjunction with... Figure 7 The heart rate determination method provided in the embodiments of this application will be described.
[0115] Figure 7 This is a flowchart illustrating a heart rate determination method provided in an embodiment of this application.
[0116] like Figure 7 As shown, the heart rate determination method provided in this application embodiment may include the following steps:
[0117] Step 701: Obtain the heart rate of the moving object at the current moment and the previous moment.
[0118] In this embodiment of the application, the exerciser may wear a heart rate acquisition device with heart rate acquisition function. The heart rate acquisition device may be an electronic device, a device configured in an electronic device, or a device independent of the electronic device but capable of communicating with the electronic device. For example, the heart rate acquisition device may be a wearable device, and the electronic device may be the wearable device or a mobile terminal bound to the wearable device via wireless communication. This application does not impose any restrictions on this.
[0119] The heart rate acquisition device can acquire and output the heart rate PPG signal of the moving object within a preset time window C, with that time as the end time, at each moment. The electronic device can perform a Fourier transform on the heart rate PPG signal output by the heart rate acquisition device at each moment to obtain the corresponding heart rate PPG spectrum, and then obtain the heart rate of the moving object at that moment based on the corresponding heart rate PPG spectrum. The length of the preset time window C can be set as needed, and this application does not impose any limitations on it.
[0120] It should be noted that when the previous moment is the initial moment, the heart rate at the previous moment is the heart rate determined based on the heart rate PPG signal output by the heart rate acquisition device at the previous moment; when the previous moment is not the initial moment, the heart rate at the previous moment is the corrected heart rate obtained by correcting the heart rate determined based on the heart rate PPG signal output by the heart rate acquisition device at the previous moment according to the heart rate determination method provided in the embodiments of this application.
[0121] Step 702: Obtain the step frequency at the current time and the previous time.
[0122] In the embodiments of this application, the step frequency at the current moment and the previous moment can be obtained by any of the step frequency determination methods described above.
[0123] Step 703: Based on the heart rate of the previous moment, the current moment, and the step frequency of the previous moment, the heart rate of the current moment is corrected to obtain the corrected heart rate of the current moment.
[0124] It is understandable that, since the heart rate is usually stable during a period of stable cadence, and the heart rate increases when the cadence increases and decreases when the cadence decreases, in this embodiment of the application, the heart rate during a period of cadence change can be corrected based on the cadence change trend over a period of time to obtain the corrected heart rate, thereby improving the accuracy of heart rate determination.
[0125] In the embodiments of this application, the step frequency change trend of the current time relative to the previous time can be determined based on the step frequency of the current time and the previous time. Then, based on the step frequency change trend, the heart rate change trend of the current time relative to the previous time can be determined. Finally, based on the heart rate of the previous time and the heart rate change trend, the heart rate of the current time can be corrected to obtain the corrected heart rate of the current time.
[0126] refer to Figure 8 The spectrum shown is a continuous heart rate PPG signal. This spectrum includes PPG spectra corresponding to multiple consecutive moments within the time period y. The PPG spectrum for each moment can be obtained based on the heart rate PPG signal within a preset time window C ending at that moment. Figure 8 The horizontal axis represents time (in seconds), and the vertical axis represents heart rate per minute (bpm). The color at a specific time and bpm indicates the energy level; for example, a yellower color indicates higher energy, and a bluer color indicates lower energy. It should be noted that, for clarity, [the following text is incomplete and requires further context]. Figure 8 The energy at each time point and at bpm is not shown. Figure 8In the diagram, curve a is the heart rate curve when the heart rate at each moment within time period y is not corrected according to the heart rate determination method provided in the embodiments of this application; curve b is the heart rate curve after the heart rate at each moment within time period y is corrected according to the heart rate determination method provided in the embodiments of this application; and curve c is the step frequency curve at each moment within time period y.
[0127] refer to Figure 8 The step frequency curves at various times within time period y can be synchronously reflected on the spectrum of the continuous heart rate PPG signal within time period y. Figure 8 As shown in curve a, due to the weak or even absent PPG heart rate signal, the heart rate jumps to twice the normal frequency between 500 and 1100 seconds. However, according to curve c, the cadence remains relatively stable at around 70 beats per minute between 0 and 1200 seconds. This indicates that the exercise subject maintains the same type of movement, such as brisk walking, between 0 and 1200 seconds, and correspondingly, the heart rate will not fluctuate significantly between 0 and 1200 seconds. Using the heart rate determination method provided in this application, the heart rate between 500 and 1100 seconds can be corrected based on the cadence change trend, resulting in the corrected curve b.
[0128] Therefore, even when the heart rate PPG signal is very weak or even absent, an accurate heart rate can be obtained through the heart rate determination method provided in the embodiments of this application.
[0129] In summary, the heart rate determination method of this application embodiment obtains the heart rate of the moving object at the current moment and the previous moment, obtains the step frequency at the current moment and the previous moment, and corrects the heart rate at the current moment based on the heart rate at the previous moment, the current moment and the step frequency at the previous moment to obtain the corrected heart rate at the current moment, thereby improving the accuracy of heart rate determination.
[0130] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0131] The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the cadence determination method described in any of the foregoing embodiments, or to perform the heart rate determination method described in any of the foregoing embodiments.
[0132] In some embodiments, the electronic device may be a wearable device or a mobile terminal that wirelessly communicates with a wearable device. The wearable device may be a watch, bracelet, bangle, stand, wristband, armband, legband, ring, headband, necklace, or earphones, etc. The mobile terminal may be a smartphone, tablet, laptop, etc.
[0133] In some embodiments, when the electronic device is a wearable device, the electronic device may further include a motion sensor for collecting motion data of a moving object. For example, the electronic device may include a pedometer for collecting the number of steps taken by the moving object, a 3-axis accelerometer for collecting the spatial acceleration of the moving object, and other motion sensors.
[0134] In some embodiments, the motion sensor may be a 3-axis accelerometer.
[0135] In some embodiments, the wearable device can communicate wirelessly with the mobile terminal over short range. For example, the wearable device can communicate with the mobile terminal via Bluetooth. It communicates using low-energy, infrared, Z-wave, ZigBee, other protocols, or combinations thereof.
[0136] The readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the step frequency determination method described in any of the foregoing embodiments, or to execute the heart rate determination method described in any of the foregoing embodiments.
[0137] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of this application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0138] like Figure 9As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. The RAM 903 may also store various programs and data required for the operation of the device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0139] Multiple components in electronic device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of displays, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0140] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the cadence determination method or the heart rate determination method. For example, in some embodiments, the cadence determination method or the heart rate determination method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the cadence determination method or the heart rate determination method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform a cadence determination method or a heart rate determination method by any other suitable means (e.g., by means of firmware).
[0141] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0142] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable data step frequency determination device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0143] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0144] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0145] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0146] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0147] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0148] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0149] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for determining step frequency, characterized in that, include: The number of steps taken by the moving object within a first preset time window and the acceleration spectrum corresponding to the acceleration information within a second preset time window are obtained; wherein the first preset time window and the second preset time window end at the current time. Based on the energy extreme values corresponding to each frequency in the acceleration spectrum, the target frequency is determined from each frequency; Based on the number of steps and the target frequency, the frequency range of the moving object's step frequency at the current moment is determined, including: Determine the difference between the step frequency corresponding to the number of steps and the target frequency; Based on the difference, the predicted step frequency of the moving object at the current moment is determined; The frequency range near the predicted step frequency is determined as the frequency range of the moving object's step frequency at the current moment; Based on the energy corresponding to each frequency in the acceleration spectrum, the step frequency of the moving object at the current moment is determined from the frequency range.
2. The method according to claim 1, characterized in that, Determining the frequency range of the moving object's step frequency at the current moment based on the number of steps and the target frequency includes: Based on the number of steps taken, the step frequency of the moving object within a preset time period is determined; Determine the target frequency as a multiple of the target step frequency; The frequency range is determined based on the target frequency and the target multiple.
3. The method according to claim 2, characterized in that, Determining the step frequency of the moving object at the current moment from the frequency range based on the energy corresponding to each frequency in the acceleration spectrum includes: Based on the energy corresponding to each frequency in the acceleration spectrum, determine the frequency corresponding to the extreme point of maximum energy within the frequency range; The frequency corresponding to the extreme point of maximum energy within the frequency range is determined as the step frequency of the moving object at the current moment.
4. The method according to claim 3, characterized in that, The method further includes: If the frequency range does not include the extreme point of maximum energy, the ratio of the target frequency to the target multiple is determined as the step frequency of the moving object at the current moment.
5. The method according to any one of claims 1-4, characterized in that, The determination of the target frequency from the frequencies based on the energy extrema corresponding to each frequency in the acceleration spectrum includes: Based on the energy corresponding to each frequency in the acceleration spectrum, determine the frequency corresponding to the extreme point with the highest energy from each frequency; The frequency corresponding to the highest energy extreme point among the frequencies is determined as the target frequency.
6. The method according to any one of claims 1-4, characterized in that, The step count of the moving object within the first preset time window includes: The number of steps is determined based on the wearing position of the pedometer device on the subject and the number of steps collected by the pedometer device within the first preset time window; or, Based on the number of steps counted by the pedometer within the third preset time window, and the step frequency of the moving object at the previous moment converted to the number of steps counted within the third preset time window, a step count difference is determined; based on the number of steps counted by the pedometer within the first preset time window and the step count difference, the number of movement steps is determined; wherein, the third preset time window ends at the previous moment.
7. A method for determining heart rate, characterized in that, The method includes: Get the heart rate of the moving object at the current moment and the previous moment; Obtain the step frequency at the current time and the previous time as determined by the method described in any one of claims 1-6; Based on the heart rate at the previous moment, the current moment, and the step frequency at the previous moment, the heart rate at the current moment is corrected to obtain the corrected heart rate at the current moment.
8. The method according to claim 7, characterized in that, The step-rate adjustment of the current heart rate based on the previous heart rate, the current heart rate, and the previous step-rate includes: Based on the step frequency at the current moment and the previous moment, determine the trend of the step frequency change at the current moment relative to the previous moment; Based on the cadence change trend, determine the heart rate change trend at the current moment relative to the previous moment; The heart rate at the current moment is corrected based on the heart rate at the previous moment and the trend of heart rate change.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory that is communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the cadence determination method according to any one of claims 1-6, or the heart rate determination method according to any one of claims 7-8.
10. The electronic device according to claim 9, characterized in that, The electronic device is a wearable device or a mobile terminal that is wirelessly bound to the wearable device.
11. The electronic device according to claim 10, characterized in that, When the electronic device is a wearable device, the electronic device further includes: a motion sensor for collecting motion data of a moving object.
12. The electronic device according to claim 11, characterized in that, The motion sensor is a 3-axis accelerometer.
13. The electronic device according to claim 10, characterized in that, The wearable device and the mobile terminal communicate via short-range wireless communication.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the step frequency determination method according to any one of claims 1-6, or to execute the heart rate determination method according to any one of claims 7-8.