A pressure value synchronization method, device and electronic equipment
By traversing and determining the qualified pressure value generation time period, the problem of the inability to synchronize the pressure value caused by the system time jump of the wearable device is solved, ensuring that the pressure value can still be synchronized to the mobile phone after the system time jump.
Patent Information
- Application Number
- CN202310550588.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-15
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2043-05-15
AI Technical Summary
When the wearable device experiences a system time jump, the pressure value cannot be synchronized to the mobile phone, affecting the user experience.
By obtaining multiple pressure values and their generation time periods, and storing these time periods in the memory, when responding to the system time to obtain a synchronization request, traverse the stored time periods, and determine whether the generation end time is later than the request end time and earlier than the system time. The pressure value in the time period is the target synchronization value, ensuring that synchronization can be completed even if the system time jumps.
It effectively avoids the problem that some pressure values cannot be synchronized to the mobile phone due to system time jumps, and improves the user experience.
Smart Images

Figure CN117708231B
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and in particular, relates to a pressure value synchronization method, device and electronic equipment. Background Art
[0002] With the development of wearable devices (e.g., smart watches or smart bracelets), wearable devices not only have functions such as calling and taking pictures, but also have sports and health service functions. For example, wearable devices can monitor the user's steps, calories, heart rate, blood oxygen, stress value and other health data.
[0003] Furthermore, the health data monitored by the wearable device can be synchronized to the user's mobile phone so that the user can view the health data through the mobile phone, thereby improving the user experience.
[0004] However, the inventors have found that some wearable devices may experience system time jumps during use. If a wearable device experiences time jumps, the pressure value of the wearable device may not be synchronized to the mobile phone, thereby affecting the user experience. Summary of the invention
[0005] The present application provides a pressure value synchronization method, device and electronic device, which can solve the problem that some pressure values cannot be synchronized to a mobile phone when the generation end time jumps to after the system time.
[0006] In a first aspect, the present application provides a pressure value synchronization method, which is applied to a first electronic device, wherein the first electronic device is a wearable device, and the method includes: obtaining multiple pressure values, and a pressure value generation time period corresponding to each of the pressure values; the pressure value generation time period includes a generation start time and a generation end time; storing the multiple pressure values and the corresponding pressure value generation time period in the memory of the first electronic device in sequence according to the pressure value generation time period; obtaining the system time of the first electronic device in response to the received pressure value synchronization request information; wherein the pressure value synchronization request information includes a request synchronization time period, and the request synchronization time period includes a request start time and a request end time; traversing the multiple pressure value generation time periods stored in the memory, and when the generation end time is later than the request end time and the generation end time is earlier than the system time, ending the traversal, and determining the pressure value whose traversed pressure value generation time period partially or completely overlaps with the request synchronization time period as the target synchronization pressure value; synchronizing the target pressure value to a second electronic device that is communicatively connected to the first electronic device.
[0007] In this way, assuming that the pressure value generation time period (S k ,E k), generate the end time E k is the time after the jump, and generates the end time E k After jumping to system time C. When traversing to the pressure value generation time period (S k ,E k ), the judgment result is: Generate end time E k Later than the request end time E, but the generation end time E k If it is later than the system time C, the traversal end condition is not met, so the traversal will not end at this time. Instead, the traversal will continue until the pressure value generation time period (S k+2 ,E k+2 ), the judgment result is: Generate end time E k+2 Later than the request end time E, and the generation end time E k+2 Earlier than the system time C, the traversal end condition is met at this time, so the wearable device traverses the pressure value generation time period (S k+2 ,E k+2 ), the traversal is stopped. In this way, the above pressure value synchronization method is used, even if the generation end time E k After jumping to system time C, there will be no problem that some pressure values cannot be synchronized to the mobile phone, which improves the user experience.
[0008] Specifically, the target synchronization pressure value may be determined in the following four implementation methods.
[0009] In one possible implementation, the pressure value in which the traversed pressure value generation time period partially or completely overlaps with the requested synchronization time period is determined as the target synchronization pressure value, including: the pressure value in which the generation start time in the traversed pressure value generation time period is later than the request start time and the generation end time is earlier than the request end time is determined as the target synchronization pressure value.
[0010] In one possible implementation, the pressure value in which the traversed pressure value generation time period partially or completely overlaps with the request synchronization time period is determined as the target synchronization pressure value, including: the pressure value in the traversed pressure value generation time period in which the generation start time is earlier than the request start time, the generation end time is later than the request start time, and the generation end time is earlier than the request end time is determined as the target synchronization pressure value.
[0011] In one possible implementation, the pressure value in which the traversed pressure value generation time period partially or completely overlaps with the requested synchronization time period is determined as the target synchronization pressure value, including: the pressure value in the traversed pressure value generation time period in which the generation start time is earlier than the request start time and the generation end time is later than the request end time is determined as the target synchronization pressure value.
[0012] In one possible implementation, the pressure value in which the traversed pressure value generation time period partially or completely overlaps with the request synchronization time period is determined as the target synchronization pressure value, including: the pressure value in the traversed pressure value generation time period in which the generation start time is later than the request start time, the generation start time is earlier than the request end time, and the generation end time is later than the request end time is determined as the target synchronization pressure value.
[0013] In a possible implementation manner, the multiple pressure values are respectively stored in multiple storage pages of the memory, and each of the storage pages includes a pressure value and a pressure value generation time period corresponding to the pressure value.
[0014] In this way, storing pressure data in the form of storage pages can solve the problem of limited storage space of wearable devices and facilitate traversal operations.
[0015] Specifically, when performing a traversal operation, the following three implementation methods may be used to determine the storage page to start traversal.
[0016] In one possible implementation, traversing the multiple pressure value generation time periods stored in the memory includes: after the first electronic device establishes a communication connection with the second electronic device, when the pressure value synchronization request information is received for the first time, determining to start traversing from the first storage page in the memory.
[0017] In one possible implementation, the traversal of the multiple pressure value generation time periods stored in the memory includes: after the first electronic device establishes a communication connection with the second electronic device, when the pressure value synchronization request information is received for the i-th time, determining the first storage page, the first storage page being the last storage page traversed when the pressure value was synchronized last time; wherein i is a positive integer greater than 1; when the first storage page is not the last storage page in the storage area, determining to start traversal from the second storage page, wherein the second storage page is a storage page adjacent to the first storage page and located after the first storage page.
[0018] In a possible implementation, when the first storage page is the last storage page in the memory, it is determined to start traversing from the first storage page in the memory.
[0019] In the present application, in the following situations, the first electronic device can receive the pressure value synchronization request information sent by the second electronic device.
[0020] In a possible implementation manner, the method further includes: when the first electronic device establishes a communication connection with the second electronic device, receiving the pressure value synchronization request information sent by the second electronic device.
[0021] In this case, the second electronic device may automatically send pressure value synchronization request information to the first electronic device. The second electronic device may also send pressure value synchronization request information to the first electronic device in response to a user's pull-down operation on the health application interface of the second electronic device.
[0022] In one possible implementation, the method further includes: when the first electronic device establishes a communication connection with the second electronic device, obtaining a motion increment of the first electronic device; when the motion increment is greater than an increment threshold, sending a pressure value synchronization notification to the second electronic device; wherein the pressure value synchronization notification is used to notify the second electronic device to request synchronization of the pressure value of the first electronic device.
[0023] In a second aspect, the present application further provides a pressure value synchronization device, the pressure value synchronization device comprising:
[0024] A pressure value acquisition module, used to acquire multiple pressure values and a pressure value generation time period corresponding to each of the pressure values; the pressure value generation time period includes a generation start time and a generation end time;
[0025] a storage module, configured to sequentially store the plurality of pressure values and the corresponding pressure value generation time periods in a memory of the first electronic device according to the pressure value generation time periods;
[0026] A system time acquisition module, configured to acquire the system time of the first electronic device in response to the received pressure value synchronization request information; wherein the pressure value synchronization request information includes a requested synchronization time period, and the requested synchronization time period includes a requested start time and a requested end time;
[0027] a traversal module, configured to traverse the plurality of pressure value generation time periods stored in the memory, and terminate the traversal when the generation end time is later than the request end time and the generation end time is earlier than the system time, and determine the pressure value of the traversed pressure value generation time period partially or completely overlapping with the request synchronization time period as the target synchronization pressure value;
[0028] A synchronization module is used to synchronize the target pressure value to a second electronic device that is communicatively connected to the first electronic device.
[0029] In a possible implementation, the traversal module is used to determine the pressure value in the traversed pressure value generation time period whose generation start time is later than the request start time and whose generation end time is earlier than the request end time as the target synchronization pressure value.
[0030] In one possible implementation, the traversal module is used to determine the pressure value in the traversed pressure value generation time period whose generation start time is earlier than the request start time, whose generation end time is later than the request start time, and whose generation end time is earlier than the request end time as the target synchronization pressure value.
[0031] In a possible implementation, the traversal module is used to determine the pressure value in the traversed pressure value generation time period whose generation start time is earlier than the request start time and whose generation end time is later than the request end time as the target synchronization pressure value.
[0032] In one possible implementation, the traversal module is used to determine the pressure value in the traversed pressure value generation time period whose generation start time is later than the request start time, whose generation start time is earlier than the request end time, and whose generation end time is later than the request end time as the target synchronization pressure value.
[0033] In a possible implementation manner, the multiple pressure values are respectively stored in multiple storage pages of the memory, and each of the storage pages includes a pressure value and a pressure value generation time period corresponding to the pressure value.
[0034] In this way, storing pressure data in the form of storage pages can solve the problem of limited storage space of wearable devices and facilitate traversal operations.
[0035] In a possible implementation, the traversal module is used to determine to start traversal from the first storage page in the memory when the pressure value synchronization request information is received for the first time after the first electronic device establishes a communication connection with the second electronic device.
[0036] In one possible implementation, the traversal module is used to determine the first storage page when the pressure value synchronization request information is received for the i-th time after the first electronic device establishes a communication connection with the second electronic device, and the first storage page is the last storage page traversed during the last pressure value synchronization; wherein i is a positive integer greater than 1; when the first storage page is not the last storage page in the storage area, determine to start traversal from the second storage page, wherein the second storage page is a storage page adjacent to the first storage page and located after the first storage page.
[0037] In a possible implementation, the traversal module is configured to determine to start traversal from the first storage page in the memory when the first storage page is the last storage page in the memory.
[0038] In a possible implementation, the device further includes a receiving module, and the receiving module is used to receive the pressure value synchronization request information sent by the second electronic device when the first electronic device establishes a communication connection with the second electronic device.
[0039] In one possible implementation, the receiving module is used to obtain the motion increment of the first electronic device when the first electronic device and the second electronic device establish a communication connection; and send a pressure value synchronization notification to the second electronic device when the motion increment is greater than an increment threshold; wherein the pressure value synchronization notification is used to notify the second electronic device to request synchronization of the pressure value of the first electronic device.
[0040] In a third aspect, the present application also provides an electronic device, comprising: one or more processors and one or more memories; the one or more memories store computer programs or instructions, and when the computer programs or instructions are executed by the one or more processors, the electronic device executes a method as described in any one of the first aspects.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program or instruction is stored in the computer-readable storage medium. When the computer program or instruction is executed on a computer, the computer executes the method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A schematic diagram of a communication system architecture provided in an embodiment of the present application;
[0044] Figure 2 An interactive diagram of a pressure value synchronization method provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of a pressure data storage method provided in an embodiment of the present application;
[0046] Figure 4A An example diagram of a synchronous pressure value in a scenario where no system time jump occurs, provided in an embodiment of the present application;
[0047] Figure 4B An example diagram of a synchronous pressure value in a scenario where a system time jump occurs provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of the hardware structure of a wearable device 100 provided in an embodiment of the present application;
[0049] Figure 6 A software structure block diagram of a wearable device 100 provided in an embodiment of the present application;
[0050] Figure 7 A software module interaction diagram of a pressure value synchronization method provided in an embodiment of the present application;
[0051] Figure 8 A flowchart of another pressure value synchronization method provided in an embodiment of the present application;
[0052] Fig. 9 An example diagram of a synchronous pressure value in another scenario where a system time jump occurs provided by an embodiment of the present application;
[0053] Fig.10 An example diagram of a pressure value generation time period partially or completely overlapping with a request synchronization time period provided for the implementation of this application;
[0054] Fig.11 A structural block diagram of a pressure value synchronization device provided in an embodiment of the present application;
[0055] Fig.12A structural block diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0057] like Figure 1 As shown, a schematic diagram of a communication system architecture provided in an embodiment of the present application is provided. The communication system architecture may include a first electronic device 101 and a second electronic device 102. The first electronic device 101 may be, for example, a wearable device such as a smart watch or a smart bracelet, and the second electronic device 102 may be, for example, a mobile phone. The first electronic device 101 and the second electronic device 102 may perform Bluetooth communication through a Bluetooth channel.
[0058] With the development of wearable devices, wearable devices not only have functions such as calling and taking pictures, but also have sports and health service functions. For example, after a user wears a wearable device, the wearable device can monitor the user's steps, calories, heart rate, blood oxygen, pressure value and other sports and health data. Furthermore, the wearable device can synchronize sports, health and other data to the user's mobile phone, so that the user can view the relevant data through the mobile phone, improving the user experience.
[0059] In the embodiment of the present application, the stress value refers to a value used to evaluate the user's stress state, and the stress state refers to the feeling of mental restraint and tension. The stress state is controlled by the autonomic nervous system, in which the increase in the activity of the sympathetic nerves will increase the stress level, and the activity of the parasympathetic nerves will reduce the stress level. The state of the autonomic nervous system can be reflected by heart rate variability.
[0060] In some embodiments, a heart rate sensor, such as photoplethysmo graphy (PPG), may be provided in the wearable device, so that the PPG in the wearable device may be used to collect the user's heart rate data, and based on the collected heart rate data, characteristic parameters of the user's heart rate variability may be analyzed to calculate the corresponding pressure value, which may reflect the user's stress state.
[0061] Taking the first electronic device 101 as a wearable device, such as a smart watch or a smart bracelet, and the second electronic device 102 as a mobile phone as an example, the pressure value synchronization method is described.
[0062] Figure 2 This is an interactive diagram of a pressure value synchronization method provided in an embodiment of the present application. Figure 2 As shown, the method may include the following steps:
[0063] Step 201: The wearable device obtains acceleration data.
[0064] In the embodiment of the present application, an acceleration sensor and a PPG may be provided in the wearable device, wherein the acceleration sensor may be used to collect acceleration data of the user, and the PPG may be used to collect heart rate data of the user.
[0065] Step 202: Calculate the user's wrist activity based on the acceleration data.
[0066] Because the high-resolution heart rate data collected by PPG cannot accurately assess the user's stress level when the user is in motion or the wearable part is moving frequently, in order to accurately assess the user's stress level, it is necessary to select the heart rate data when the user is in a calm state, that is, when the amount of activity is low.
[0067] In this way, before using the heart rate data to calculate the stress value, it is first determined whether the user's current activity is a case of low activity. Specifically, the user's wrist activity can be calculated based on the collected acceleration data. Then, the calculated wrist activity is compared with the set activity threshold to determine whether the wrist activity meets the condition of low activity.
[0068] Step 203, determining whether the wrist activity is less than an activity threshold.
[0069] If the wrist activity is less than the activity threshold, it is determined that the wrist activity meets the condition of small activity, and step 204 is executed. If the wrist activity is greater than or equal to the activity threshold, it is determined that the wrist activity does not meet the condition of small activity, and step 202 can be returned.
[0070] Step 204, when the wrist activity is less than the activity threshold, the heart rate data collected by the PPG is obtained, and based on the heart rate data, the renal artery resistance index (RRI) value is calculated.
[0071] For example, when the wrist activity is less than the activity threshold, the wearable device can calculate the RRI value once every 4 seconds, for a total of 15 times, thus obtaining 15 sets of RRI values.
[0072] When calculating the RRI value for the first time, the wearable device obtains the system time once and determines the system time as the start time for generating the pressure value.
[0073] Step 205, based on the obtained 15 groups of RRI values, a pressure value is calculated and the pressure value generation end time is obtained.
[0074] Exemplarily, characteristic parameters of heart rate variability can be analyzed based on the 15 sets of RRI values obtained, and then, based on the characteristic parameters of heart rate variability, the current stress value can be evaluated.
[0075] When the pressure value is obtained, the wearable device obtains the system time again and determines the current system time as the end time of pressure value generation.
[0076] In this way, after the above steps 201 to 205, a set of pressure data can be obtained, which includes a pressure value and a pressure value generation time period corresponding to the pressure value, that is, a generation start time and a generation end time.
[0077] It should be noted that the embodiments of the present application do not limit the specific method for calculating the user's wrist activity, RRI value, and pressure value. For example, the user's wrist activity, RRI value, and pressure value can be calculated using the pressure algorithm in the wearable device. For another example, the user's wrist activity can be calculated using the motion algorithm in the wearable device, and the user's RRI value and pressure value can be calculated using the pressure algorithm in the wearable device.
[0078] Step 206 , storing the pressure value, and the generation start time and generation end time corresponding to the pressure value.
[0079] The wearable device may store the pressure value, and the generation start time and generation end time corresponding to the pressure value in a memory of the wearable device. For example, the memory may be a flash memory (Flash).
[0080] Specifically, the Flash can be divided into multiple storage areas to perform different storage functions. For example, the Flash can be divided into a pressure value storage area, a step storage area, a calorie storage area, etc. Among them, the pressure value storage area is used to store pressure data, the step storage area is used to store step-related data, and the calorie storage area is used to store calorie-related data.
[0081] In some embodiments, since the storage space of the wearable device is limited, the pressure data can be stored in the pressure value storage area in the Flash in the form of storage pages. Specifically, the pressure value storage area can be divided into multiple data write rows, each of which can store a certain number of bytes. Furthermore, multiple storage pages can be divided in sequence based on the data write rows and the number of bytes that can be stored in each data write row.
[0082] For example, Figure 3As shown, the pressure value storage area is divided into n storage pages, and the n storage pages can be set in order of increasing page numbers. For example, the pressure value storage area is set with 1000 storage pages, namely storage page 1, storage page 2, storage page 3...storage page 1000. Exemplarily, storage page 1 can correspond to the first byte of the first row to the tenth byte of the first row in the pressure value storage area, and storage page 2 can correspond to the eleventh byte of the first row to the ninth byte of the second row in the pressure value storage area. And so on, they are not listed one by one here.
[0083] One pressure value is stored in one storage page, and multiple pressure values can be stored in multiple storage pages in sequence according to the generation time. Each storage page includes not only the pressure value, but also the pressure value generation time period corresponding to the pressure value.
[0084] For example, the pressure value F1 generated by the pressure value generation time period (S1, E1) is stored in storage page 1, and the pressure value F2 generated by the pressure value generation time period (S2, E2) is stored in storage page 2. The pressure value generation time period (S2, E2) is the most recent pressure value generation time period after the pressure value generation time period (S1, E1). S1 represents the generation start time corresponding to the pressure value F1, E1 represents the generation end time corresponding to the pressure value F1, S2 represents the generation start time corresponding to the pressure value F2, and E2 represents the generation end time corresponding to the pressure value F2.
[0085] It should be noted that when the pressure data is stored in the last storage page, the pressure data to be stored next is stored again in sequence from the first storage page. Specifically, the pressure data to be stored next can be stored by overwriting the original pressure data in the storage page.
[0086] For example, the pressure value F n And the pressure value F n The corresponding pressure value generation time period (S n , E n ) is stored in the storage page n, the next pressure value F n+1 And the pressure value F n+1 The corresponding pressure value generation time period (S n+1 , E n+1 ) can overwrite the pressure value F1 and the pressure value generation time period (S1, E1) previously stored in the storage page 1. In this way, the storage data in the storage page 1 is updated to the pressure value F n+1 And the pressure value F n+1 The corresponding pressure value generation time period (S n+1 , E n+1 ). And so on, the pressure value F n+2 And the pressure value F n+2The corresponding pressure value generation time period (S n+2 , E n+2 ) can overwrite the pressure value F2 and the pressure value generation time period (S2, E2) previously stored in the storage page 2. They are not listed here one by one.
[0087] Step 207: The wearable device receives the pressure value synchronization request information sent by the mobile phone.
[0088] The pressure value synchronization request information may include a requested synchronization time period, and the requested synchronization time period includes a requested start time S and a requested end time E.
[0089] After receiving the pressure value synchronization request information sent by the mobile phone, the wearable device obtains the request start time S and request end time E in the pressure value synchronization request information. Then, it starts to traverse the pressure value generation time period in the storage page, and stops traversing after the generation end time is later than the request end time E. After that, the pressure value that meets the synchronization condition in the traversed storage page is determined as the target pressure value.
[0090] Step 208, synchronizing the target pressure value to the mobile phone.
[0091] The mobile phone in the embodiment of the present application may include a health application. Specifically, the target pressure value may be synchronized to the health application in the mobile phone.
[0092] In summary, according to the above steps 201 to 208, the pressure value in the wearable device can be synchronized to the mobile phone.
[0093] For example, Figure 4A As shown, it is assumed that the wearable device receives the pressure value synchronization request information at the system time C, and the pressure value synchronization request information includes the request start time S and the request end time E. In this way, the wearable device responds to the pressure value synchronization request information sent by the mobile phone at the system time C, starts to traverse the pressure value generation time period in the storage page, and traverses to the generation end time E. k+2 When the generation end time E is determined k+2 If the traversal time is later than the requested end time E, the subsequent traversal is stopped. Further, the pressure value traversed and meeting the synchronization condition can be determined as the target pressure value (i.e., S1 to E k+2 Pressure values between F1 and F k+2 ), and synchronize the target pressure value to the mobile phone.
[0094] However, the inventor found that during use, there was a situation where the pressure value could not be synchronized to the mobile phone. The inventor further found that due to hardware problems with the wearable device, the wearable device had a system time jump. If the wearable device has a system time jump, the pressure value of the wearable device may not be synchronized to the mobile phone, thereby affecting the user experience. For example, at a certain moment, the correct system time is 10:05 am on January 1, 2022, but due to hardware problems with the wearable device, the system time of the wearable device jumps to 10:05 am on February 1, 2022.
[0095] Exemplary, combined Figure 2 , refer to Figure 4B , assuming that the pressure value F is calculated in step 205 k , and the system time obtained is E k It should be understood that E k is the pressure value F k The corresponding generation end time. Assume that the wearable device obtains the system time E k , the system time of the wearable device changes, that is, the wearable device gets the generation end time E k is the time after the jump, and the pressure value F k The corresponding correct generation end time should be E k '.
[0096] Assume that the wearable device receives the pressure value synchronization request information at the system time C. The pressure value synchronization request information includes the request start time S and the request end time E, and the generated end time E after the jump k Later than system time C.
[0097] In this way, the wearable device responds to the pressure value synchronization request information sent by the mobile phone at the system time C, starts to traverse the pressure value generation time period in the storage page, and when the traversal reaches the generation end time E k When the generation end time E is determined k If the traversal is later than the requested end time E, the subsequent traversal is stopped. Further, the pressure value traversed and meeting the synchronization condition can be determined as the target pressure value (i.e., S1 to E k Pressure values between F1 and F k ), and synchronize the target pressure value to the mobile phone. Correspondingly, the pressure value generation time period (S k+1 , E k+1 ) and (S k+2 , E k+2 ) corresponds to the pressure value F k+1 and F k+2 It will not be determined as the target pressure value and will not be synchronized to the mobile phone. Figure 4A and Figure 4B It can be seen that the pressure value generation time period (S k+1 , E k+1 ) and (S k+2 , E k+2 ) corresponds to the pressure value F k+1 and F k+2 This is also the pressure value that meets the synchronization conditions. As a result, some pressure values are not synchronized to the mobile phone.
[0098] It can be seen that due to the hardware problem of the wearable device, the pressure value F k The corresponding generation end time E k After the jump to the system time C when the synchronous pressure value is requested, it is judged that E k After E, the traversal ends. This leads to the subsequent pressure value generation time period (S k+1 , E k+1 ) and (S k+2 , E k+2 ) is not traversed. This eventually leads to the pressure value generation time period (S k+1 , E k+1 ) and (S k+2 , E k+2 ) corresponds to the pressure value F k+1 and pressure value F k+2 Not synced to phone.
[0099] In order to solve the above-mentioned problem that some pressure values may not be synchronized to the mobile phone due to the generation end time jumping to the system time C, the embodiment of the present application further provides a pressure value synchronization method. When the method determines that the generation end time is later than the request end time, it continues to determine whether the generation end time is earlier than the system time C. In the case where the generation end time is later than the request end time, if the generation end time is earlier than the system time, the traversal is terminated. Otherwise, the subsequent traversal operation is continued. In this way, even if the traversed generation end time is a time after the jump to the system time C, the traversal will not be terminated, thereby avoiding the subsequent pressure values that may meet the synchronization conditions from being unable to be synchronized to the mobile phone.
[0100] Another pressure value synchronization method provided in an embodiment of the present application is described in detail below. The pressure value synchronization method can be applied to a first electronic device.
[0101] like Figure 5 As shown, the embodiment of the present application takes the first electronic device as a wearable device 100 (such as a smart watch) as an example to illustrate the structure of the wearable device 100 provided in the embodiment of the present application. Figure 5As shown, the wearable device 100 may include a wireless communication module 110, a display screen 120, a processor 130, an internal memory 140, a power management module 150, a battery 160, a charging management module 170, an antenna, and the like.
[0102] The wireless communication module 110 can provide wireless communication solutions including WLAN (such as (wirelessfidelity, Wi-Fi) network), Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), nearfield communication technology (nearfield communication, NFC), infrared technology (infrared, IR), etc. applied to the wearable device 100.
[0103] The wireless communication module 110 may be one or more devices integrating at least one communication processing module. The wireless communication module 110 receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 130. The wireless communication module 110 may also receive a signal to be sent from the processor 130, modulate the frequency of the signal, amplify the signal, and convert it into electromagnetic waves for radiation via the antenna.
[0104] The display screen 120 is used to display images, GUI interactive interfaces, etc. The display screen 120 includes a display panel and a touch panel. For example, in an embodiment of the present application, the display screen 120 can be used to display pressure data.
[0105] The processor 130 may include one or more processing units. For example, the processor 130 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU).
[0106] In some embodiments, the processor 130 may include one or more interfaces. The interface may include an I2C interface, an I2S interface, a PCM interface, a UART interface, a MIPI, a GPIO interface, a SIM card interface, and / or a USB interface, etc.
[0107] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the wearable device 100. In other embodiments of the present application, the wearable device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0108] The charging management module 170 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0109] The power management module 150 is used to connect the battery 160, the charging management module 170 and the processor 130. The power management module 150 receives input from the battery 160 and / or the charging management module 170, and supplies power to the processor 130, the internal memory 140, the external memory interface 120 and the wireless communication module 110. The power management module 150 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
[0110] The wireless communication function of the wearable device 100 can be implemented through an antenna and a wireless communication module 110, etc.
[0111] The internal memory 140 may be used to store one or more computer programs including instructions.
[0112] The wearable device 100 may also be provided with an optical sensor (eg, an infrared temperature sensor), a motion sensor (eg, an accelerometer, a gyroscope, etc.), a capacitive sensor, and a heart rate sensor (eg, a PPG), etc.
[0113] In the embodiment of the present application, the acceleration sensor can collect the acceleration data of the user, and then the wearable device 100 can calculate the wrist activity of the user based on the acceleration data. The PPG can collect the heart rate data of the user, and then the wearable device 100 can calculate the pressure value based on the heart rate data.
[0114] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the wearable device 100. In other embodiments of the present application, the wearable device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0115] The wearable device 100 may include, for example, a smart watch or a smart bracelet, etc., which is not limited in this application.
[0116] The methods in the embodiments of the present application can all be implemented in the wearable device 100 having the above hardware structure.
[0117] The software system of the wearable device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Lite OS system of the layered architecture as an example to exemplify the software structure of the wearable device 100.
[0118] like Figure 6 As shown, the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through interfaces. In some embodiments, the Lite OS system may include an application layer (which may be referred to as the application layer), an application framework layer (which may be referred to as the framework layer), algorithms and internal libraries, a hardware abstraction layer (HAL), a driver layer, and a kernel layer (lightweight kernel core), etc., which are not limited in this application.
[0119] The application layer and the framework layer can interact through the framework application programming interface (API). The algorithms and internal libraries can interact with the kernel layer through the Cortex microcontroller software interface standard (CMSIS) API, and the algorithms and internal libraries can interact with the HAL layer through the HAL API.
[0120] It should be noted that the embodiments of the present application are illustrated using the Lite OS system as an example. In other operating systems (such as a tailored version of the Android system), the solutions of the present application can also be implemented as long as the functions implemented by each functional module are similar to those of the embodiments of the present application.
[0121] Among them, the application layer can include a series of application packages.
[0122] like Figure 6 As shown, the application package may include various types of applications, such as three-party JS (Java Script) applications, communication applications, health applications, sports applications, device management applications, system applications, etc.
[0123] Exemplarily, a third-party JS application may include Etc. Communication applications may include information, call logs, contacts, calls and other applications. Health applications may include heart rate, blood oxygen saturation, sleep, physiological cycle, breathing training, heart health research, stress, etc. Sports applications may include professional sports, 85 kinds of sports (for example, walking, running, skipping rope, etc.), training status, exercise records, activity records, etc. Device management applications may include OTA upgrades, dial management, power on and off, factory restore, basic system settings, etc. System applications may include compass, timer, weather, altitude barometer, alarm clock, music, stopwatch, flashlight, etc. Of course, the application layer may also include other applications, such as interconnection applications, wallet applications, etc., which are not limited in this application.
[0124] In an embodiment of the present application, the health application can be used to display various health-related user interfaces (UI), for example, a pressure value display interface.
[0125] The framework layer provides application programming interface (API) and programming framework for the application programs in the application layer. The framework layer includes some predefined functions.
[0126] The framework layer may include underlying software services, sports health services, and hardware services.
[0127] Among them, the underlying software services may include basic services, manufacturing services, device management, etc. Basic services may include log services, file systems, exception records, dual-machine communication, memory management, etc. Manufacturing services may include production services, aging services, etc. Device management services may include device control, display management, sensor management, and Bluetooth management, etc. Among them, sensor management can be used to enable, disable, and set working parameters for different sensors. Bluetooth management can be used to enable Bluetooth transmission of wearable devices and other electronic devices (e.g., mobile phones).
[0128] Among them, sports health services include sports services and health services. Among them, sports services can include exercise services, daily activity services, data storage synchronization and training status evaluation services. Health services can include heart rate services, sleep services, breathing pressure, heart health, blood oxygen and pressure services, etc.
[0129] Among them, hardware services may include positioning services, NFC services, BLE and traditional Bluetooth, etc.
[0130] Optionally, the framework layer may also include basic system capabilities, ACE application development framework, and user interface (UI) framework (UIKIT), etc. ( Figure 6The UIKIT framework provides a series of classes to establish and manage the UI interface, application objects, event control, drawing models, windows, views, and interfaces for controlling touch screens, etc. of the application.
[0131] The algorithm and internal library may include a basic library and an algorithm library, and may also include a traditional Bluetooth protocol stack and a BLE protocol stack. Among them, the basic library may include modules such as Alipay, barcode, basic C library, and security. The algorithm library may include a motion algorithm, which can calculate the user's motion data (for example, step frequency). Optionally, the algorithm library may also include a liveness detection algorithm, a gesture algorithm, a dimming algorithm, a wearing detection algorithm, a breathing algorithm, a skipping rope algorithm, a heart rate algorithm, a sleep algorithm, a physiological cycle algorithm, a blood pressure algorithm, a pressure algorithm, a body temperature algorithm, an audio algorithm, etc., which are not limited in this application. Among them, the pressure algorithm can calculate the user's wrist activity and pressure value.
[0132] The kernel layer may include memory, tasks, interprocess communication (IPC), and interrupts of Lite OS.
[0133] The HAL layer may include touch panel (TP), flash memory (Flash), liquid crystal display (LCD), NFC, BT and corresponding modules of sensors. The HAL layer may also include other modules, such as charging, button and other modules, which are not limited in this application.
[0134] Among them, the sensor may include an accelerometer, a gyroscope, a barometer, a PPG, etc.
[0135] Among them, TP and LCD are both components of the display screen of wearable devices. TP and LCD can be bonded together, and the bonding methods can include frame bonding and full bonding. Wearable devices need to rely on LCD and Flash to display content.
[0136] It is understandable that LCD can be used to display content to users. Its structure is to place a liquid crystal box between two parallel glass substrates, set thin film transistors (TFT) on the lower substrate glass, and set color filters on the upper substrate glass. The signal and voltage on the TFT are changed to control the rotation direction of the liquid crystal molecules, thereby controlling whether the polarized light of each pixel is emitted or not to achieve the display purpose.
[0137] It should be noted that using LCD as the display screen is only an example of the present application. The wearable device of the present application can also use LED, OLED, etc. as the display screen.
[0138] Flash is a non-volatile memory used to store data for display content. Flash memory can retain data for a long time even without current supply, and its storage characteristics are equivalent to those of a hard disk. Therefore, flash memory has become the basis of storage media for various portable digital devices. For example, in the embodiment of the present application, Flash can be used to store pressure data.
[0139] TP is an input device that can be used to sense various operations of the user (eg, click, slide, etc.).
[0140] The driver layer may include driver modules corresponding to TP, Flash, LCD, NFC, BT, PPG, etc. The driver layer may also include other modules, such as BSP, GPIO, etc., which are not limited in this application.
[0141] The following uses the first electronic device as a wearable device 100 and the second electronic device as a mobile phone as an example to illustrate the interaction process between the software modules involved in the pressure value synchronization provided by the embodiment of the present application. Figure 7 As shown, the software modules involved in the pressure value synchronization process include the UI, Flash, pressure algorithm, health service, underlying software service and sensor interrupt or timer in the wearable device 100 and the health application in the mobile phone.
[0142] Please combine Figure 6 , refer to Figure 7 The health application in the application layer of the wearable device 100 can interact with the health service in the framework layer by calling a preset application program interface API, the health service can interact with the underlying software service, the underlying software service can interact with the sensor driver in the driver layer, and the sensor driver can be used to drive the acceleration sensor in the hardware layer to collect the user's acceleration data, and can be used to drive the PPG in the hardware layer to collect the user's heart rate data.
[0143] When the wearable device 100 is powered on and initialized, the health service can send a first notification message and a second notification message to the underlying software service. In response to receiving the first notification message, the underlying software service can first register a callback function with the target sensor (e.g., an accelerometer and a PPG). The function of the callback function is to enable the target sensor to return its collected data (e.g., acceleration data collected by the accelerometer and heart rate data collected by the PPG) to the underlying software service at a preset frequency. Then, the underlying software service can also add sub-services in the health service such as heart rate service, sleep service, respiratory pressure, heart health, blood oxygen, pressure service, etc. to the corresponding sensor control list. Finally, the underlying software service can also set the status of sub-services such as heart rate service, sleep service, respiratory pressure, heart health, blood oxygen, pressure service, etc. to Idle.
[0144] In response to receiving the second notification information, the underlying software service can first set the status of the heart rate service, sleep service, respiratory pressure, heart health, blood oxygen, pressure service and other sub-services to Open. Then, the underlying software service can also traverse the working parameters of the sub-services corresponding to each sensor. Then, the interrupt or timer of the sensor is turned on. Finally, the underlying software service sets the status of the sub-service to Working.
[0145] Sensors (accelerometers and PPG) can use periodic schedulers (e.g., scheduler_tick) and chip internal system interrupts to trigger the call of registered callback functions, and return the collected data (e.g., acceleration data and heart rate data) to the underlying software service through the sensor driver. The underlying software service reads and filters the data collected by the sensor, and then sends the filtered data to the health service. The health service can call the API provided by the pressure algorithm of the algorithm library to send the filtered data to the pressure algorithm in the algorithm library. The pressure algorithm calculates the user's wrist activity based on the user's acceleration data. When the wrist activity is less than the threshold, it starts to calculate the RRI value using the heart rate data to obtain 15 groups of RRI values. The pressure algorithm sends 15 groups of RRI values to the health service. The health service can store the 15 groups of RRI values and send the 15 groups of RRI values to the pressure algorithm. The pressure algorithm can calculate a pressure value based on the 15 groups of RRI values. After that, the pressure algorithm sends the pressure value to the health service. The health service can store the pressure value in Flash or send the pressure value to the UI for display. When Flash receives the pressure value synchronization request information sent by the health application of the mobile phone, Flash can synchronize the pressure value that meets the conditions to the health application of the mobile phone through the Bluetooth channel.
[0146] Combine the following Figure 8 A pressure value synchronization method provided in an embodiment of the present application is described in detail.
[0147] like Figure 8 As shown, the pressure value synchronization method provided in the embodiment of the present application is applied to a first electronic device (the first electronic device is a wearable device), and the method may include the following steps:
[0148] Step 301: Acquire multiple pressure values and a pressure value generation time period corresponding to each pressure value.
[0149] Specifically, the memory of the wearable device may obtain multiple pressure values generated by the pressure algorithm and the pressure value generation time period corresponding to each pressure value from the health service.
[0150] Among them, the method for generating the pressure value and the method for determining the pressure value generation time period corresponding to each pressure value can refer to the description of steps 201 to 205, which will not be repeated here. For example, when the pressure algorithm starts to calculate the first set of RRI values, the health service obtains the system time once and determines the system time as the start time for generating the pressure value. When the pressure algorithm calculates a pressure value based on 15 sets of RRI values, the health service obtains the system time again and determines the system time as the end time for generating the pressure value.
[0151] It should be noted that executing steps 201 to 205 once can obtain a set of pressure data (including a pressure value, and a pressure value generation time period corresponding to the pressure value). Executing steps 201 to 205 multiple times can obtain multiple sets of pressure data (including multiple pressure values, and pressure value generation time periods corresponding to the multiple pressure values one by one).
[0152] It should also be noted that the embodiments of the present application do not limit the specific implementation method of obtaining multiple sets of pressure data. For example, the memory of the wearable device can obtain a set of pressure data from the health service each time. Then, multiple sets of pressure data are obtained by multiple acquisitions. For another example, the memory of the wearable device can obtain multiple sets of pressure data from the health service at one time.
[0153] Step 302: storing a plurality of pressure values and corresponding pressure value generation time periods in the memory of the wearable device in sequence according to the pressure value generation time period, wherein the pressure value generation time period includes a generation start time and a generation end time.
[0154] The specific method of storing multiple pressure values and the corresponding pressure value generation time periods can refer to the description of step 206, which will not be repeated here. For example, multiple groups of pressure data can be stored in multiple storage pages in the order of the pressure value generation time periods. Each storage page stores a group of pressure data.
[0155] Step 303: In response to the received pressure value synchronization request information, the system time C of the wearable device is obtained.
[0156] The wearable device and the mobile phone can establish a communication connection to achieve data transmission. For example, the wearable device and the mobile phone can transmit data by establishing a Bluetooth channel.
[0157] The wearable device obtains the system time of the wearable device in response to receiving the pressure value synchronization request information sent by the mobile phone.
[0158] It should be noted here that after the wearable device and the mobile phone are successfully paired via Bluetooth, the mobile phone can correct the system time of the wearable device to the system time of the mobile phone. Therefore, after the wearable device and the mobile phone are successfully paired via Bluetooth, the system time of the wearable device is the correct system time, and it will not be a jumping or wrong system time.
[0159] In the embodiment of the present application, the mobile phone can trigger the sending of pressure value synchronization request information to the wearable device in the following ways.
[0160] In the first way, when the mobile phone and the wearable device establish a communication connection (eg, a Bluetooth connection) for the first time, in response to the mobile phone and the wearable device being paired successfully, the mobile phone can send a pressure value synchronization request message to the wearable device.
[0161] In the second method, when the mobile phone establishes a communication connection with the wearable device, the user can perform a pull-down operation on the health application interface of the mobile phone, and the mobile phone can send a pressure value synchronization request information to the wearable device in response to detecting the pull-down operation on the health application interface.
[0162] In the third method, when the mobile phone establishes a communication connection with the wearable device, the wearable device obtains the movement increment of the wearable device, for example, the movement increment can be the step increment, calorie increment, profit increment or time increment within a preset time period. When the movement increment is greater than the increment threshold, the wearable device can send a pressure value synchronization notification to the mobile phone, and the pressure value synchronization notification is used to notify the mobile phone to request synchronization of the pressure value of the wearable device. In this way, the mobile phone can send pressure value synchronization request information to the wearable device in response to receiving the pressure value synchronization notification sent by the wearable device.
[0163] The pressure value synchronization request information includes a requested synchronization time period, which can be represented by a requested start time and a requested end time. The pressure value synchronization request information is used to request the wearable device to synchronize pressure data to the mobile phone.
[0164] The embodiment of the present application does not limit the method for determining the requested synchronization time period in the pressure value synchronization request information.
[0165] In some embodiments, the mobile phone may obtain the request end time of the last pressure value synchronization request and the current system time before sending the pressure value synchronization request information. Then, the request end time of the last pressure value synchronization request is determined as the request start time of this pressure value synchronization request, and the current system time is determined as the request end time of this pressure value synchronization request.
[0166] In some embodiments, the health application of the mobile phone can pre-set the total amount of pressure values that need to be synchronized each time. For example, three days of pressure values are synchronized each time. In this way, before sending the pressure value synchronization request information, the mobile phone can first obtain the current system time and determine the current system time as the request end time of this pressure value synchronization request; then, the time three days forward based on the current system time is determined as the request start time of this pressure value synchronization request.
[0167] In some embodiments, the health application of the mobile phone can pre-set the total amount of pressure values that need to be synchronized each time. For example, synchronize three days of pressure values each time. In this way, the mobile phone can obtain the request end time of the last pressure value synchronization request before sending the pressure value synchronization request information, and determine the request end time of the last pressure value synchronization request as the request start time of this pressure value synchronization request. Then, determine a time three days back based on the request end time of the last pressure value synchronization request. If this time is later than the current system time, the current system time is determined as the request end time of this pressure value synchronization request; if this time is earlier than or equal to the current system time, the time three days back based on the request end time of the last pressure value synchronization request is determined as the request end time of this pressure value synchronization request.
[0168] In some embodiments, the user can also enter the time period for requesting synchronization in the health application interface of the mobile phone, so that the mobile phone determines the time period for requesting synchronization entered by the user as the requested synchronization time period in the pressure value synchronization request information. It should be understood that the requested end time entered by the user cannot be later than the current system time.
[0169] It can be seen that in the embodiment of the present application, the request end time may be earlier than or equal to the system time C obtained by the wearable device.
[0170] Step 304, traverse multiple pressure value generation time periods stored in the memory.
[0171] Step 305 , determining whether the traversed pressure value generation time period satisfies the requirement that the generation end time is later than the request end time and the generation end time is earlier than the system time.
[0172] Step 306, when the generation end time is later than the request end time and earlier than the system time, the traversal is terminated, and the pressure value whose traversed pressure value generation time period partially or completely overlaps with the request synchronization time period is determined as the target synchronization pressure value.
[0173] After receiving the pressure value synchronization request information, the wearable device first obtains the system time; then, starts to traverse multiple pressure value generation time periods stored in the memory to determine a pressure value generation time period that meets the requested synchronization time period.
[0174] The traversal end condition of the wearable device is that the generation end time is later than the request end time and the generation end time is earlier than the system time.
[0175] For example, Fig. 9 As shown, it is assumed that the pressure value generation time period (S k ,E k ), generate the end time E k is the time after the jump, and generates the end time E k After the jump to system time C. Assume that the wearable device starts traversing from the pressure value generation time period (S1, E1) in the memory, and the generation end time E1 is earlier than the request end time E, which does not meet the traversal end condition. Therefore, the pressure value generation time period (S2, E2) is continued to be traversed. The generation end time E2 is earlier than the request end time E, which does not meet the traversal end condition, and so on. When traversing to the pressure value generation time period (S k ,E k ), due to the generation end time E k After the jump to system time C, the judgment result is: the generation end time E k Later than the request end time E, but the generation end time E k Later than system time C, it can be seen that the traversal end condition is still not met in this case, so the traversal will not end at this time. Instead, the traversal will continue until the pressure value generation time period (S k+2 ,E k+2 ), the judgment result is: Generate end time E k+2 Later than the request end time E, and the generation end time E k+2 Earlier than the system time C, in this case, the traversal end condition is met, so the wearable device traverses the pressure value generation time period (S k+2 ,E k+2 ), the traversal stops and the subsequent pressure value generation time period is no longer traversed. In this way, the traversed pressure value generation time period (S1, E1) to (S k+2 ,E k+2), the pressure value that meets the synchronization condition is determined as the target synchronization pressure value, and the pressure value corresponding to the pressure value generation time period that has not been traversed will not be determined as the target synchronization pressure value.
[0176] contrast Figure 4B and Fig. 9 It can be seen that Figure 4B The corresponding traversal scheme takes the generation end time later than the request end time as the traversal end condition. In this way, at the generation end time E k When the system time jumps to after C, it is in the pressure value generation period (S k ,E k ) will not be traversed, and the corresponding pressure value will not be determined as the target synchronization pressure value. k+1 ,E k+1 ) and (S k+2 ,E k+2 ) will not be determined as the target pressure value. Fig. 9 The corresponding traversal scheme uses the generation end time later than the request end time and the generation end time earlier than the system time as the traversal end condition. In this way, at the generation end time E k When the system time C is reached, the pressure value generation time period (S k ,E k ) does not stop traversing, but traverses until the pressure value generation time period (S k+2 ,E k+2 ) and then stop traversal. In this way, the pressure value generation time period (S k+1 ,E k+1 ) and (S k+2 ,E k+2 ) will also be traversed, and further, the pressure value generation time period (S k+1 ,E k+1 ) and (S k+2 ,E k+2 ) is also determined as the target synchronization pressure value. k After the system time jumps to C, some pressure values cannot be synchronized to the mobile phone.
[0177] The embodiment of the present application does not limit the method for determining the pressure generation time period for the initial traversal.
[0178] In some embodiments, after the wearable device establishes a communication connection with the mobile phone, when the wearable device receives the pressure value synchronization request information sent by the mobile phone for the first time, the traversal can start from the first storage page in the memory. Figure 3 and Fig. 9When the wearable device receives the pressure value synchronization request information sent by the mobile phone for the first time, the wearable device can start traversing from storage page 1. Specifically, the wearable device can read the pressure value F1 in storage page 1, as well as the generation start time S1 and the generation end time E1. Then, the subsequent storage pages are traversed in order of increasing storage page numbers, for example, traversing storage page 1 and traversing storage page 2 in sequence, until traversing to storage page (K+2), and then the traversal ends.
[0179] It should be noted that, since the storage pages in the memory are limited, if the traversal ends after traversing to the last storage page, the traversal will start from the first storage page again until the traversal ends after traversing to a storage page that meets the traversal ends condition.
[0180] In some embodiments, after the wearable device establishes a communication connection with the mobile phone, if the wearable device does not receive the pressure value synchronization request information sent by the mobile phone for the first time (i.e., the pressure value synchronization request information is received for the i-th time, i is a positive integer greater than 1), the last storage page traversed during the last synchronization of the pressure value (which may be referred to as the first storage page in the embodiment of the present application) can be determined first. The last synchronization of the pressure value refers to the last storage page traversed in step 304 when steps 301 to 306 were executed last time.
[0181] Then, if the first storage page is not the last storage page in the storage area, the traversal starts from the second storage page, wherein the second storage page is a storage page adjacent to the first storage page and located after the first storage page. If the first storage page is the last storage page in the memory, the traversal starts from the first storage page in the memory.
[0182] In the embodiment of the present application, the pressure value that meets the synchronization condition is determined as the target synchronization pressure value from the traversed pressure value generation time period. The synchronization condition is: the pressure value generation time period in the traversed pressure value generation time period partially or completely overlaps with the requested synchronization time period.
[0183] Specifically, the situations where the pressure value generation time period partially or completely overlaps with the request synchronization time period may include the following four situations:
[0184] The first case: the generation start time in the pressure value generation time period is later than the request start time, and the generation end time is earlier than the request end time. For example, Fig.10As shown in (a), taking the traversed pressure value generation time period (S1, E1) as an example, the generation start time S1 is later than the request start time S, and the generation end time E1 is earlier than the request end time E. In this way, the pressure value generation time period (S1, E1) and the request synchronization time period (S, E) have an overlapping time period (S1, E1), that is, the synchronization condition is met, and the pressure value F1 corresponding to the pressure value generation time period (S1, E1) is determined as the target pressure value.
[0185] The second case: in the pressure value generation time period, the generation start time is earlier than the request start time, the generation end time is later than the request start time, and the generation end time is earlier than the request end time. For example, Fig.10 As shown in (b), taking the traversed pressure value generation time period (S1, E1) as an example, the generation start time S1 is earlier than the request start time S, the generation end time E1 is later than the request start time S, and the generation end time E1 is earlier than the request end time E. In this way, the pressure value generation time period (S1, E1) and the request synchronization time period (S, E) have an overlapping time period (S, E1), that is, the synchronization condition is met, and the pressure value F1 corresponding to the pressure value generation time period (S1, E1) is determined as the target pressure value.
[0186] The third case: the generation start time in the pressure value generation time period is earlier than the request start time, and the generation end time is later than the request end time. For example, Fig.10 As shown in (c), taking the traversed pressure value generation time period (S1, E1) as an example, the generation start time S1 is earlier than the request start time S, and the generation end time E1 is later than the request end time E. In this way, the pressure value generation time period (S1, E1) and the request synchronization time period (S, E) have an overlapping time period (S, E), that is, the synchronization condition is met, and the pressure value F1 corresponding to the pressure value generation time period (S1, E1) is determined as the target pressure value.
[0187] The fourth case: in the pressure value generation time period, the generation start time is later than the request start time, the generation start time is earlier than the request end time, and the generation end time is later than the request end time. For example, Fig.10 As shown in (d) in the figure, taking the traversed pressure value generation time period (S1, E1) as an example, the generation start time S1 is later than the request start time S and earlier than the request end time E, and the generation end time E1 is later than the request end time E. In this way, the pressure value generation time period (S1, E1) and the request synchronization time period (S, E) have an overlapping time period (S1, E), that is, the synchronization condition is met, and the pressure value F1 corresponding to the pressure value generation time period (S1, E1) is determined as the target pressure value.
[0188] It should be noted that the embodiment of the present application does not limit the timing of determining the target pressure value. For example, in the embodiment of the present application, the wearable device can determine whether the pressure value generation time period meets the traversal end condition when traversing to each pressure value generation time period (such as a storage page), and whether the pressure value corresponding to the pressure value generation time period is the target pressure value. For another example, in the embodiment of the application, the wearable device can also determine whether the pressure value generation time period meets the traversal end condition when traversing to each pressure value generation time period; then, after the traversal is completed, all pressure values that meet the synchronization condition are determined as the target pressure value from all the traversed pressure value generation time periods.
[0189] It should be noted that, in an embodiment of the present application, "later than" may include a situation that is later than or equal to, and "earlier than" may include a situation that is earlier than or equal to. For example, the generation end time being later than the request end time includes the situation that the generation end time is later than the request end time, or the generation end time is equal to the request end time. For another example, the generation end time being earlier than the system time includes the situation that the generation end time is earlier than the system time, or the generation end time is equal to the system time. For another example, the generation start time being later than the request start time includes the situation that the generation start time is later than the request start time, or the generation start time is equal to the request start time. They are not listed one by one here.
[0190] Step 307: synchronizing the target pressure value to a mobile phone that is communicatively connected to the wearable device.
[0191] After the traversal is completed and the target pressure value is determined, the wearable device can send all the determined target pressure values to the mobile phone.
[0192] In summary, the pressure value synchronization method provided in the embodiment of the present application takes the generation end time later than the request end time and the generation end time earlier than the system time as the traversal end condition, which can solve the problem of generating the end time E k After the system time jumps to C, some pressure values cannot be synchronized to the mobile phone.
[0193] The various method embodiments described in this document may be independent solutions or may be combined according to internal logic, and these solutions all fall within the protection scope of this application.
[0194] It can be understood that, in the above-mentioned various method embodiments, the methods and operations implemented by the first electronic device can also be implemented by components (such as chips, modules or circuits) that can be used in the first electronic device.
[0195] The above embodiments introduce the pressure value synchronization method provided by the present application. It is understandable that, in order to implement the above functions, the first electronic device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0196] The embodiment of the present application can divide the functional modules of the first electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0197] Above, combined Figures 1 to 10 The pressure value synchronization method provided by the embodiment of the present application is described in detail. Fig.11 and Fig.12 The device provided in the embodiment of the present application is described in detail. It should be understood that the description of the device embodiment corresponds to the description of the method embodiment, so the contents not described in detail can be referred to the method embodiment above, and for the sake of brevity, they will not be repeated here.
[0198] See also Fig.11 , Fig.11 This is a structural block diagram of a pressure value synchronization device provided in an embodiment of the present application. The device can be a part of a first electronic device and applied in the first electronic device. It can also be the first electronic device, which is not limited in the present application. Fig.11 As shown, the device 400 may include: a pressure value acquisition module 401, a storage module 402, a system time acquisition module 403, a traversal module 404 and a synchronization module 405. The device 400 may perform the above Figures 1 to 10 The operations performed by the first electronic device in any one of the method embodiments shown.
[0199] For example, in an optional embodiment of the present application, the pressure value acquisition module 401 may be used to acquire multiple pressure values and a pressure value generation time period corresponding to each of the pressure values; the pressure value generation time period includes a generation start time and a generation end time;
[0200] The storage module 402 may be configured to sequentially store the plurality of pressure values and the corresponding pressure value generation time periods in the memory of the first electronic device according to the pressure value generation time periods;
[0201] The system time acquisition module 403 may be used to acquire the system time of the first electronic device in response to the received pressure value synchronization request information; wherein the pressure value synchronization request information includes a requested synchronization time period, and the requested synchronization time period includes a requested start time and a requested end time;
[0202] The traversal module 404 may be configured to traverse the plurality of pressure value generation time periods stored in the memory, and when the generation end time is later than the request end time and the generation end time is earlier than the system time, terminate the traversal, and determine the pressure value of the traversed pressure value generation time period partially or completely overlapping with the request synchronization time period as the target synchronization pressure value;
[0203] The synchronization module 405 may be used to synchronize the target pressure value to a second electronic device that is communicatively connected to the first electronic device.
[0204] In a possible implementation, the traversal module 404 is specifically used to determine the pressure value in the traversed pressure value generation time period whose generation start time is later than the request start time and whose generation end time is earlier than the request end time as the target synchronization pressure value.
[0205] In one possible implementation, the traversal module 404 is specifically used to determine the pressure value in the traversed pressure value generation time period whose generation start time is earlier than the request start time, whose generation end time is later than the request start time, and whose generation end time is earlier than the request end time as the target synchronization pressure value.
[0206] In a possible implementation, the traversal module 404 is specifically used to determine the pressure value in the traversed pressure value generation time period whose generation start time is earlier than the request start time and whose generation end time is later than the request end time as the target synchronization pressure value.
[0207] In one possible implementation, the traversal module 404 is specifically used to determine the pressure value in the traversed pressure value generation time period whose generation start time is later than the request start time, whose generation start time is earlier than the request end time, and whose generation end time is later than the request end time as the target synchronization pressure value.
[0208] In a possible implementation, the multiple pressure values are respectively stored in multiple storage pages of the memory, and each of the storage pages includes a pressure value and a pressure value generation time period corresponding to the pressure value.
[0209] In a possible implementation, the traversal module 404 is specifically configured to determine to start traversal from the first storage page in the memory when the pressure value synchronization request information is received for the first time after the first electronic device establishes a communication connection with the second electronic device.
[0210] In one possible implementation, the traversal module 404 is specifically used to determine the first storage page when the pressure value synchronization request information is received for the i-th time after the first electronic device establishes a communication connection with the second electronic device, and the first storage page is the last storage page traversed during the last pressure value synchronization; wherein i is a positive integer greater than 1; when the first storage page is not the last storage page in the storage area, determine to start traversal from the second storage page, wherein the second storage page is a storage page adjacent to the first storage page and located after the first storage page.
[0211] In a possible implementation, the traversal module 404 is specifically configured to determine to start traversal from the first storage page in the memory when the first storage page is the last storage page in the memory.
[0212] In a possible implementation, the apparatus 400 may further include a receiving module 406, and the receiving module 406 may be configured to receive the pressure value synchronization request information sent by the second electronic device when the first electronic device establishes a communication connection with the second electronic device.
[0213] In one possible implementation, the receiving module 406 can be used to obtain the motion increment of the first electronic device when the first electronic device and the second electronic device establish a communication connection; when the motion increment is greater than an increment threshold, send a pressure value synchronization notification to the second electronic device; wherein the pressure value synchronization notification is used to notify the second electronic device to request synchronization of the pressure value of the first electronic device.
[0214] That is, the device 400 can realize the corresponding Figures 1 to 10 The steps or processes performed by the first electronic device in any of the pressure value synchronization method embodiments shown in the figure may include a method for performing Figures 1 to 10The modules of the method executed by the first electronic device in any of the pressure value synchronization method embodiments shown. It should be understood that the specific process of each module executing the above corresponding steps has been described in detail in the above pressure value synchronization method embodiment, and will not be repeated here for the sake of brevity.
[0215] The embodiment of the present application further provides a processing device, which includes at least one processor and a communication interface. The communication interface is used to provide information input and / or output to the at least one processor, and the at least one processor is used to execute the method in the above method embodiment.
[0216] It should be understood that the above-mentioned processing device can be a chip. Fig.11 , Fig.11 A structural block diagram of a chip provided in an embodiment of the present application. Fig.11 The chip shown may be a general-purpose processor or a dedicated processor. The chip 500 may include at least one processor 501. The at least one processor 501 may be used to support Fig.11 The device shown performs Figures 1 to 10 The technical solution shown in any one of the embodiments.
[0217] Optionally, the chip 500 may further include a transceiver 502, which is used to accept the control of the processor 501 and to support Fig.11 The device shown performs Figures 1 to 10 The technical solution shown in any one of the embodiments. Optionally, Fig.11 The chip 500 shown may further include a storage medium 503. Specifically, the transceiver 502 may be replaced by a communication interface, and the communication interface provides information input and / or output for the at least one processor 501.
[0218] It should be noted that Fig.11The chip 500 shown can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), application specific integrated circuits (ASIC), system on chip (SoC), central processor unit (CPU), network processor (NP), digital signal processor (DSP), micro controller unit (MCU), controller, state machine, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.
[0219] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0220] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0221] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer program product, which includes: a computer program or instruction, when the computer program or instruction is run on a computer, the computer executes Figures 1 to 10 A method according to any one of the embodiments shown.
[0222] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer storage medium, which stores a computer program or instruction, and when the computer program or instruction is run on a computer, the computer executes Figures 1 to 10 A method according to any one of the embodiments shown.
[0223] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides an electronic device. The electronic device includes but is not limited to wearable devices such as smart watches and smart bracelets. The electronic device may include the pressure value synchronization device provided in the above embodiment of the present application.
[0224] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, device modules and electronic devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0225] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0226] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0227] In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.
[0228] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0229] The pressure value synchronization device, processing device, chip, computer storage medium, computer program product, and electronic device provided in the above-mentioned embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding beneficial effects of the method provided above, and will not be repeated here.
[0230] It should be understood that in each embodiment of the present application, the execution order of each step should be determined by its function and internal logic, and the size of the sequence number of each step does not mean the order of execution and does not limit the implementation process of the embodiment.
[0231] Each part of this specification is described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the pressure value synchronization device, chip, computer storage medium, computer program product, and electronic device, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0232] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0233] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.
Claims
1. A pressure value synchronization method, characterized in that: Applied to a first electronic device, where the first electronic device is a wearable device, the method includes: Acquire multiple pressure values and a pressure value generation time period corresponding to each of the pressure values; the pressure value generation time period includes a generation start time and a generation end time; storing the plurality of pressure values and the corresponding pressure value generation time periods in sequence in a memory of the first electronic device according to the pressure value generation time periods; In response to the received pressure value synchronization request information, acquiring the system time of the first electronic device; wherein the pressure value synchronization request information includes a requested synchronization time period, and the requested synchronization time period includes a requested start time and a requested end time; traversing the plurality of pressure value generation time periods stored in the memory, and when the generation end time is later than the request end time and the generation end time is earlier than the system time, ending the traversal, and determining the pressure value of the traversed pressure value generation time period partially or completely overlapping with the request synchronization time period as the target synchronization pressure value; and, when the generation end time is earlier than the request end time or the generation end time is later than the system time, continuing to traverse the plurality of pressure value generation time periods; The target synchronization pressure value is synchronized to a second electronic device that is communicatively connected to the first electronic device.
2. The method according to claim 1, characterized in that The step of determining the pressure value whose traversed pressure value generation time period partially or completely overlaps with the requested synchronization time period as the target synchronization pressure value includes: The pressure value in the traversed pressure value generation time period whose generation start time is later than the request start time and whose generation end time is earlier than the request end time is determined as the target synchronization pressure value.
3. The method according to claim 1, characterized in that The step of determining the pressure value whose traversed pressure value generation time period partially or completely overlaps with the requested synchronization time period as the target synchronization pressure value includes: The pressure value in the traversed pressure value generation time period whose generation start time is earlier than the request start time, whose generation end time is later than the request start time, and whose generation end time is earlier than the request end time is determined as the target synchronization pressure value.
4. The method according to claim 1, characterized in that: The step of determining the pressure value whose traversed pressure value generation time period partially or completely overlaps with the requested synchronization time period as the target synchronization pressure value includes: The pressure value in the traversed pressure value generation time period whose generation start time is earlier than the request start time and whose generation end time is later than the request end time is determined as the target synchronization pressure value.
5. The method according to claim 1, characterized in that The step of determining the pressure value whose traversed pressure value generation time period partially or completely overlaps with the requested synchronization time period as the target synchronization pressure value includes: The pressure value in the traversed pressure value generation time period whose generation start time is later than the request start time, whose generation start time is earlier than the request end time, and whose generation end time is later than the request end time is determined as the target synchronization pressure value.
6. The method according to claim 1, characterized in that The multiple pressure values are respectively stored in multiple storage pages of the memory, and each of the storage pages includes a pressure value and a pressure value generation time period corresponding to the pressure value.
7. The method according to claim 6, characterized in that The traversing the plurality of pressure value generation time periods stored in the memory comprises: After the first electronic device establishes a communication connection with the second electronic device, when the pressure value synchronization request information is received for the first time, it is determined to start traversing from the first storage page in the memory.
8. The method according to claim 6, characterized in that The traversing the plurality of pressure value generation time periods stored in the memory comprises: After the first electronic device establishes a communication connection with the second electronic device, when the pressure value synchronization request information is received for the i-th time, determining a first storage page, where the first storage page is the last storage page traversed during the last synchronization of the pressure value; wherein i is a positive integer greater than 1; When the first storage page is not the last storage page in the storage area, it is determined to start traversal from a second storage page, wherein the second storage page is a storage page adjacent to the first storage page and located after the first storage page.
9. The method according to claim 8, characterized in that In the case that the first storage page is the last storage page in the memory, it is determined to start traversing from the first storage page in the memory.
10. The method according to claim 1, characterized in that The method further comprises: When the first electronic device establishes a communication connection with the second electronic device, the pressure value synchronization request information sent by the second electronic device is received.
11. The method according to claim 1, characterized in that: The method further comprises: When the first electronic device establishes a communication connection with the second electronic device, obtaining a movement increment of the first electronic device; In the case where the movement increment is greater than the increment threshold, a pressure value synchronization notification is sent to the second electronic device; wherein the pressure value synchronization notification is used to notify the second electronic device to request synchronization of the pressure value of the first electronic device.
12. A pressure value synchronization device, characterized in that: The pressure value synchronization device comprises: A pressure value acquisition module, used to acquire multiple pressure values and a pressure value generation time period corresponding to each of the pressure values; the pressure value generation time period includes a generation start time and a generation end time; A storage module, configured to sequentially store the plurality of pressure values and the corresponding pressure value generation time periods in a memory of the first electronic device according to the pressure value generation time periods; A system time acquisition module, configured to acquire the system time of the first electronic device in response to the received pressure value synchronization request information; wherein the pressure value synchronization request information includes a requested synchronization time period, and the requested synchronization time period includes a requested start time and a requested end time; a traversal module, configured to traverse the plurality of pressure value generation time periods stored in the memory, and terminate the traversal when the generation end time is later than the request end time and the generation end time is earlier than the system time, and determine the pressure value of the traversed pressure value generation time period partially or completely overlapping with the request synchronization time period as the target synchronization pressure value; and, when the generation end time is earlier than the request end time or the generation end time is later than the system time, continue to traverse the plurality of pressure value generation time periods; A synchronization module is used to synchronize the target synchronization pressure value to a second electronic device that is communicatively connected to the first electronic device.
13. An electronic device, characterized in that: The electronic device comprises: one or more processors and one or more memories; the one or more memories store computer programs or instructions, and when the computer programs or instructions are executed by the one or more processors, the electronic device executes the method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 11.
