Heart rate data drawing method and device and intelligent wearable equipment applying heart rate data drawing method and device
By dividing the heart rate data into sub-data and determining its effectiveness, and generating a graphical display, the problems of cumbersome display of central rate data and the impact of data interruption in the prior art are solved, and the intuitive, accurate and efficient display of heart rate data is achieved.
Patent Information
- Application Number
- CN202411532267.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-07
AI Technical Summary
When existing intelligent detection devices display heart rate data, users need to manually filter and compare heart rate data for different time periods. The process is cumbersome and time-consuming, and data interruptions will affect the display, making it difficult to fully reflect the changing trends and characteristics of heart rate data.
A heart rate data drawing method is proposed. By retrieving heart rate data, dividing the data into sub-data of different time periods, determining the validity of sub-data based on preset rules, and generating heart rate data graphs, drawing effective data through polylines and gradient background marks invalid data.
It improves the intuitiveness and accuracy of heart rate data, enables users to quickly understand heart rate changes, improves the efficiency of data interpretation, and supports data storage and subsequent analysis.
Smart Images

Figure CN119399313A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a heart rate data drawing method and device, and a smart wearable device using the same. Background Art
[0002] With the rapid development of science and technology, intelligent detection devices such as smart watches and health bracelets have become an indispensable part of people's daily lives. By integrating various biosensors, they can monitor and record users' physiological parameters in real time. Among them, heart rate data is one of the important indicators reflecting the health status of the human body.
[0003] Currently, most of the smart detection devices on the market have heart rate monitoring functions, which can collect the user's heart rate data in real time or at regular intervals, and display it to the user in the form of numbers or simple charts.
[0004] However, for the data displayed by the device, users usually need to manually filter and compare heart rate data from different time periods to evaluate their own heart rate change trends. This process is cumbersome and time-consuming. In addition, data interruptions caused by users not wearing smart detection devices will affect the generation of displayed data, making it more difficult for the data to fully reflect the details and characteristics of heart rate data changing over time. As a result, users are often unable to quickly and accurately understand their own heart rate status, which can easily reduce the user experience. Summary of the invention
[0005] In order to overcome the above-mentioned defects of the prior art, the present invention proposes a heart rate data drawing method, which comprises:
[0006] In response to a first query task, retrieving first heart rate data specified by the first query task;
[0007] Dividing the first heart rate data into a plurality of sub-data corresponding to different time periods respectively;
[0008] Based on preset rules, each of the sub-data is determined to be valid data or invalid data, so as to generate a first heart rate data graph based on each of the valid data, each of the invalid data, and the time period corresponding to each of the sub-data.
[0009] Specifically, the “determining each of the sub-data as valid data or invalid data based on a preset rule, so as to generate a first heart rate data graph based on each of the valid data, each of the invalid data, and a time period corresponding to each of the sub-data” includes:
[0010] Determining interface parameters of the first heart rate data graph;
[0011] The sub-data are traversed based on the time period corresponding to each sub-data, so as to determine each sub-data as valid data or invalid data based on the preset rule, and the valid data in the sub-data are drawn in the interface by a first method, and the invalid data in the sub-data are drawn by a second method, until the traversal of all the sub-data is completed, and the first heart rate data graph is generated.
[0012] Specifically, the “traversing the sub-data based on the time period corresponding to each sub-data, determining each sub-data as valid data or invalid data based on the preset rule, and drawing the valid data in the sub-data by a first method, and drawing the invalid data in the sub-data by a second method” includes:
[0013] Based on the time period sequence corresponding to each sub-data, and based on the preset rule, the sub-data are detected in sequence;
[0014] If the sub-data currently detected is valid data, and the previous sub-data is valid data, the sub-data is drawn by the first method based on the drawing graph of the previous sub-data; if the sub-data currently detected is valid data, and the previous sub-data is invalid data or does not exist, the drawing process is initialized, and the sub-data is drawn by the first method;
[0015] If the sub-data currently detected is invalid data, the sub-data is drawn using the second method.
[0016] Optionally, the “determining each of the sub-data as valid data or invalid data based on a preset rule” includes:
[0017] Obtaining an average value of each of the sub-data;
[0018] If the average value of a sub-data is not a preset value, the sub-data is determined to be valid data; if the average value of a sub-data is the preset value, the sub-data is determined to be invalid data.
[0019] Preferably, the “drawing the valid data in the sub-data by a first method” includes:
[0020] Draw the valid data in the sub-data by using a polyline;
[0021] The “drawing invalid data in the sub-data by a second method” includes:
[0022] The invalid data in the sub-data is drawn with a gradient background.
[0023] Furthermore, the method further comprises:
[0024] In response to a second query task, second heart rate data specified by the second query task is retrieved, the second heart rate data is merged into the first heart rate data to update the first heart rate data, and a second heart rate data graph is generated based on the updated first heart rate data.
[0025] Furthermore, the method further comprises:
[0026] Binding the first heart rate data graph with the time data corresponding to the first heart rate data and storing them;
[0027] In response to a third query task, retrieve third heart rate data specified by the third query task, and determine whether time data corresponding to the third heart rate data overlaps with time data corresponding to the first heart rate data;
[0028] If the time data corresponding to the third heart rate data completely overlaps with all or part of the time data corresponding to the first heart rate data, generating a third heart rate data graph corresponding to the third heart rate data based on the first heart rate data graph and the time data corresponding to the third heart rate data;
[0029] If part of the time data corresponding to the third heart rate data overlaps with all or part of the time data corresponding to the first heart rate data, an overlapping heart rate data graph is extracted from the first heart rate data graph based on the time data corresponding to the third heart rate data, so as to generate a third heart rate data graph corresponding to the third heart rate data based on the third heart rate data and the overlapping heart rate data graph.
[0030] The present invention also provides a heart rate data drawing device, the device comprising:
[0031] A first retrieving module, configured to retrieve, in response to a first query task, first heart rate data specified by the first query task;
[0032] A division module, used for dividing the first heart rate data into a plurality of sub-data corresponding to different time periods respectively;
[0033] The first generating module is used to determine each of the sub-data as valid data or invalid data based on a preset rule, so as to generate a first heart rate data graph based on each of the valid data, each of the invalid data, and the time period corresponding to each of the sub-data.
[0034] The present invention also proposes a smart wearable device, which is used to obtain heart rate data and its corresponding time data to implement the heart rate data drawing method as described above.
[0035] The present invention has at least the following beneficial effects:
[0036] The solution proposed by the present invention determines the validity and invalidity of the sub-data in each time period through preset rules, so as to divide the heart rate data according to different time periods and draw them into graphs, which not only makes the data presentation more intuitive, but also improves the accuracy of the final drawn heart rate data graph, so that the graph can more truly reflect the user's heart rate changes, and provides a reliable basis for subsequent data analysis, health assessment, exercise guidance, etc.
[0037] Furthermore, the solution proposed in the present invention draws valid data through a broken line, and comprehensively considers the graph drawn by the previous data when drawing the valid data, which helps to maintain the continuity and smoothness of the data graph, can clearly and intuitively display the trend of heart rate changes, and mark invalid data through a gradient background when encountering invalid data, which helps users identify breakpoints in the data, so that users can capture key information more quickly when interpreting the data, thereby improving the efficiency of data interpretation;
[0038] In addition, the solution proposed in the present invention can expand the time range of the original data or increase the diversity of the data based on user needs, making the analysis more comprehensive and in-depth. The heart rate data graph can also be bound to the corresponding time data and stored, making it convenient for the user to perform data backtracking and comparative analysis when needed, so that new heart rate data graphs can be queried and generated by matching time data, thereby improving the efficiency and accuracy of the query and reducing user waiting time.
[0039] Therefore, the present invention provides a heart rate data drawing method, device and smart wearable device using the same. The scheme proposed in the present invention can effectively find invalid data in the heart rate data by dividing the heart rate data into multiple sub-data and performing validity judgment, and graphically display the valid data and invalid data, which can intuitively reflect the trend and characteristics of the heart rate change over time, making it convenient for users to quickly understand their own heart rate status. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 A schematic diagram of a method flow of a heart rate data drawing method provided in Example 1;
[0042] Figure 2 This is an example diagram of the overall process of the heart rate data drawing method provided in Example 1;
[0043] Figure 3A flowchart of a method for generating a heart rate data graph;
[0044] Figure 4 An example diagram of the process of drawing a heart rate data graph;
[0045] Figure 5 A flow chart of a method for generating a heart rate data graph using existing data;
[0046] Figure 6 This is a schematic diagram of the module structure of the heart rate data drawing device provided in Example 2.
[0047] Reference numerals
[0048] 10 - first calling module; 20 - division module; 30 - first generating module; 31 - parameter determination unit; 32 - drawing unit; 40 - updating module; 51 - storage module; 52 - second calling module; 53 - second generating module; 54 - third generating module. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0050] Hereinafter, various embodiments of the present invention will be described more fully. The present invention may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present invention to the specific embodiments disclosed herein, but the present invention should be understood to cover all adjustments, equivalents and / or alternatives falling within the spirit and scope of the various embodiments of the present invention.
[0051] Hereinafter, the term "include" or "may include" used in various embodiments of the present invention indicates the presence of disclosed functions, operations or elements, and does not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present invention, the terms "include", "have" and their cognates are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0052] In various embodiments of the present invention, the expression "or" or "at least one of A or / and B" includes any combination or all combinations of the words listed at the same time. For example, the expression "A or B" or "at least one of A or / and B" may include A, may include B, or may include both A and B.
[0053] The expressions (such as "first", "second", etc.) used in various embodiments of the present invention may modify the various constituent elements in various embodiments, but may not limit the corresponding constituent elements. For example, the above expressions do not limit the order and / or importance of the elements. The above expressions are only used for the purpose of distinguishing an element from other elements. For example, the first user device and the second user device indicate different user devices, although both are user devices. For example, without departing from the scope of various embodiments of the present invention, the first element may be referred to as the second element, and similarly, the second element may also be referred to as the first element.
[0054] It should be noted that in the present invention, unless otherwise clearly specified and defined, the terms such as "installation", "connection", "fixation" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0055] In the present invention, those skilled in the art need to understand that the terms indicating orientation or positional relationship herein are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0056] The terms used in various embodiments of the present invention are only used for the purpose of describing specific embodiments and are not intended to limit various embodiments of the present invention. As used herein, the singular form is intended to also include the plural form, unless the context clearly indicates otherwise. Unless otherwise limited, all terms used here (including technical terms and scientific terms) have the same meaning as the meaning generally understood by those of ordinary skill in the art to which the various embodiments of the present invention belong. The terms (such as the terms defined in the dictionary generally used) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning, unless clearly defined in various embodiments of the present invention.
[0057] Example 1
[0058] This embodiment proposes a method for drawing heart rate data. Figure 1-2 , the method comprising:
[0059] S100: In response to a first query task, retrieve first heart rate data specified by the first query task.
[0060] The method proposed in this embodiment defines the HeartRateActivity class as the main controller for displaying the user's heart rate operation interface, which can realize functions such as interaction with the user, reading and graphical display of heart rate data, etc.
[0061] Specifically, when the user enters the heart rate interface, the heart rate data of a specific time period specified by the first query task is retrieved as the first heart rate data. For example, when the user needs to retrieve the heart rate data of a certain day, the instruction parseHeartRateByDay can be used to call the heart rate data of the specified date from the data processor through the date data call instruction.
[0062] S200: Divide the first heart rate data into a plurality of sub-data corresponding to different time periods respectively.
[0063] For example, if the first heart rate data specified by the first query task is the heart rate data of a certain day, and step S200 divides the heart rate data into hours, the heart rate data will be divided into 24 sub-data corresponding to the 24 hours of the day;
[0064] Optionally, the method proposed in this embodiment defines a data container for storing heart rate data, and an integer array is defined in the data container, the length of the array is set to 24, and the array length 24 represents the number of hours in a day, and each element represents the heart rate data of one hour; in a specific embodiment, the heart rate data of each hour is stored in the form of data points, and each data point corresponds to the average heart rate data in one hour;
[0065] Therefore, when step S200 divides the first heart rate data into hours, the method proposed in this embodiment can directly use the first heart rate data of each hour as sub-data and determine valid data and invalid data without further dividing or integrating the acquired first heart rate data into sub-data.
[0066] S300: Based on a preset rule, each sub-data is determined as valid data or invalid data, so as to generate a first heart rate data graph based on each valid data, each invalid data, and a time period corresponding to each sub-data.
[0067] In this embodiment, the average value of each sub-data is obtained. If the average value of a sub-data is not a preset value, the sub-data is determined to be valid data; if the average value of a sub-data is a preset value, the sub-data is determined to be invalid data; the preset value includes at least one numerical value. Exemplarily, when the preset value includes 0, the sub-data with an average value not equal to 0 is determined to be valid data, and the sub-data with an average value equal to 0 is determined to be invalid data.
[0068] It should be noted that the sub-data may include several numerical data. If the number of numerical data in the sub-data of a certain time period is one and only one, the average value of the sub-data of the time period is the value of the numerical data itself.
[0069] Specifically, the method proposed in this embodiment will create and initialize the heart rate graphics interface HeartRateView, and pass the parsed heart rate data to HeartRateActivity by calling the setData method of the heart rate graphics interface to provide preparation for drawing the first heart rate data graph, thereby displaying the corresponding type of heart rate data according to user needs, such as total heart rate statistics or average heart rate data.
[0070] Preferably, the first heart rate data graph is provided with a drawing upper limit value and a drawing lower limit value, so that when drawing is performed based on valid data, if the value of a certain valid data is lower than the drawing lower limit value, the valid data is drawn based on the drawing lower limit value; correspondingly, if the value of a certain valid data is higher than the drawing upper limit value, the valid data is drawn based on the drawing upper limit value;
[0071] In this embodiment, the drawing lower limit value is 40, and the drawing upper limit value is 200. By setting the drawing lower limit parameter minvalue of the heart rate data graph to 40 and the upper limit parameter maxvalue to 200, it is ensured that the heart rate data is drawn within the specified range; define the data polyline paintLine for drawing the heart rate data polyline, the polyline background paintPath for drawing the background area of the polyline, the background gradient style linearGradient for setting the gradient effect of the background and increasing the visual layering, and set the drawing path outline to ensure that the first heart rate data graph can be accurately displayed; finally, use the previously configured brush and data in the onDraw method to render the heart rate data onto the interface according to the drawing logic.
[0072] Specifically, see Figure 3 , step S300 includes:
[0073] S310: Determine interface parameters of the first heart rate data graph.
[0074] In this embodiment, step S310 reads the interface width width, interface height height and data length length, and calculates the width occupied by each subscript in the horizontal direction by the formula mStep=width / length, and calculates the height occupied by each sub-data by the formula hStep=height / (maxValue-minValue), defines drawFlag as the flag for the start and end of drawing the heart rate data graph, startDrawWidth as the horizontal position at the start of drawing, and endDrawWidth as the horizontal position at the end of drawing.
[0075] S320: Traverse the sub-data based on the time period corresponding to each sub-data to determine each sub-data as valid data or invalid data based on a preset rule, and draw the valid data in the sub-data in the interface by a first method, and draw the invalid data in the sub-data by a second method, until all the sub-data are traversed and a first heart rate data graph is generated.
[0076] Specifically, drawing the valid data in the sub-data by the first method includes drawing the valid data in the sub-data by a broken line, and drawing the invalid data in the sub-data by the second method includes drawing the invalid data in the sub-data by a gradient background; thereby, the user can intuitively see the specific situation of the sub-data in each time period and the correlation between adjacent sub-data from the first heart rate data graph.
[0077] See also Figure 4 In this embodiment, if drawFlag is false, that is, it is in a state where no heart rate data has been drawn, then startDrawWidth will be recorded as the starting point, and the brush and the drawing path will be set to the starting point to start drawing the polyline, and drawFlag will be set to true, and each sub-data will be detected in sequence based on the time period corresponding to each sub-data;
[0078] If the currently detected sub-data is valid data and drawFlag is true, that is, the previous sub-data is valid data, the stroke and path will be set, and the drawing will continue in the drawing state of the previous heart rate value in a broken line manner; if the currently detected sub-data is valid data and drawFlag is false, that is, the previous sub-data is invalid data or does not exist, the drawing process is initialized;
[0079] If the sub-data currently detected is invalid data, endDrawWidth is recorded as the end point, the area corresponding to the invalid data is drawn with a gradient background, and drawFlag is set to false.
[0080] Furthermore, if an end point is detected before the traversal of the sub-data is completed, after the drawing of the area corresponding to the current sub-data is completed, drawFlag is set to false to continue to traverse the next sub-data backward from the current end point.
[0081] It should be noted that determining whether the traversal of the sub-data is completed can be achieved by checking whether the current index reaches the last element of the array. If the current index is equal to the array length minus one, it means that the last element has been traversed. Exemplarily, the method proposed in this embodiment can use a loop condition for judgment, such as using a for loop or a while loop to check whether the index is less than the array length to determine whether the traversal of the sub-data is completed.
[0082] Furthermore, the method further comprises:
[0083] S400: In response to the second query task, retrieve the second heart rate data specified by the second query task, merge the second heart rate data into the first heart rate data to update the first heart rate data, and generate a second heart rate data graph based on the updated first heart rate data.
[0084] Specifically, the method proposed in this embodiment also opens a setData interface, which allows the user to pass in new data and restart the drawing during operation, thereby completing the update of the heart rate data graph on the interface, that is, updating the first heart rate data graph corresponding to the first heart rate data before the update to the second heart rate data graph corresponding to the first heart rate data after the update.
[0085] Further, refer to Figure 5 , the method further comprises:
[0086] S510: Bind the first heart rate data graph with the time data corresponding to the first heart rate data and store them.
[0087] S520: In response to the third query task, retrieve the third heart rate data specified by the third query task, and determine whether the time data corresponding to the third heart rate data overlaps with the time data corresponding to the first heart rate data.
[0088] If the time data corresponding to the third heart rate data completely overlaps with all or part of the time data corresponding to the first heart rate data, execute step S530; if part of the time data corresponding to the third heart rate data overlaps with the time data corresponding to the first heart rate data, execute step S540; if there is no overlap, use the third heart rate data as the first heart rate data and execute step S200.
[0089] S530: Generate a third heart rate data graph corresponding to the third heart rate data based on the first heart rate data graph and the time data corresponding to the third heart rate data.
[0090] S540: extracting a coincident heart rate data graph from the first heart rate data graph based on the time data corresponding to the third heart rate data, so as to generate a third heart rate data graph corresponding to the third heart rate data based on the third heart rate data and the coincident heart rate data graph.
[0091] Specifically, in step S540, the third heart rate data can be divided into non-overlapping heart rate data and overlapping heart rate data according to the overlapping time period, so as to generate a non-overlapping heart rate data graph through the non-overlapping heart rate data via steps S200 and S300, and based on the sub-data adjacent to the overlapping heart rate data in the non-overlapping heart rate data and the sub-data adjacent to the non-overlapping heart rate data in the overlapping heart rate data, the drawing of the non-overlapping heart rate data graph and the overlapping heart rate data graph are adjusted accordingly, thereby merging the adjusted non-overlapping heart rate data graph and the overlapping heart rate data graph to form a third heart rate data graph.
[0092] Example 2
[0093] This embodiment proposes a heart rate data drawing device for implementing the heart rate data drawing method proposed in Embodiment 1, see Figure 6 , the device comprises:
[0094] A first retrieving module 10, configured to retrieve, in response to a first query task, first heart rate data specified by the first query task;
[0095] A division module 20, used for dividing the first heart rate data into a plurality of sub-data corresponding to different time periods respectively;
[0096] The first generating module 30 is used to determine each sub-data as valid data or invalid data based on a preset rule, so as to generate a first heart rate data graph based on each valid data, each invalid data, and a time period corresponding to each sub-data.
[0097] In this embodiment, the user can retrieve the heart rate data of a specific time period specified by the first query task as the first heart rate data through the first retrieval module 10. If the first heart rate data specified by the first query task is the heart rate data of a certain day, and the division module 20 divides the heart rate data in units of hours, the heart rate data will be divided into 24 sub-data corresponding to the 24 hours of that day.
[0098] Specifically, the first generation module 30 obtains the average value of each sub-data. If the average value of a sub-data is a preset value, the sub-data is determined to be valid data; if the average value of a sub-data is a preset value, the sub-data is determined to be invalid data; the preset value includes at least one numerical value. For example, when the preset value includes 0, the sub-data with an average value other than 0 is determined to be valid data, and the sub-data with an average value of 0 is determined to be invalid data.
[0099] Specifically, the first generating module 30 includes:
[0100] A parameter determination unit 31, used to determine the interface parameters of the first heart rate data graph;
[0101] The drawing unit 32 is used to traverse the sub-data based on the time period corresponding to each sub-data, so as to determine each sub-data as valid data or invalid data based on a preset rule, and draw the valid data in the sub-data in the interface by a first method, and draw the invalid data in the sub-data by a second method, until the traversal of all sub-data is completed, and a first heart rate data graph is generated.
[0102] Specifically, the drawing unit 32 draws the valid data in the sub-data in a first manner, including drawing the valid data in the sub-data through a broken line, and draws the invalid data in the sub-data in a second manner, including drawing the invalid data in the sub-data through a gradient background; thereby, the user can intuitively see the specific situation of the sub-data in each time period and the correlation between adjacent sub-data from the first heart rate data graph.
[0103] Furthermore, the device also includes:
[0104] An updating module 40, configured to retrieve, in response to a second query task, second heart rate data specified by the second query task, merge the second heart rate data into the first heart rate data to update the first heart rate data, and generate a second heart rate data graph based on the updated first heart rate data;
[0105] A storage module 51, used for binding the first heart rate data graph with the time data corresponding to the first heart rate data and storing them;
[0106] A second retrieving module 52 is used to retrieve, in response to the third query task, the third heart rate data specified by the third query task, and determine whether the time data corresponding to the third heart rate data overlaps with the time data corresponding to the first heart rate data;
[0107] A second generating module 53 is used to generate a third heart rate data graph corresponding to the third heart rate data based on the first heart rate data graph and the time data corresponding to the third heart rate data when the time data corresponding to the third heart rate data completely overlaps with all or part of the time data corresponding to the first heart rate data;
[0108] The third generating module 54 is used to extract the overlapping heart rate data graph from the first heart rate data graph based on the time data corresponding to the third heart rate data when part of the time data corresponding to the third heart rate data overlaps with the time data corresponding to the first heart rate data, so as to generate a third heart rate data graph corresponding to the third heart rate data based on the third heart rate data and the overlapping heart rate data graph.
[0109] Specifically, if the time data corresponding to the third heart rate data does not overlap with the time data corresponding to the first heart rate data, the third heart rate data is used as the first heart rate data, so that the division module 20 executes the preset steps.
[0110] Example 3
[0111] This embodiment proposes a smart wearable device, which is used to obtain heart rate data and its corresponding time data. A user can obtain the corresponding heart rate data from the smart wearable device through a terminal signal-connected to the smart wearable device, and generate a query task, thereby implementing the heart rate data drawing method proposed in Example 1.
[0112] Specifically, the smart wearable device proposed in this embodiment may include but is not limited to a smart watch, a smart bracelet and a smart ring.
[0113] In summary, the present invention provides a heart rate data drawing method, device and smart wearable device using the same. The scheme proposed in the present invention can effectively find invalid data in the heart rate data by dividing the heart rate data into multiple sub-data and performing validity judgment, and graphically display the valid data and invalid data, which can intuitively reflect the trend and characteristics of the heart rate change over time, making it convenient for users to quickly understand their own heart rate status.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for drawing heart rate data, characterized in that: The method comprises: In response to a first query task, retrieving first heart rate data specified by the first query task; Dividing the first heart rate data into a plurality of sub-data corresponding to different time periods respectively; Based on preset rules, each of the sub-data is determined to be valid data or invalid data, so as to generate a first heart rate data graph based on each of the valid data, each of the invalid data, and the time period corresponding to each of the sub-data.
2. The heart rate data drawing method according to claim 1, characterized in that: The “determining each of the sub-data as valid data or invalid data based on a preset rule, so as to generate a first heart rate data graph based on each of the valid data, each of the invalid data, and a time period corresponding to each of the sub-data” includes: Determining interface parameters of the first heart rate data graph; The sub-data are traversed based on the time period corresponding to each sub-data, so as to determine each sub-data as valid data or invalid data based on the preset rule, and the valid data in the sub-data are drawn in the interface by a first method, and the invalid data in the sub-data are drawn by a second method, until the traversal of all the sub-data is completed, and the first heart rate data graph is generated.
3. The heart rate data drawing method according to claim 2, characterized in that: The “traversing the sub-data based on the time period corresponding to each sub-data, determining each sub-data as valid data or invalid data based on the preset rule, and drawing the valid data in the sub-data by a first method, and drawing the invalid data in the sub-data by a second method” includes: Based on the time period sequence corresponding to each sub-data, and based on the preset rule, the sub-data are detected in sequence; If the sub-data currently detected is valid data, and the previous sub-data is valid data, the sub-data is drawn by the first method based on the drawing graph of the previous sub-data; if the sub-data currently detected is valid data, and the previous sub-data is invalid data or does not exist, the drawing process is initialized, and the sub-data is drawn by the first method; If the sub-data currently detected is invalid data, the sub-data is drawn using the second method.
4. The heart rate data drawing method according to any one of claims 1 to 3, characterized in that: The “determining each of the sub-data as valid data or invalid data based on a preset rule” includes: Obtaining an average value of each of the sub-data; If the average value of a sub-data is not a preset value, the sub-data is determined to be valid data; if the average value of a sub-data is the preset value, the sub-data is determined to be invalid data.
5. The heart rate data drawing method according to claim 2 or 3, characterized in that: The “drawing the valid data in the sub-data by the first method” includes: Draw the valid data in the sub-data by using a polyline; The “drawing invalid data in the sub-data by the second method” includes: The invalid data in the sub-data is drawn with a gradient background.
6. The heart rate data drawing method according to claim 1, characterized in that: The method further comprises: In response to a second query task, second heart rate data specified by the second query task is retrieved, the second heart rate data is merged into the first heart rate data to update the first heart rate data, and a second heart rate data graph is generated based on the updated first heart rate data.
7. The heart rate data drawing method according to claim 1, characterized in that: The method further comprises: Binding the first heart rate data graph with the time data corresponding to the first heart rate data and storing them; In response to a third query task, retrieve third heart rate data specified by the third query task, and determine whether time data corresponding to the third heart rate data overlaps with time data corresponding to the first heart rate data; If the time data corresponding to the third heart rate data completely overlaps with all or part of the time data corresponding to the first heart rate data, a third heart rate data graph corresponding to the third heart rate data is generated based on the first heart rate data graph and the time data corresponding to the third heart rate data.
8. The heart rate data drawing method according to claim 7, characterized in that: The method further comprises: If part of the time data corresponding to the third heart rate data overlaps with all or part of the time data corresponding to the first heart rate data, an overlapping heart rate data graph is extracted from the first heart rate data graph based on the time data corresponding to the third heart rate data, so as to generate a third heart rate data graph corresponding to the third heart rate data based on the third heart rate data and the overlapping heart rate data graph.
9. A heart rate data drawing device, characterized in that: The device comprises: A first retrieving module, configured to retrieve, in response to a first query task, first heart rate data specified by the first query task; A division module, used for dividing the first heart rate data into a plurality of sub-data corresponding to different time periods respectively; The first generating module is used to determine each of the sub-data as valid data or invalid data based on a preset rule, so as to generate a first heart rate data graph based on each of the valid data, each of the invalid data, and the time period corresponding to each of the sub-data.
10. A smart wearable device, characterized in that: Used to obtain heart rate data and its corresponding time data to implement the method as described in any one of claims 1-8.