CN117708231B - Pressure value synchronization method and device and electronic equipment - Google Patents
Pressure value synchronization method and device and electronic equipment Download PDFInfo
- Publication number
- CN117708231B CN117708231B CN202310550588.7A CN202310550588A CN117708231B CN 117708231 B CN117708231 B CN 117708231B CN 202310550588 A CN202310550588 A CN 202310550588A CN 117708231 B CN117708231 B CN 117708231B
- Authority
- CN
- China
- Prior art keywords
- pressure value
- time
- generation
- synchronization
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2315—Optimistic concurrency control
- G06F16/2322—Optimistic concurrency control using timestamps
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Electric Clocks (AREA)
Abstract
Description
技术领域Technical Field
本申请属于电子设备技术领域,尤其涉及一种压力值同步方法、装置及电子设备。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
随着可穿戴设备(例如,智能手表或智能手环)的发展,可穿戴设备不仅具有通话、拍照等功能,还具有运动、健康服务功能。例如,可以通过可穿戴设备,监测用户的步数、卡路里、心率、血氧、压力值等健康数据。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.
进一步的,可以将可穿戴设备监测的健康数据同步至用户的手机,以使用户可以通过手机查看健康数据,提高用户体验。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.
但是,发明人发现在使用过程中,一些可穿戴设备可能会发生系统时间跳变的情况。如果可穿戴设备发生时间跳变,可能导致可穿戴设备的压力值无法同步到手机,从而影响用户体验。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
本申请提供一种压力值同步方法、装置及电子设备,能够解决在生成结束时间跳变至系统时间之后的情况下,部分压力值无法同步至手机的问题。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.
第一方面,本申请提供一种压力值同步方法,应用于第一电子设备,所述第一电子设备为可穿戴设备,所述方法包括:获取多个压力值,以及各所述压力值对应的压力值生成时间段;所述压力值生成时间段包括生成开始时间和生成结束时间;在所述第一电子设备的存储器中按照所述压力值生成时间段依次存储所述多个压力值,以及对应的压力值生成时间段;响应于接收到的压力值同步请求信息,获取所述第一电子设备的系统时间;其中,所述压力值同步请求信息包括请求同步时间段,所述请求同步时间段包括请求开始时间和请求结束时间;遍历所述存储器中存储的多个所述压力值生成时间段,在所述生成结束时间晚于所述请求结束时间、且所述生成结束时间早于所述系统时间的情况下,结束遍历,并将遍历到的所述压力值生成时间段与所述请求同步时间段部分或者全部重叠的压力值,确定为目标同步压力值;将所述目标压力值同步至与所述第一电子设备通信连接的第二电子设备。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.
这样,假设可穿戴设备的存储器中存储的压力值生成时间段(Sk,Ek)中,生成结束时间Ek为跳变后的时间,并且生成结束时间Ek跳变至系统时间C之后。当遍历至压力值生成时间段(Sk,Ek)时,判断结果为:生成结束时间Ek晚于请求结束时间E,但生成结束时间Ek晚于系统时间C,不满足遍历结束条件,因此,此时并不会结束遍历。而会继续遍历后面的压力值生成时间段,直至遍历至压力值生成时间段(Sk+2,Ek+2)时,判断结果为:生成结束时间Ek+2晚于请求结束时间E,且生成结束时间Ek+2早于系统时间C,此时满足遍历结束条件,因此,可穿戴设备遍历完压力值生成时间段(Sk+2,Ek+2)后,停止遍历。这样,采用上述压力值同步方法,即使发生生成结束时间Ek跳变至系统时间C之后,也不会出现部分压力值无法同步至手机的问题,提高用户体验。In this way, it is assumed that in the pressure value generation time period (S k , E k ) stored in the memory of the wearable device, the generation end time E k is the time after the jump, and the generation end time E k jumps to after the system time C. When traversing to the pressure value generation time period (S k , E k ), the judgment result is: the generation end time E k is later than the request end time E, but the generation end time E k is later than the system time C, and the traversal end condition is not met. Therefore, the traversal will not end at this time. Instead, the subsequent pressure value generation time period will continue to be traversed until the pressure value generation time period (S k+2 , E k+2 ) is traversed. The judgment result is: the generation end time E k+2 is later than the request end time E, and the generation end time E k+2 is earlier than the system time C. At this time, the traversal end condition is met. Therefore, after the wearable device traverses the pressure value generation time period (S k+2 , E k+2 ), the traversal stops. In this way, by adopting the above pressure value synchronization method, even if the generation end time Ek jumps to the system time C, there will be no problem that some pressure values cannot be synchronized to the mobile phone, thereby improving the user experience.
具体的,可以采用以下四种实现方式确定目标同步压力值。Specifically, the target synchronization pressure value may be determined in the following four implementation methods.
在一种可能的实现方式中,所述将遍历到的所述压力值生成时间段与所述请求同步时间段部分或者全部重叠的压力值,确定为目标同步压力值,包括:将遍历到的所述压力值生成时间段中所述生成开始时间晚于所述请求开始时间,且所述生成结束时间早于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述将遍历到的所述压力值生成时间段与所述请求同步时间段部分或者全部重叠的压力值,确定为目标同步压力值,包括:将遍历到的所述压力值生成时间段中所述生成开始时间早于所述请求开始时间、所述生成结束时间晚于所述请求开始时间、且所述生成结束时间早于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述将遍历到的所述压力值生成时间段与所述请求同步时间段部分或者全部重叠的压力值,确定为目标同步压力值,包括:将遍历到的所述压力值生成时间段中所述生成开始时间早于所述请求开始时间,且所述生成结束时间晚于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述将遍历到的所述压力值生成时间段与所述请求同步时间段部分或者全部重叠的压力值,确定为目标同步压力值,包括:将遍历到的所述压力值生成时间段中所述生成开始时间晚于所述请求开始时间、所述生成开始时间早于所述请求结束时间、且所述生成结束时间晚于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述多个压力值分别存储在所述存储器的多个存储页,每个所述存储页包括一个压力值以及所述一个压力值对应的压力值生成时间段。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.
这样,以存储页的方式存储压力数据,可以解决可穿戴设备存储空间有限的问题。并且便于执行遍历操作。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.
具体的,在执行遍历操作时,可以采用以下三种实现方式确定开始遍历的存储页。Specifically, when performing a traversal operation, the following three implementation methods may be used to determine the storage page to start traversal.
在一种可能的实现方式中,所述遍历所述存储器中存储的多个所述压力值生成时间段,包括:在所述第一电子设备与所述第二电子设备建立通信连接后,首次接收到所述压力值同步请求信息的情况下,确定从所述存储器中首个存储页开始遍历。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.
在一种可能的实现方式中,所述遍历所述存储器中存储的多个所述压力值生成时间段,包括:在所述第一电子设备与所述第二电子设备建立通信连接后,第i次接收到所述压力值同步请求信息的情况下,确定第一存储页,所述第一存储页为上一次同步压力值时遍历的最后一个存储页;其中,所述i为大于1的正整数;在所述第一存储页不为所述存储区域中最后一个存储页的情况下,确定从第二存储页开始遍历,其中,所述第二存储页为与所述第一存储页相邻、且位于所述第一存储页之后的存储页。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 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, 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.
在一种可能的实现方式中,在所述第一存储页为所述存储器中最后一个存储页的情况下,确定从所述存储器中首个存储页开始遍历。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.
本申请可以在以下几种情况下,第一电子设备可以接收到第二电子设备发送的压力值同步请求信息。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.
在一种可能的实现方式中,所述方法还包括:在所述第一电子设备与所述第二电子设备建立通信连接的情况下,接收所述第二电子设备发送的所述压力值同步请求信息。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.
这种情况下,第二电子设备可以自动向第一电子设备发送压力值同步请求信息。第二电子设备也可以响应于用户在第二电子设备的健康应用程序界面的下拉操作,向第一电子设备发送压力值同步请求信息。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.
在一种可能的实现方式中,所述方法还包括:在所述第一电子设备与所述第二电子设备建立通信连接的情况下,获取所述第一电子设备的运动增量;在所述运动增量大于增量阈值的情况下,向所述第二电子设备发送压力值同步通知;其中,所述压力值同步通知用于通知所述第二电子设备请求同步所述第一电子设备的压力值。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.
第二方面,本申请还提供一种压力值同步装置,所述压力值同步装置包括:In a second aspect, the present application further provides a pressure value synchronization device, the pressure value synchronization device comprising:
压力值获取模块,用于获取多个压力值,以及各所述压力值对应的压力值生成时间段;所述压力值生成时间段包括生成开始时间和生成结束时间;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;
同步模块,用于将所述目标压力值同步至与所述第一电子设备通信连接的第二电子设备。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.
在一种可能的实现方式中,所述遍历模块,用于将遍历到的所述压力值生成时间段中所述生成开始时间晚于所述请求开始时间,且所述生成结束时间早于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述遍历模块,用于将遍历到的所述压力值生成时间段中所述生成开始时间早于所述请求开始时间、所述生成结束时间晚于所述请求开始时间、且所述生成结束时间早于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述遍历模块,用于将遍历到的所述压力值生成时间段中所述生成开始时间早于所述请求开始时间,且所述生成结束时间晚于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述遍历模块,用于将遍历到的所述压力值生成时间段中所述生成开始时间晚于所述请求开始时间、所述生成开始时间早于所述请求结束时间、且所述生成结束时间晚于所述请求结束时间的压力值,确定为目标同步压力值。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.
在一种可能的实现方式中,所述多个压力值分别存储在所述存储器的多个存储页,每个所述存储页包括一个压力值以及所述一个压力值对应的压力值生成时间段。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.
这样,以存储页的方式存储压力数据,可以解决可穿戴设备存储空间有限的问题。并且便于执行遍历操作。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.
在一种可能的实现方式中,所述遍历模块,用于在所述第一电子设备与所述第二电子设备建立通信连接后,首次接收到所述压力值同步请求信息的情况下,确定从所述存储器中首个存储页开始遍历。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.
在一种可能的实现方式中,所述遍历模块,用于在所述第一电子设备与所述第二电子设备建立通信连接后,第i次接收到所述压力值同步请求信息的情况下,确定第一存储页,所述第一存储页为上一次同步压力值时遍历的最后一个存储页;其中,所述i为大于1的正整数;在所述第一存储页不为所述存储区域中最后一个存储页的情况下,确定从第二存储页开始遍历,其中,所述第二存储页为与所述第一存储页相邻、且位于所述第一存储页之后的存储页。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.
在一种可能的实现方式中,所述遍历模块,用于在所述第一存储页为所述存储器中最后一个存储页的情况下,确定从所述存储器中首个存储页开始遍历。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.
在一种可能的实现方式中,所述装置还包括接收模块,接收模块用于在所述第一电子设备与所述第二电子设备建立通信连接的情况下,接收所述第二电子设备发送的所述压力值同步请求信息。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.
在一种可能的实现方式中,接收模块用于在所述第一电子设备与所述第二电子设备建立通信连接的情况下,获取所述第一电子设备的运动增量;在所述运动增量大于增量阈值的情况下,向所述第二电子设备发送压力值同步通知;其中,所述压力值同步通知用于通知所述第二电子设备请求同步所述第一电子设备的压力值。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.
第三方面,本申请还提供一种电子设备,所述电子设备包括:一个或者多个处理器和一个或者多个存储器;所述一个或者多个存储器存储有计算机程序或指令,当所述计算机程序或指令被所述一个或者多个处理器执行时,使得所述电子设备执行如第一方面中任意一项所述的方法。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.
第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得计算机执行如第一方面中任一项所述的方法。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
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。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.
图1为本申请实施例提供的一种通信系统架构示意图;FIG1 is a schematic diagram of a communication system architecture provided by an embodiment of the present application;
图2为本申请实施例提供的一种压力值同步方法的交互图;FIG2 is an interaction diagram of a pressure value synchronization method provided in an embodiment of the present application;
图3为本申请实施例提供的一种压力数据存储方式的示意图;FIG3 is a schematic diagram of a pressure data storage method provided in an embodiment of the present application;
图4A为本申请实施例提供的一种没有发生系统时间跳变场景下,同步压力值的示例图;FIG4A is an example diagram of a synchronous pressure value in a scenario where no system time jump occurs, provided by an embodiment of the present application;
图4B为本申请实施例提供的一种发生系统时间跳变场景下,同步压力值的示例图;FIG4B is an example diagram of a synchronous pressure value in a scenario where a system time jump occurs, provided by an embodiment of the present application;
图5为本申请实施例提供的一种可穿戴设备100的硬件结构示意图;FIG5 is a schematic diagram of the hardware structure of a wearable device 100 provided in an embodiment of the present application;
图6为本申请实施例提供的一种可穿戴设备100的软件结构框图;FIG6 is a software structure block diagram of a wearable device 100 provided in an embodiment of the present application;
图7为本申请实施例提供的一种压力值同步方法的软件模块交互图;FIG7 is a software module interaction diagram of a pressure value synchronization method provided in an embodiment of the present application;
图8为本申请实施例提供的又一种压力值同步方法的流程图;FIG8 is a flow chart of another pressure value synchronization method provided in an embodiment of the present application;
图9为本申请实施例提供的又一种发生系统时间跳变场景下,同步压力值的示例图;FIG9 is an example diagram of a synchronization pressure value in another scenario where a system time jump occurs, provided by an embodiment of the present application;
图10为本申请实施提供的压力值生成时间段与请求同步时间段部分或者全部重叠的示例图;FIG10 is an example diagram showing a partial or complete overlap of a pressure value generation time period and a request synchronization time period provided by an implementation of the present application;
图11为本申请实施例提供的一种压力值同步装置的结构框图;FIG11 is a structural block diagram of a pressure value synchronization device provided in an embodiment of the present application;
图12为本申请实施例提供的一种芯片的结构框图。FIG12 is a structural block diagram of a chip provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合附图,对本申请的实施例进行说明。The embodiments of the present application will be described below in conjunction with the accompanying drawings.
如图1所示,为本申请实施例提供的一种通信系统架构示意图。该通信系统架构可以包括第一电子设备101和第二电子设备102。第一电子设备101例如可以是智能手表、智能手环等可穿戴设备,第二电子设备102例如可以是手机。第一电子设备101和第二电子设备102可以通过蓝牙通道进行蓝牙通信。As shown in Figure 1, 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.
随着可穿戴设备的发展,可穿戴设备不仅具有通话、拍照等功能,还具有运动、健康服务功能。例如,用户佩戴可穿戴设备后,可以通过可穿戴设备监测用户的步数、卡路里、心率、血氧、压力值等运动、健康数据。进一步的,可穿戴设备可以将运动、健康等数据同步至用户的手机,以使用户可以通过手机查看相关数据,提高用户体验。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.
其中,本申请实施例中压力值是指用于评估用户压力状态的数值,压力状态是指精神上束缚和紧张的感受。压力状态受自主神经系统控制,其中,交感神经活跃程度的提高会提高压力水平,副交感神经活跃程度会降低压力水平。自主神经系统的状态可通过心率变异性反映。In the embodiments of the present application, the stress value refers to a value used to assess 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, wherein an increase in the activity of the sympathetic nerves will increase the stress level, and an increase in 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.
在一些实施例中,可以在可穿戴设备中设置心率传感器,例如光电容积脉搏波描记(photo plethysmo graphy,PPG),这样,可以利用可穿戴设备中的PPG采集用户的心率数据,并基于采集的心率数据,分析用户的心率变异性的特征参数,进而计算出对应的压力值。该压力值即可反映用户的压力状态。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.
以第一电子设备101为可穿戴设备,如智能手表或智能手环,第二电子设备102为手机为例,对压力值同步方法进行说明。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.
图2为本申请实施例提供的一种压力值同步方法的交互图。如图2所示,该方法可以包括以下步骤:FIG2 is an interactive diagram of a pressure value synchronization method provided in an embodiment of the present application. As shown in FIG2 , the method may include the following steps:
步骤201,可穿戴设备获取加速度数据。Step 201: The wearable device obtains acceleration data.
本申请实施例中,可穿戴设备中可以设置有加速度传感器和PPG。其中,加速度传感器可以用于采集用户的加速度数据,PPG可以用于采集用户的心率数据。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.
步骤202,基于加速度数据,计算用户的手腕活动量。Step 202: Calculate the user's wrist activity based on the acceleration data.
由于用户处于运动状态或佩戴部位活动频繁时,PPG采集的高分辨心率数据无法准确评估用户的压力值。因此,为了准确评估用户的压力值,需要选择用户处于平静状态,即活动量较小的情况下的心率数据。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.
这样,在利用心率数据计算压力值之前,先判断用户当前的活动量是否为活动量较小的情况。具体的,可以先基于采集的加速度数据,计算用户的手腕活动量。然后,将计算的手腕活动量与设定的活动量阈值比较,以判断手腕活动量是否满足活动量较小的条件。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.
步骤203,判断手腕活动量是否小于活动量阈值。Step 203, determining whether the wrist activity is less than an activity threshold.
在手腕活动量小于活动量阈值的情况下,确定手腕活动量满足活动量较小的条件,则执行步骤204。在手腕活动量大于或者等于活动量阈值的情况下,确定手腕活动量不满足活动量较小的条件,则可以返回步骤202。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.
步骤204,在手腕活动量小于活动量阈值的情况下,获取PPG采集的心率数据,并基于心率数据,开始计算肾动脉阻力指数(RRI)值。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.
示例性的,在手腕活动量小于活动量阈值的情况下,可穿戴设备可以每4s计算一次RRI值,共计算15次,这样得到15组RRI值。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.
其中,第一次计算RRI值时,可穿戴设备获取一次系统时间,将此次系统时间确定为压力值生成开始时间。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.
步骤205,基于得到的15组RRI值,计算得到一个压力值,并获取压力值生成结束时间。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.
示例性的,可以基于得到的15组RRI值,分析出心率变异性的特性参数,进而,基于心率变异性的特性参数,评估出此次的压力值。Exemplarily, the characteristic parameters of heart rate variability can be analyzed based on the 15 sets of RRI values obtained, and then the current stress value can be evaluated based on the characteristic parameters of heart rate variability.
其中,在得到压力值时,可穿戴设备再获取一次系统时间,将此次系统时间确定为压力值生成结束时间。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.
这样,经过上述步骤201至步骤205,可以得到一组压力数据,该一组压力数据包括一个压力值,以及与该一个压力值对应的压力值生成时间段,即生成开始时间和生成结束时间。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.
需要说明的是,本申请实施例对计算用户的手腕活动量、RRI值以及压力值的具体方法不进行限定。例如,可以利用可穿戴设备中的压力算法计算用户的手腕活动量、RRI值以及压力值。再例如,也可以利用可穿戴设备中的运动算法计算用户的手腕活动量,利用可穿戴设备中的压力算法计算用户的RRI值以及压力值。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.
步骤206,存储压力值、以及压力值对应的生成开始时间和生成结束时间。Step 206: store the pressure value, and the generation start time and generation end time corresponding to the pressure value.
可穿戴设备可以将压力值、以及压力值对应的生成开始时间和生成结束时间存储在可以穿戴设备的存储器中。例如,存储器可以是闪存(flash memory,Flash)。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).
具体的,Flash可以被划分为多个存储区域,以执行不同的存储功能。例如,Flash可以被划分为压力值存储区域、步数存储区域、卡路里存储区域等。其中,压力值存储区域用于存储压力数据,步数存储区域用于存储步数相关数据,卡路里存储区域用于存储卡路里相关数据。Specifically, the Flash may be divided into a plurality of storage areas to perform different storage functions. For example, the Flash may 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.
在一些实施例中,由于可穿戴设备的存储空间有限,因此可以将压力数据以存储页的方式存储在Flash中的压力值存储区域。具体的,压力值存储区域可以被划分为多个数据写入行,每个数据写入行可存储一定数量的字节。进而,可以基于数据写入行以及每个数据写入行可存储的字节数量依次划分多个存储页。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.
示例性的,如图3所示,压力值存储区域划分有n个存储页,n个存储页可以按照页数递增的顺序依次设置。例如,压力值存储区域设置有1000个存储页,分别为存储页1、存储页2、存储页3……存储页1000。示例性的,存储页1可以对应压力值存储区域中第一行第一个字节至第一行第十个字节,存储页2可以对应压力值存储区域中第一行第十一个字节至第二行第九个字节。依次类推,此处不再一一列举。Exemplarily, as shown in FIG3 , 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.
其中,一个压力值存储在一个存储页中,多个压力值可以按照生成时间顺次依次存储在多个存储页中。每个存储页不仅包括压力值,还包括压力值对应的压力值生成时间段。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.
例如,将压力值生成时间段(S1,E1)生成的压力值F1存储在存储页1中,将压力值生成时间段(S2,E2)生成的压力值F2存储在存储页2中。其中,压力值生成时间段(S2,E2)为位于压力值生成时间段(S1,E1)之后的最近一个压力值生成时间段。S1表示压力值F1对应的生成开始时间,E1表示压力值F1对应的生成结束时间,S2表示压力值F2对应的生成开始时间,E2表示压力值F2对应的生成结束时间。For example, the pressure value F1 generated by the pressure value generation time period ( S1 , E1 ) is stored in the storage page 1, and the pressure value F2 generated by the pressure value generation time period ( S2 , E2 ) is stored in the 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 .
需要说明的是,当压力数据存储至最后一个存储页后,接下来要存储的压力数据,重新从首个存储页开始顺次存储压力数据。具体的,接下来要存储的压力数据可以通过覆盖存储页中原来的压力数据的方式,存储新的压力数据。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.
例如,将压力值Fn以及压力值Fn对应的压力值生成时间段(Sn,En)存储至存储页n后,下一个压力值Fn+1以及压力值Fn+1对应的压力值生成时间段(Sn+1,En+1)可以覆盖存储页1中之前存储的压力值F1以及压力值生成时间段(S1,E1)。这样,存储页1中的存储数据更新为压力值Fn+1以及压力值F n+1对应的压力值生成时间段(Sn+1,En+1)。依此类推,压力值Fn+2以及压力值F n+2对应的压力值生成时间段(Sn+2,En+2)可以覆盖存储页2中之前存储的压力值F2以及压力值生成时间段(S2,E2)。此处不再一一列举。For example, after the pressure value Fn and the pressure value generation time period ( Sn , En ) corresponding to the pressure value Fn are stored in the storage page n, the next pressure value Fn +1 and the pressure value generation time period (Sn +1 , En+1 ) corresponding to the pressure value Fn +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 Fn +1 and the pressure value generation time period (Sn +1 , En+1 ) corresponding to the pressure value Fn +1 . Similarly, the pressure value Fn +2 and the pressure value generation time period (Sn +2 , En+2 ) corresponding to the pressure value Fn +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 one by one here.
步骤207,可穿戴设备接收手机发送的压力值同步请求信息。Step 207: The wearable device receives the pressure value synchronization request information sent by the mobile phone.
压力值同步请求信息可以包括请求同步时间段,请求同步时间段包括请求开始时间S和请求结束时间E。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.
可穿戴设备接收到手机发送的压力值同步请求信息后,获取压力值同步请求信息中的请求开始时间S和请求结束时间E。然后,开始遍历存储页中压力值生成时间段,在遍历至生成结束时间晚于请求结束时间E后,停止遍历。之后,将遍历到的存储页中满足同步条件的压力值确定为目标压力值。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.
步骤208,将目标压力值同步至手机。Step 208, synchronizing the target pressure value to the mobile phone.
本申请实施例的手机中可以包括健康应用,具体的,可以将目标压力值同步至手机中的健康应用。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.
综上所述,按照上述步骤201至步骤208可以将可穿戴设备中的压力值同步至手机。In summary, according to the above steps 201 to 208, the pressure value in the wearable device can be synchronized to the mobile phone.
示例性的,如图4A所示,假设可穿戴设备在系统时间C接收到压力值同步请求信息,压力值同步请求信息中包括请求开始时间S和请求结束时间E。这样,可穿戴设备响应于手机在系统时间C发送的压力值同步请求信息,开始遍历存储页中压力值生成时间段,在遍历至生成结束时间Ek+2时,判断出生成结束时间Ek+2晚于请求结束时间E,则停止后续的遍历。进一步,可以将遍历到的且满足同步条件的压力值确定为目标压力值(即S1至Ek+2之间的压力值F1至F k+2),并将目标压力值同步至手机。Exemplarily, as shown in FIG4A , it is assumed that the wearable device receives a pressure value synchronization request message at system time C, and the pressure value synchronization request message includes a request start time S and a request end time E. In this way, the wearable device responds to the pressure value synchronization request message sent by the mobile phone at system time C, and starts to traverse the pressure value generation time period in the storage page. When traversing to the generation end time E k+2 , it is determined that the generation end time E k+2 is later than the request end time E, and 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., the pressure value F 1 to F k+2 between S1 and E k+ 2), and the target pressure value is synchronized to the mobile phone.
但是,发明人发现在使用过程中,存在压力值无法同步到手机的情况。发明人进一步发现由于可穿戴设备的硬件问题,可穿戴设备有发生系统时间跳变的情况。如果可穿戴设备发生系统时间跳变,可能导致可穿戴设备的压力值无法同步到手机,从而影响用户体验。例如,某一时刻,正确的系统时间为2022年1月1日上午10:05,而由于可穿戴设备的硬件问题,可穿戴设备的系统时间却跳变至2022年2月1日上午10:05。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.
示例性的,结合图2,参照图4B,假设在步骤205计算得到压力值Fk,并获取的系统时间为Ek。应理解,Ek为压力值Fk对应的生成结束时间。假设可穿戴设备在获取系统时间Ek时,可穿戴设备的系统时间发生了跳变,也就是说,可穿戴设备在获取的生成结束时间Ek为跳变后的时间,而压力值Fk对应的正确的生成结束时间应该是Ek’。Exemplarily, in combination with FIG. 2 , referring to FIG. 4B , it is assumed that the pressure value F k is calculated in step 205 and the obtained system time is E k . It should be understood that E k is the generation end time corresponding to the pressure value F k . It is assumed that when the wearable device obtains the system time E k , the system time of the wearable device jumps, that is, the generation end time E k obtained by the wearable device is the time after the jump, and the correct generation end time corresponding to the pressure value F k should be E k '.
假设可穿戴设备在系统时间C接收到压力值同步请求信息,压力值同步请求信息中包括请求开始时间S和请求结束时间E,并且跳变后的生成结束时间Ek晚于系统时间C。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 Ek after the jump is later than the system time C.
这样,可穿戴设备响应于手机在系统时间C发送的压力值同步请求信息,开始遍历存储页中压力值生成时间段,在遍历至生成结束时间Ek时,判断出生成结束时间Ek晚于请求结束时间E,便停止后续的遍历。进一步,可以将遍历到的且满足同步条件的压力值确定为目标压力值(即S1至Ek之间的压力值F1至F k),并将目标压力值同步至手机。对应的,没有遍历到的压力值生成时间段(Sk+1,E k+1)和(Sk+2,E k+2)对应的压力值Fk+1和Fk+2不会被确定为目标压力值,也就不会被同步至手机。然而,结合图4A和图4B可知,压力值生成时间段(Sk+1,E k+1)和(Sk+2,E k+2)对应的压力值Fk+1和Fk+2也是符合同步条件的压力值。这样,就导致部分压力值没有被同步至手机。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 traversing to the generation end time Ek , it is determined that the generation end time Ek is later than the request end time E, and then stops the subsequent traversal. Further, the pressure value that is traversed and meets the synchronization condition can be determined as the target pressure value (i.e., the pressure values F1 to Fk between S1 and Ek ), and the target pressure value is synchronized to the mobile phone. Correspondingly, the pressure values Fk + 1 and Fk +2 corresponding to the pressure value generation time periods (Sk+1, Ek+1 ) and ( Sk+2 , Ek+2 ) that are not traversed will not be determined as the target pressure value, and will not be synchronized to the mobile phone. However, in combination with Figures 4A and 4B, it can be seen that the pressure values Fk + 1 and Fk +2 corresponding to the pressure value generation time periods (Sk+1, Ek+1 ) and (Sk +2 , Ek+2 ) are also pressure values that meet the synchronization conditions. This results in some pressure values not being synchronized to the mobile phone.
由此可见,由于可穿戴设备的硬件问题,压力值Fk对应的生成结束时间Ek跳变至请求同步压力值时的系统时间C之后,使得判断到Ek晚于E后,便结束遍历。进而导致其后的压力值生成时间段(Sk+1,E k+1)和(Sk+2,E k+2)没有被遍历到。最终导致压力值生成时间段(Sk+1,E k+1)和(Sk+2,E k+2)对应的压力值Fk+1和压力值Fk+2没有被同步至手机。It can be seen that due to the hardware problem of the wearable device, the generation end time E k corresponding to the pressure value F k jumps to after the system time C when the pressure value synchronization is requested, so that after judging that E k is later than E, the traversal ends. As a result, the subsequent pressure value generation time periods (S k+1 , E k+1 ) and (S k+2 , E k+2 ) are not traversed. Finally, the pressure values F k+1 and F k+2 corresponding to the pressure value generation time periods (S k+1, E k+1 ) and (S k+2 , E k+ 2 ) are not synchronized to the mobile phone.
为了解决上述由于生成结束时间跳变至系统时间C之后,可能导致部分压力值无法同步至手机的问题,本申请实施例进一步提供一种压力值同步方法。该方法在判断生成结束时间晚于请求结束时间的情况下,继续判断生成结束时间是否早于系统时间C。在生成结束时间晚于请求结束时间的情况下,如果生成结束时间早于系统时间,则结束遍历。否则,继续后续的遍历操作。这样,即使遍历到的生成结束时间为跳变至系统时间C之后的时间,也不会结束遍历,从而可以避免后续可能满足同步条件的压力值无法同步至手机。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.
下面对本申请实施例提供的又一种压力值同步方法进行详细说明,该压力值同步方法可以应用于第一电子设备。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.
如图5所示,本申请实施例以第一电子设备为可穿戴设备100(如智能手表)为例,对本申请实施例提供的可穿戴设备100的结构进行举例说明。如图5所示,可穿戴设备100可包括无线通信模块110,显示屏120,处理器130,内部存储器140,电源管理模块150,电池160,充电管理模块170,天线等。As shown in Figure 5, 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. As shown in Figure 5, 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, etc.
无线通信模块110可以提供应用在可穿戴设备100上的包括WLAN(如(wirelessfidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigationsatellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(nearfield communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。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.
无线通信模块110可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块110经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器130。无线通信模块110还可以从处理器130接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。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.
显示屏120用于显示图像,GUI交互界面等。该显示屏120包括显示面板和触控面板。例如,本申请实施例中,显示屏120可以用于显示压力数据。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.
处理器130可以包括一个或多个处理单元。例如:处理器130可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。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).
在一些实施例中,处理器130可以包括一个或多个接口。接口可以包括I2C接口,I2S接口,PCM接口,UART接口,MIPI,GPIO接口,SIM卡接口,和/或USB接口等。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.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对可穿戴设备100的结构限定。在本申请另一些实施例中,可穿戴设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。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.
充电管理模块170用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。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.
电源管理模块150用于连接电池160,充电管理模块170与处理器130。电源管理模块150接收电池160和/或充电管理模块170的输入,为处理器130,内部存储器140,外部存储器接口120和无线通信模块110等供电。电源管理模块150还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。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.
可穿戴设备100的无线通信功能可以通过天线和无线通信模块110等实现。The wireless communication function of the wearable device 100 can be implemented through an antenna and a wireless communication module 110, etc.
内部存储器140可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。The internal memory 140 may be used to store one or more computer programs including instructions.
可穿戴设备100上还可以设置光学传感器(例如,红外测温传感器)、运动传感器(例如,加速度传感器、陀螺仪等)、电容式传感器和心率传感器(例如,PPG)等。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, PPG).
本申请实施例中,加速度传感器可以采集用户的加速度数据,进而可穿戴设备100可以基于加速度数据,计算用户的手腕活动量。PPG可以采集用户的心率数据,进而可穿戴设备100可以基于心率数据计算压力值。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.
可以理解的是,本申请实施例示意的结构并不构成对可穿戴设备100的具体限定。在本申请另一些实施例中,可穿戴设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。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.
可穿戴设备100例如可以包括智能手表或智能手环等,本申请不做限定。The wearable device 100 may include, for example, a smart watch or a smart bracelet, etc., which is not limited in this application.
本申请实施例中的方法均可以在具有上述硬件结构的可穿戴设备100中实现。The methods in the embodiments of the present application can all be implemented in the wearable device 100 having the above hardware structure.
上述可穿戴设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Lite OS系统为例,示例性说明可穿戴设备100的软件结构。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 illustrate the software structure of the wearable device 100.
如图6所示,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过接口通信。在一些实施例中,Lite OS系统可以包括应用程序层(可以简称为应用层)、应用程序框架层(可以简称为框架层)、算法和内部库、硬件抽象层(hardwareabstraction layer,HAL)、驱动层和内核层(轻量级内核核心)等,本申请不做限定。As shown in Figure 6, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate 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.
其中,应用层与框架层之间可以通过框架(framework)应用程序编程接口(application programming interface,API)进行交互。算法和内部库与内核层之间可以通过Cortex微控制器/处理器软件接口标准(cortex microcontroller softwareinterface standard,CMSIS)API进行交互,算法和内部库与HAL层之间可以通过HAL API进行交互。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.
需要说明的是,本申请实施例以Lite OS系统举例来说明,在其他操作系统中(例如裁剪版Android系统),只要各个功能模块实现的功能和本申请的实施例类似也能实现本申请的方案。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.
其中,应用程序层可以包括一系列应用程序包。Among them, the application layer may include a series of application packages.
如图6所示,应用程序包可以包括多种类型的应用程序。例如,可以包括三方JS(Java Script)应用、通信应用、健康应用、运动应用、设备管理应用、系统应用等。As shown in FIG6 , 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.
示例性的,三方JS应用可以包括 等。通信应用可以包括信息、通话记录、联系人、通话等应用。健康应用可以包括心率、血氧饱和度、睡眠、生理周期、呼吸训练、心脏健康研究、压力等。运动应用可以包括专业运动、85种运动(例如,步行、跑步、跳绳等)、训练状态、锻炼记录、活动记录等。设备管理应用可以包括OTA升级、表盘管理、开关机、恢复出厂、系统基本设置等。系统应用可以包括指南针、计时器、天气、海拔气压计、闹钟、音乐、秒表、手电筒等。当然,应用程序层还可以包括其他应用程序,例如,互联互通应用、钱包应用等,本申请不做限定。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.
本申请实施例中,健康应用可以用于显示健康相关的各种用户界面(userinterface,UI),例如,压力值显示界面。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.
框架层为应用层的应用程序提供应用编程接口(application programminginterface,API)和编程框架。框架层包括一些预先定义的函数。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.
框架层可以包括底层软件服务、运动健康服务和硬件服务。The framework layer may include underlying software services, sports health services, and hardware services.
其中,底层软件服务可以包括基础服务、生产制造服务、设备管理等。基础服务可以包括日志服务、文件系统、异常记录、双机通信、内存管理等。生产制造服务可以包括生产服务、老化服务等。设备管理服务可以包括设备控制、显示管理、传感器管理和蓝牙管理等。其中,传感器管理可以用于实现对不同传感器的开启、关闭和工作参数设置。蓝牙管理可以用于实现可穿戴设备和其他电子设备(例如,手机)的蓝牙传输。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. 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).
其中,运动健康服务包括运动服务和健康服务。其中,运动服务可以包括锻炼服务、日常活动服务、数据存储同步和训练状态评估等服务。健康服务可以包括心率服务、睡眠服务、呼吸压力、心脏健康、血氧和压力服务等。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.
其中,硬件服务可以包括定位业务、NFC业务、BLE和传统蓝牙等。Among them, hardware services may include positioning services, NFC services, BLE and traditional Bluetooth, etc.
可选的,框架层还可以包括系统基本能力、ACE应用开发框架和用户界面(UserInterface,UI)框架(UIKIT)等(图6中未示出),本申请实施例对此不做任何限制。其中,UIKIT是一款轻量级、模块化的前端框架,可快速构建UI。UIKIT框架提供一系列的类(Class)来建立和管理应用程序的UI接口、应用程序对象、事件控制、绘图模型、窗口、视图和用于控制触摸屏等的接口。Optionally, the framework layer may also include basic system capabilities, ACE application development framework, and user interface (UI) framework (UIKIT), etc. (not shown in FIG. 6 ), and the present application embodiment does not impose any restrictions on this. Among them, UIKIT is a lightweight, modular front-end framework that can quickly build a UI. The UIKIT framework provides a series of classes to establish and manage the UI interface, application object, event control, drawing model, window, view, and interface for controlling the touch screen, etc. of the application.
算法和内部库可以包括基础库和算法库,还可以包括传统蓝牙协议栈和BLE协议栈。其中,基础库可以包括支付宝、条形码、基础C库和安全等模块。算法库中可以包括运动算法,运动算法可以计算用户的运动数据(例如,步频)。可选的,算法库还可以包括活体检测算法、手势算法、调光算法、佩戴检测算法、呼吸算法、跳绳算法、心率算法、睡眠算法、生理周期算法、血压算法、压力算法、体温算法、音频算法等,本申请不做限定。其中,压力算法可以计算用户的手腕活动量和压力值。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.
内核层可以包括Lite OS的内存(Memory)、任务(Task)、进程间通信(interprocess communication,IPC)和中断等。The kernel layer may include Lite OS's memory, tasks, interprocess communication (IPC), and interrupts.
HAL层可以包括触摸屏(touch panel,TP)、闪存(flash memory,Flash)、液晶显示器(liquid crystal display,LCD)、NFC、BT和传感器对应的模块。HAL层还可以包括其他模块,例如,充电、按键等模块,本申请不做限定。The HAL layer may include touch panel (TP), flash memory (Flash), liquid crystal display (LCD), NFC, BT and sensor corresponding modules. The HAL layer may also include other modules, such as charging, button and other modules, which are not limited in this application.
其中,传感器可以包括加速度传感器、陀螺仪、气压计、PPG等。Among them, the sensor may include an accelerometer, a gyroscope, a barometer, a PPG, etc.
其中,TP和LCD都是可穿戴设备的显示屏的组成部分。TP和LCD可以贴合在一起,贴合方式可以包括框贴合和全贴合。可穿戴设备显示内容需要依赖LCD与Flash。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.
可以理解的是,LCD可以用于向用户显示内容。其构造是在两片平行的玻璃基板当中放置液晶盒,下基板玻璃上设置薄膜晶体管(thin film transistor,TFT),上基板玻璃上设置彩色滤光片,通过TFT上的信号与电压改变来控制液晶分子的转动方向,从而达到控制每个像素点偏振光出射与否而达到显示目的。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.
需要说明的是,采用LCD作为显示屏仅仅是本申请的一个示例,本申请的可穿戴设备还可以采用LED、OLED等作为显示屏。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.
Flash是一种非易失性(non-volatile)内存,用于存储显示内容的数据。闪存在没有电流供应的条件下也能够长久地保持数据,其存储特性相当于硬盘,因此闪存得以成为各类便携型数字设备的存储介质的基础。例如,本申请实施例中,Flash可以用于存储压力数据。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 embodiments of the present application, Flash can be used to store pressure data.
TP是一种输入器件,可以用于感知用户的各种操作(例如,点击、滑动等操作)。TP is an input device that can be used to sense various operations of the user (eg, click, slide, etc.).
驱动层可以包括TP、Flash、LCD、NFC、BT、PPG等对应的驱动模块。驱动层还可以包括其他模块,例如,BSP、GPIO等,本申请不做限定。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.
下面第一电子设备可穿戴设备100,第二电子设备为手机为例,对本申请实施例提供的压力值同步所涉及的软件模块之间的交互过程进行说明。如图7所示,压力值同步过程所涉及的软件模块包括可穿戴设备100中的UI、Flash、压力算法、健康服务、底层软件服务和传感器的中断或定时器以及手机中的健康应用。The following is an example of the interaction process between the software modules involved in the pressure value synchronization provided by the embodiment of the present application, taking the first electronic device as the wearable device 100 and the second electronic device as the mobile phone as an example. As shown in Figure 7, 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.
请结合图6,参照图7,可穿戴设备100的应用层中的健康应用可以通过调用预设的应用程序接口API与框架层中的健康服务交互,健康服务可以与底层软件服务交互,底层软件服务可以与驱动层中的传感器驱动交互,传感器驱动可以用于驱动硬件层中的加速度传感器采集用户的加速度数据,以及可以用于驱动硬件层中的PPG采集用户的心率数据。Please refer to Figure 7 in conjunction with Figure 6. 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.
在可穿戴设备100开机初始化时,健康服务可以向底层软件服务发送第一通知信息和第二通知信息。响应于接收到第一通知信息,底层软件服务可以先向目标传感器(例如,加速度传感器和PPG)注册一个回调函数。该回调函数的作用是使目标传感器按照预设频率向底层软件服务返回其采集的数据(例如,加速度传感器采集的加速度数据以及PPG采集的心率数据)。然后,底层软件服务还可以将健康服务中如心率服务、睡眠服务、呼吸压力、心脏健康、血氧、压力服务等子服务添加到对应的传感器控制列表。最后,底层软件服务还可以设置心率服务、睡眠服务、呼吸压力、心脏健康、血氧、压力服务等子服务的状态为Idle。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.
响应于接收到第二通知信息,底层软件服务可以先设置心率服务、睡眠服务、呼吸压力、心脏健康、血氧、压力服务等子服务的状态为Open。然后,底层软件服务还可以遍历每个传感器对应的子服务的工作参数。接着,开启传感器的中断或者定时器。最后,底层软件服务设置子服务的状态为Working。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.
传感器(加速度传感器和PPG)可以利用周期调度器(例如,scheduler_tick)和芯片内部系统中断触发调用注册的回调函数,通过传感器驱动向底层软件服务返回其采集的数据(例如,加速度数据和心率数据)。底层软件服务读取并筛选传感器采集的数据,然后,将筛选后的数据发送给健康服务。健康服务可以调用算法库的压力算法对外提供的API,将筛选后的数据发送至算法库中压力算法。压力算法根据用户的加速度数据计算用户的手腕活动量,在手腕活动量小于阈值的情况下,开始利用心率数据计算RRI值,得到15组RRI值。压力算法向健康服务发送15组RRI值。健康服务可以存储15组RRI值,并将15组RRI值发送给压力算法。压力算法可以基于15组RRI值计算得到一个压力值。之后,压力算法将该压力值发送至健康服务。健康服务可以将压力值存入Flash,也可以将压力值发送至UI进行显示。当Flash接收到手机的健康应用发送的压力值同步请求信息,Flash可以将满足条件的压力值通过蓝牙通道同步至手机的健康应用。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.
下面结合图8对本申请实施例提供的一种压力值同步方法进行详细说明。A pressure value synchronization method provided in an embodiment of the present application is described in detail below in conjunction with FIG. 8 .
如图8所示,本申请实施例提供的压力值同步方法,应用于第一电子设备(第一电子设备为可穿戴设备),该方法可以包括以下步骤:As shown in FIG8 , 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:
步骤301,获取多个压力值,以及各压力值对应的压力值生成时间段。Step 301: Acquire multiple pressure values and a pressure value generation time period corresponding to each pressure value.
具体的,可穿戴设备的存储器可以从健康服务获取压力算法生成的多个压力值,以及各压力值对应的压力值生成时间段。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.
其中,压力值的生成方法,以及各压力值对应的压力值生成时间段的确定方法,可以参照步骤201至步骤205的描述,此处不再赘述。例如,在压力算法开始计算第一组RRI值时,健康服务获取一次系统时间,并将此次系统时间确定为此次压力值的生成开始时间。在压力算法基于15组RRI值计算得到一个压力值时,健康服务再次获取一次系统时间,并将此次系统时间确定为此次压力值的生成结束时间。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.
需要说明的是,执行一次步骤201至步骤205可以得到一组压力数据(包括一个压力值,以及该一个压力值对应的压力值生成时间段)。执行多次步骤201至步骤205可以得到多组压力数据(包括多个压力值,以及与该多个压力值一一对应的压力值生成时间段)。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).
还需要说明的是,本申请实施例对获取多组个压力数据的具体实现方式不进行限定。例如,可穿戴设备的存储器从健康服务可以每次获取一组压力数据。然后,通过多次获取的方式,获取到多组压力数据。又例如,可穿戴设备的存储器可以从健康服务一次获取多组压力数据。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.
步骤302,在可穿戴设备的存储器中按照压力值生成时间段依次存储多个压力值,以及对应的压力值生成时间段。其中,压力值生成时间段包括生成开始时间和生成结束时间。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.
存储多个压力值,以及对应的压力值生成时间段的具体方式可以参照步骤206的描述,此处不再赘述。例如,可以将多组压力数据按照压力值生成时间段的先后顺序依次存储在多个存储页。其中,每个存储页存储一组压力数据。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.
步骤303,响应于接收到的压力值同步请求信息,获取可穿戴设备的系统时间C。Step 303: In response to the received pressure value synchronization request information, the system time C of the wearable device is obtained.
可穿戴设备与手机可以建立通信连接,以实现数据的传输。例如,可穿戴设备和手机可以通过建立蓝牙通道传输数据。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.
可穿戴设备响应于接收到手机发送的压力值同步请求信息,获取可穿戴设备的系统时间。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.
此处需要说明的是,可穿戴设备与手机通过蓝牙配对成功后,手机可以矫正可穿戴设备的系统时间为手机的系统时间。因此,可穿戴设备与手机通过蓝牙配对成功后,可穿戴设备的系统时间为正确的系统时间,而不会是跳变的、错误的系统时间。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.
本申请实施例中手机可以通过以下几种方式,触发向可穿戴设备发送压力值同步请求信息。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.
第一种方式,在手机与可穿戴设备首次建立通信连接(例如,蓝牙连接)的情况下,响应于手机与可穿戴设备配对成功,手机可以向可穿戴设备发送压力值同步请求信息。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.
第二种方式,在手机与可穿戴设备建立通信连接的情况下,用户可以在手机的健康应用界面执行下拉操作,手机可以响应于检测到在健康应用界面的下拉操作,向可穿戴设备发送压力值同步请求信息。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.
第三种方式,在手机与可穿戴设备建立通信连接的情况下,可穿戴设备获取可穿戴设备的运动增量,例如,运动增量可以是预设时间段内的步数增量、卡路里增量、计利增量或时间增量等。在运动增量大于增量阈值的情况下,可穿戴设备可以向手机发送压力值同步通知,压力值同步通知用于通知手机请求同步可穿戴设备的压力值。这样,手机可以响应于接收到可穿戴设备发送的压力值同步通知,向可穿戴设备发送压力值同步请求信息。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.
其中,压力值同步请求信息包括请求同步时间段,请求同步时间段可以通过请求开始时间和请求结束时间表示。压力值同步请求信息用于请求可穿戴设备将压力数据同步至手机。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.
本申请实施例对压力值同步请求信息中请求同步时间段的确定方式不进行限定。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.
在一些实施例中,手机可以在发送压力值同步请求信息之前,获取上一次压力值同步请求的请求结束时间,以及当前系统时间。然后,将上一次压力值同步请求的请求结束时间确定为这一次压力值同步请求的请求开始时间,以及将当前系统时间确定为这一次压力值同步请求的请求结束时间。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.
在一些实施例中,手机的健康应用程序可以预先设置每次需要同步的压力值的总量。例如,每次同步三天的压力值。这样,手机可以在发送压力值同步请求信息之前,先获取当前系统时间,并将当前系统时间确定为这一次压力值同步请求的请求结束时间;然后,将基于当前系统时间向前推三天的时间确定为这一次压力值同步请求的请求开始时间。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, the pressure values of three days 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 pushed forward three days based on the current system time is determined as the request start time of this pressure value synchronization request.
在一些实施例中,手机的健康应用程序可以预先设置每次需要同步的压力值的总量。例如,每次同步三天的压力值。这样,手机可以在发送压力值同步请求信息之前,先获取上一次压力值同步请求的请求结束时间,并将上一次压力值同步请求的请求结束时间确定为这一次压力值同步请求的请求开始时间。然后,确定基于上一次压力值同步请求的请求结束时间向后推三天的时间,如果这个时间晚于当前系统时间,则将当前系统时间确定为这一次压力值同步请求的请求结束时间;如果这个时间早于或者等于当前系统时间,则将基于上一次压力值同步请求的请求结束时间向后推三天的时间确定为这一次压力值同步请求的请求结束时间。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.
在一些实施例中,用户还可以在手机的健康应用程序界面输入请求同步的时间段,这样,手机将用户输入的请求同步的时间段确定为压力值同步请求信息中的请求同步时间段。应理解,用户输入的请求结束时间不能晚于系统当前时间。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.
由此可见,本申请实施例中请求结束时间可能早于或者等于可穿戴设备获取的系统时间C。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.
步骤304,遍历存储器中存储的多个压力值生成时间段。Step 304, traverse multiple pressure value generation time periods stored in the memory.
步骤305,判断遍历到的压力值生成时间段是否满足生成结束时间晚于请求结束时间、且生成结束时间早于系统时间。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.
步骤306,在生成结束时间晚于请求结束时间、且生成结束时间早于系统时间的情况下,结束遍历,并将遍历到的压力值生成时间段与请求同步时间段部分或者全部重叠的压力值,确定为目标同步压力值。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.
可穿戴设备接收到压力值同步请求信息后,先获取系统时间;然后,开始遍历存储器中存储的多个压力值生成时间段,以确定满足请求同步时间段的压力值生成时间段。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.
其中,可穿戴设备的遍历结束条件为生成结束时间晚于请求结束时间、且生成结束时间早于系统时间。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.
示例性的,如图9所示,假设可穿戴设备的存储器中存储的压力值生成时间段(Sk,Ek)中,生成结束时间Ek为跳变后的时间,并且生成结束时间Ek跳变至系统时间C之后。假设可穿戴设备从存储器中压力值生成时间段(S1,E1)开始遍历,生成结束时间E1早于请求结束时间E,不满足遍历结束条件。因此,继续遍历压力值生成时间段(S2,E2),生成结束时间E2早于请求结束时间E,也不满足遍历结束条件,以此类推继续遍历。当遍历至压力值生成时间段(Sk,Ek)时,由于生成结束时间Ek跳变至系统时间C之后,因此,判断结果为:生成结束时间Ek晚于请求结束时间E,但生成结束时间Ek晚于系统时间C,可见,这种情况下依然不满足遍历结束条件,因此,此时并不会结束遍历。而继续遍历后面的压力值生成时间段,直至遍历至压力值生成时间段(Sk+2,Ek+2)时,判断结果为:生成结束时间Ek+2晚于请求结束时间E,且生成结束时间Ek+2早于系统时间C,这种情况下,满足遍历结束条件,因此,可穿戴设备遍历完压力值生成时间段(Sk+2,Ek+2)后,停止遍历,不再对后面的压力值生成时间段遍历。这样,可以将遍历到的压力值生成时间段(S1,E1)至(Sk+2,Ek+2)中,满足同步条件的压力值确定为目标同步压力值,而没有遍历到的压力值生成时间段对应的压力值不会被确定为目标同步压力值。Exemplarily, as shown in FIG9 , it is assumed that in the pressure value generation time period (S k , E k ) stored in the memory of the wearable device, the generation end time E k is the time after the jump, and the generation end time E k jumps to after the system time C. Assuming that the wearable device starts traversing from the pressure value generation time period (S 1 , E 1 ) in the memory, the generation end time E 1 is earlier than the request end time E, and the traversal end condition is not satisfied. Therefore, the pressure value generation time period (S 2 , E 2 ) is continued to be traversed, and the generation end time E 2 is earlier than the request end time E, and the traversal end condition is not satisfied, and the traversal continues in this way. When traversing to the pressure value generation time period (S k , E k ), since the generation end time E k jumps to after the system time C, the judgment result is: the generation end time E k is later than the request end time E, but the generation end time E k is later than the system time C. It can be seen that in this case, the traversal end condition is still not satisfied, so the traversal will not be terminated at this time. The subsequent pressure value generation time periods are continued to be traversed until the pressure value generation time period (S k+2 ,E k+2 ) is traversed. The judgment result is: the generation end time E k+2 is later than the request end time E, and the generation end time E k+2 is earlier than the system time C. In this case, the traversal end condition is met. Therefore, after the wearable device traverses the pressure value generation time period (S k+2 ,E k+2 ), the traversal stops and no longer traverses the subsequent pressure value generation time period. In this way, the pressure value that meets the synchronization condition in the traversed pressure value generation time period (S 1 ,E 1 ) to (S k+2 ,E k+2 ) can be 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.
对比图4B和图9可知,图4B对应的遍历方案,以生成结束时间晚于请求结束时间作为遍历结束条件,这样,在生成结束时间Ek跳变至系统时间C之后的情况下,位于压力值生成时间段(Sk,Ek)之后的压力值生成时间段不会被遍历到,对应的压力值也就不会被确定为目标同步压力值。进而导致压力值生成时间段(Sk+1,Ek+1)和(Sk+2,Ek+2)对应的压力值不会被确定为目标压力值。而图9对应的遍历方案,以生成结束时间晚于请求结束时间、且生成结束时间早于系统时间作为遍历结束条件,这样,在生成结束时间Ek跳变至系统时间C之后的情况下,遍历至压力值生成时间段(Sk,Ek)后并不会停止遍历,而是遍历至压力值生成时间段(Sk+2,Ek+2)后停止遍历。这样,压力值生成时间段(Sk+1,Ek+1)和(Sk+2,Ek+2)也会被遍历到,进一步的,压力值生成时间段(Sk+1,Ek+1)和(Sk+2,Ek+2)对应的压力值也被确定为目标同步压力值。从而解决在生成结束时间Ek跳变至系统时间C之后的情况下,部分压力值无法同步至手机的问题。Comparing FIG4B and FIG9 , it can be seen that the traversal scheme corresponding to FIG4B takes the generation end time later than the request end time as the traversal end condition. In this way, when the generation end time E k jumps to after the system time C, the pressure value generation time period after the pressure value generation time period (S k , E k ) will not be traversed, and the corresponding pressure value will not be determined as the target synchronization pressure value. As a result, the pressure values corresponding to the pressure value generation time periods (S k+1 , E k+1 ) and (S k+2 , E k+2 ) will not be determined as the target pressure value. The traversal scheme corresponding to FIG9 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. In this way, when the generation end time E k jumps to after the system time C, the traversal will not stop after traversing to the pressure value generation time period (S k , E k ), but will stop after traversing to the pressure value generation time period (S k+2 , E k+2 ). In this way, the pressure value generation time periods (S k+1 , E k+1 ) and (S k+2 , E k+2 ) are also traversed, and further, the pressure values corresponding to the pressure value generation time periods (S k+1 , E k+1 ) and (S k+2 , E k+2 ) are also determined as the target synchronization pressure values. This solves the problem that some pressure values cannot be synchronized to the mobile phone when the generation end time E k jumps to after the system time C.
本申请实施例对起始遍历的压力生成时间段的确定方式不进行限定。The embodiment of the present application does not limit the method for determining the pressure generation time period for the initial traversal.
在一些实施例中,在可穿戴设备与手机建立通信连接后,可穿戴设备首次接收到手机发送的压力值同步请求信息的情况下,可以从存储器中首个存储页开始遍历。例如,参照图3和图9,在可穿戴设备首次接收到手机发送的压力值同步请求信息的情况下,可穿戴设备可以从存储页1开始遍历,具体的,可穿戴设备可以读取存储页1中的压力值F1,以及生成开始时间S1和生成结束时间E1。然后,按照存储页页数递增的顺序依次遍历后续的存储页,例如,依次遍历存储页1、遍历存储页2,直至遍历至存储页(K+2)后,结束遍历。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 be started from the first storage page in the memory. For example, referring to Figures 3 and 9, when 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 number of storage pages, for example, storage page 1 is traversed, storage page 2 is traversed in turn, until storage page (K+2) is traversed, and the traversal is ended.
需要说明的是,由于存储器中的存储页有限,因此,如果遍历至最后一个存储页,依然不满足遍历结束条件,则再次从首个存储页遍历,直至遍历至满足遍历结束条件的存储页结束遍历。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.
在一些实施例中,在可穿戴设备与手机建立通信连接后,可穿戴设备不是首次接收到手机发送的压力值同步请求信息的情况下(即第i次接收到所述压力值同步请求信息,i为大于1的正整数),可以先确定上一次同步压力值时遍历的最后一个存储页(本申请实施例中可称为第一存储页)。其中,上一次同步压力值是指上一次执行步骤301至步骤306时,步骤304遍历到的最后一个存储页。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.
然后,在第一存储页不为存储区域中最后一个存储页的情况下,此次从第二存储页开始遍历,其中,第二存储页为与第一存储页相邻、且位于第一存储页之后的存储页。在第一存储页为存储器中最后一个存储页的情况下,从存储器中首个存储页开始遍历。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.
本申请实施例中,从遍历到的压力值生成时间段中确定满足同步条件的压力值为目标同步压力值。其中,同步条件为:遍历到的压力值生成时间段中压力值生成时间段与请求同步时间段部分或者全部重叠。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.
具体的,压力值生成时间段与请求同步时间段部分或者全部重叠的情况可以包括如下四种: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:
第一种情况:压力值生成时间段中生成开始时间晚于请求开始时间,且生成结束时间早于请求结束时间。示例性的,如图10中的(a)所示,以遍历到的压力值生成时间段(S1,E1)为例,生成开始时间S1晚于请求开始时间S,且生成结束时间E1早于请求结束时间E,这样,压力值生成时间段(S1,E1)与请求同步时间段(S,E)存在重叠时间段(S1,E1),即满足同步条件,则将该压力值生成时间段(S1,E1)对应的压力值F1确定为目标压力值。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. Exemplarily, as shown in (a) of FIG10 , taking the traversed pressure value generation time period (S 1 , E 1 ) as an example, the generation start time S 1 is later than the request start time S, and the generation end time E 1 is earlier than the request end time E, so that the pressure value generation time period (S 1 , E 1 ) and the request synchronization time period (S, E) have an overlapping time period (S 1 , E 1 ), that is, the synchronization condition is met, and the pressure value F 1 corresponding to the pressure value generation time period (S 1 , E 1 ) is determined as the target pressure value.
第二种情况:压力值生成时间段中生成开始时间早于请求开始时间、生成结束时间晚于请求开始时间、且生成结束时间早于请求结束时间。示例性的,如图10中的(b)所示,以遍历到的压力值生成时间段(S1,E1)为例,生成开始时间S1早于请求开始时间S、生成结束时间E1晚于请求开始时间S、且生成结束时间E1早于请求结束时间E,这样,压力值生成时间段(S1,E1)与请求同步时间段(S,E)存在重叠时间段(S,E1),即满足同步条件,则将该压力值生成时间段(S1,E1)对应的压力值F1确定为目标压力值。The second case: the generation start time in the pressure value generation time period 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. Exemplarily, as shown in (b) of FIG10 , taking the traversed pressure value generation time period (S 1 , E 1 ) as an example, the generation start time S 1 is earlier than the request start time S, the generation end time E 1 is later than the request start time S, and the generation end time E 1 is earlier than the request end time E. In this way, the pressure value generation time period (S 1 , E 1 ) and the request synchronization time period (S, E) have an overlapping time period (S, E 1 ), that is, the synchronization condition is met, and the pressure value F 1 corresponding to the pressure value generation time period (S 1 , E 1 ) is determined as the target pressure value.
第三种情况:压力值生成时间段中生成开始时间早于请求开始时间,且生成结束时间晚于请求结束时间。示例性的,如图10中的(c)所示,以遍历到的压力值生成时间段(S1,E1)为例,生成开始时间S1早于请求开始时间S,且生成结束时间E1晚于请求结束时间E,这样,压力值生成时间段(S1,E1)与请求同步时间段(S,E)存在重叠时间段(S,E),即满足同步条件,则将该压力值生成时间段(S1,E1)对应的压力值F1确定为目标压力值。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. Exemplarily, as shown in (c) of FIG10 , taking the traversed pressure value generation time period (S 1 , E 1 ) as an example, the generation start time S 1 is earlier than the request start time S, and the generation end time E 1 is later than the request end time E. In this way, the pressure value generation time period (S 1 , E 1 ) 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 F 1 corresponding to the pressure value generation time period (S 1 , E 1 ) is determined as the target pressure value.
第四种情况:压力值生成时间段中生成开始时间晚于请求开始时间、生成开始时间早于请求结束时间、且生成结束时间晚于请求结束时间。示例性的,如图10中的(d)所示,以遍历到的压力值生成时间段(S1,E1)为例,生成开始时间S1晚于请求开始时间S且早于请求结束时间E,并且生成结束时间E1晚于请求结束时间E,这样,压力值生成时间段(S1,E1)与请求同步时间段(S,E)存在重叠时间段(S1,E),即满足同步条件,则将该压力值生成时间段(S1,E1)对应的压力值F1确定为目标压力值。The fourth case: the generation start time in the pressure value generation time period 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. Exemplarily, as shown in (d) in FIG10 , taking the traversed pressure value generation time period (S 1 , E 1 ) as an example, the generation start time S 1 is later than the request start time S and earlier than the request end time E, and the generation end time E 1 is later than the request end time E. In this way, the pressure value generation time period (S 1 , E 1 ) and the request synchronization time period (S, E) have an overlapping time period (S 1 , E), that is, the synchronization condition is met, and the pressure value F 1 corresponding to the pressure value generation time period (S 1 , E 1 ) is determined as the target pressure value.
需要说明的是,本申请实施例对确定目标压力值的时机不进行限定。例如,本申请实施例中可穿戴设备可以在遍历至每一压力值生成时间段(例如存储页)时,判断该压力值生成时间段是否满足遍历结束条件,以及该压力值生成时间段对应压力值是否为目标压力值。再例如,申请实施例中可穿戴设备也可以在遍历至每一压力值生成时间段时,判断该压力值生成时间段是否满足遍历结束条件;然后,结束遍历后,从遍历到的所有压力值生成时间段中,确定所有满足同步条件的压力值为目标压力值。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.
需要说明的是,本申请实施例中,“晚于”可以包括晚于或等于的情况,“早于”可以包括早于或等于的情况。例如,生成结束时间晚于请求结束时间包括生成结束时间晚于请求结束时间,或者生成结束时间等于请求结束时间的情况。又例如,生成结束时间早于系统时间包括生成结束时间早于系统时间,或者生成结束时间等于系统时间的情况。再例如,生成开始时间晚于请求开始时间包括生成开始时间晚于请求开始时间,或者生成开始时间等于请求开始时间的情况。此处不再一一列举。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.
步骤307,将目标压力值同步至与可穿戴设备通信连接的手机。Step 307: synchronizing the target pressure value to a mobile phone that is communicatively connected to the wearable device.
遍历结束并确定目标压力值后,可穿戴设备可以将确定的所有目标压力值发送至手机。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.
综上,本申请实施例提供的压力值同步方法,以生成结束时间晚于请求结束时间、且生成结束时间早于系统时间作为遍历结束条件,可以解决在生成结束时间Ek跳变至系统时间C之后的情况下,部分压力值无法同步至手机的问题。In summary, the pressure value synchronization method provided in the embodiment of the present application 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, which can solve the problem that some pressure values cannot be synchronized to the mobile phone when the generation end time Ek jumps to the system time C.
本文中描述的各个方法实施例可以为独立的方案,也可以根据内在逻辑进行组合,这些方案都落入本申请的保护范围中。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.
可以理解的是,上述各个方法实施例中,由第一电子设备实现的方法和操作,也可以由可用于第一电子设备的部件(例如芯片、模块或者电路)实现。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.
上述实施例对本申请提供的压力值同步方法进行了介绍。可以理解的是,第一电子设备为了实现上述功能,其包含了执行每一个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。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.
本申请实施例可以根据上述方法示例对第一电子设备进行功能模块的划分,例如,可以对应每一个功能划分每一个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。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 module 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.
以上,结合图1至图10详细说明了本申请实施例提供的压力值同步方法。以下,结合图11和图12详细说明本申请实施例提供的装置。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的内容可以参见上文方法实施例,为了简洁,这里不再赘述。The pressure value synchronization method provided by the embodiment of the present application is described in detail above in combination with Figures 1 to 10. The device provided by the embodiment of the present application is described in detail below in combination with Figures 11 and 12. It should be understood that the description of the device embodiment corresponds to the description of the method embodiment. Therefore, the content not described in detail can be referred to the method embodiment above. For the sake of brevity, it will not be repeated here.
参见图11,图11为本申请实施例提供的一种压力值同步装置的结构框图。该装置可以为第一电子设备的一部分,应用于第一电子设备中。也可以为第一电子设备,本申请对此不进行限制。如图11所示,该装置400可以包括:压力值获取模块401、存储模块402、系统时间获取模块403、遍历模块404和同步模块405。该装置400可以执行上述图1至图10所示任意一个方法实施例中第一电子设备执行的操作。See Figure 11, which 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 is applied to the first electronic device. It can also be the first electronic device, and the present application does not limit this. As shown in Figure 11, 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 can perform the operations performed by the first electronic device in any one of the method embodiments shown in Figures 1 to 10 above.
例如,在本申请一种可选的实施例中,所述压力值获取模块401,可以用于获取多个压力值,以及各所述压力值对应的压力值生成时间段;所述压力值生成时间段包括生成开始时间和生成结束时间;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;
存储模块402,可以用于在所述第一电子设备的存储器中按照所述压力值生成时间段依次存储所述多个压力值,以及对应的压力值生成时间段;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;
系统时间获取模块403,可以用于响应于接收到的压力值同步请求信息,获取所述第一电子设备的系统时间;其中,所述压力值同步请求信息包括请求同步时间段,所述请求同步时间段包括请求开始时间和请求结束时间;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;
遍历模块404,可以用于遍历所述存储器中存储的多个所述压力值生成时间段,在所述生成结束时间晚于所述请求结束时间、且所述生成结束时间早于所述系统时间的情况下,结束遍历,并将遍历到的所述压力值生成时间段与所述请求同步时间段部分或者全部重叠的压力值,确定为目标同步压力值;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;
同步模块405,可以用于将所述目标压力值同步至与所述第一电子设备通信连接的第二电子设备。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.
一种可能的实现方式中,所述遍历模块404具体用于将遍历到的所述压力值生成时间段中所述生成开始时间晚于所述请求开始时间,且所述生成结束时间早于所述请求结束时间的压力值,确定为目标同步压力值。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.
一种可能的实现方式中,所述遍历模块404具体用于将遍历到的所述压力值生成时间段中所述生成开始时间早于所述请求开始时间、所述生成结束时间晚于所述请求开始时间、且所述生成结束时间早于所述请求结束时间的压力值,确定为目标同步压力值。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.
一种可能的实现方式中,所述遍历模块404具体用于将遍历到的所述压力值生成时间段中所述生成开始时间早于所述请求开始时间,且所述生成结束时间晚于所述请求结束时间的压力值,确定为目标同步压力值。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.
一种可能的实现方式中,所述遍历模块404具体用于将遍历到的所述压力值生成时间段中所述生成开始时间晚于所述请求开始时间、所述生成开始时间早于所述请求结束时间、且所述生成结束时间晚于所述请求结束时间的压力值,确定为目标同步压力值。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.
一种可能的实现方式中,所述多个压力值分别存储在所述存储器的多个存储页,每个所述存储页包括一个压力值以及所述一个压力值对应的压力值生成时间段。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.
一种可能的实现方式中,所述遍历模块404具体用于在所述第一电子设备与所述第二电子设备建立通信连接后,首次接收到所述压力值同步请求信息的情况下,确定从所述存储器中首个存储页开始遍历。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.
一种可能的实现方式中,所述遍历模块404具体用于在所述第一电子设备与所述第二电子设备建立通信连接后,第i次接收到所述压力值同步请求信息的情况下,确定第一存储页,所述第一存储页为上一次同步压力值时遍历的最后一个存储页;其中,所述i为大于1的正整数;在所述第一存储页不为所述存储区域中最后一个存储页的情况下,确定从第二存储页开始遍历,其中,所述第二存储页为与所述第一存储页相邻、且位于所述第一存储页之后的存储页。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.
一种可能的实现方式中,所述遍历模块404具体用于在所述第一存储页为所述存储器中最后一个存储页的情况下,确定从所述存储器中首个存储页开始遍历。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.
一种可能的实现方式中,装置400还可以包括接收模块406,接收模块406可以用于在所述第一电子设备与所述第二电子设备建立通信连接的情况下,接收所述第二电子设备发送的所述压力值同步请求信息。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.
一种可能的实现方式中,接收模块406可以用于在所述第一电子设备与所述第二电子设备建立通信连接的情况下,获取所述第一电子设备的运动增量;在所述运动增量大于增量阈值的情况下,向所述第二电子设备发送压力值同步通知;其中,所述压力值同步通知用于通知所述第二电子设备请求同步所述第一电子设备的压力值。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.
也就是说,该装置400可以实现对应于图1至图10所示任意一个压力值同步方法实施例中第一电子设备所执行的步骤或者流程,该装置400可以包括用于执行图1至图10所示任意一个压力值同步方法实施例中第一电子设备执行的方法的模块。应理解,各模块执行上述相应步骤的具体过程在上述压力值同步方法实施例中已经详细说明,为了简洁,在此不再赘述。That is, the device 400 can implement the steps or processes executed by the first electronic device in any one of the pressure value synchronization method embodiments shown in Figures 1 to 10, and the device 400 may include a module for executing the method executed by the first electronic device in any one of the pressure value synchronization method embodiments shown in Figures 1 to 10. 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 for the sake of brevity, it will not be repeated here.
本申请实施例还提供了一种处理装置,该处理装置包括至少一个处理器和通信接口。所述通信接口用于为所述至少一个处理器提供信息输入和/或输出,所述至少一个处理器用于执行上述方法实施例中的方法。The embodiment of the present application also 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.
应理解,上述处理装置可以是一个芯片。例如,参见图11,图11为本申请实施例提供的一种芯片的结构框图。图11所示的芯片可以为通用处理器,也可以为专用处理器。该芯片500可以包括至少一个处理器501。其中,所述至少一个处理器501可以用于支持图11所示的装置执行图1至图10中任意一个实施例所示的技术方案。It should be understood that the above-mentioned processing device can be a chip. For example, refer to Figure 11, which is a structural block diagram of a chip provided in an embodiment of the present application. The chip shown in Figure 11 can be a general-purpose processor or a dedicated processor. The chip 500 may include at least one processor 501. Among them, the at least one processor 501 can be used to support the device shown in Figure 11 to execute the technical solution shown in any one of the embodiments of Figures 1 to 10.
可选的,该芯片500还可以包括收发器502,收发器502用于接受处理器501的控制,用于支持图11所示的装置执行图1至图10中任意一个实施例所示的技术方案。可选的,图11所示的芯片500还可以包括存储介质503。具体的,所述收发器502可以替换为通信接口,所述通信接口为所述至少一个处理器501提供信息输入和/或输出。Optionally, the chip 500 may further include a transceiver 502, which is used to accept the control of the processor 501 and to support the device shown in FIG11 to execute the technical solution shown in any one of the embodiments in FIG1 to FIG10. Optionally, the chip 500 shown in FIG11 may further include a storage medium 503. Specifically, the transceiver 502 may be replaced by a communication interface, which provides information input and/or output for the at least one processor 501.
需要说明的是,图11所示的芯片500可以使用下述电路或者器件来实现:一个或多个现场可编程门阵列(field programmable gate array,FPGA)、可编程逻辑器件(programmable logic device,PLD)、专用集成芯片(application specific integratedcircuit,ASIC)、系统芯片(system on chip,SoC)、中央处理器(central processor unit,CPU)、网络处理器(network processor,NP)、数字信号处理电路(digital signalprocessor,DSP)、微控制器(micro controller unit,MCU),控制器、状态机、门逻辑、分立硬件部件、任何其他适合的电路、或者能够执行本申请通篇所描述的各种功能的电路的任意组合。It should be noted that the chip 500 shown in Figure 11 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), microcontroller unit (MCU), controller, state machine, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout this application.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。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.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rateSDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(directrambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。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.
根据本申请实施例提供的方法,本申请实施例还提供一种计算机程序产品,该计算机程序产品包括:计算机程序或指令,当该计算机程序或指令在计算机上运行时,使得该计算机执行图1至图10所示实施例中任意一个实施例的方法。According to the method provided in the embodiments of the present application, the embodiments of the present application also provide a computer program product, which includes: a computer program or instructions, when the computer program or instructions are run on a computer, the computer executes the method of any one of the embodiments shown in Figures 1 to 10.
根据本申请实施例提供的方法,本申请实施例还提供一种计算机存储介质,该计算机存储介质存储有计算机程序或指令,当该计算机程序或指令在计算机上运行时,使得该计算机执行图1至图10所示实施例中任意一个实施例的方法。According to the method provided in the embodiments of the present application, the embodiments of the present application also provide a computer storage medium, which stores a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the method of any one of the embodiments shown in Figures 1 to 10.
根据本申请实施例提供的方法,本申请实施例还提供了一种电子设备。该电子设备包括但不限于智能手表、智能手环等可穿戴设备。该电子设备可以包括本申请上述实施例提供的压力值同步装置。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.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置模块和电子设备的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。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.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。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.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。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.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个单元中。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.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。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 each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
上述本申请实施例提供的压力值同步装置、处理装置、芯片、计算机存储介质、计算机程序产品、电子设备均用于执行上文所提供的方法,因此,其所能达到的有益效果可参考上文所提供的方法对应的有益效果,在此不再赘述。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.
应理解,在本申请的各个实施例中,各步骤的执行顺序应以其功能和内在逻辑确定,各步骤序号的大小并不意味着执行顺序的先后,不对实施例的实施过程构成限定。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.
本说明书的各个部分均采用递进的方式进行描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点介绍的都是与其他实施例不同之处。尤其,对于压力值同步装置、芯片、计算机存储介质、计算机程序产品、电子设备的实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。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.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。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.
以上所述的本申请实施方式并不构成对本申请保护范围的限定。The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310550588.7A CN117708231B (en) | 2023-05-15 | 2023-05-15 | Pressure value synchronization method and device and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310550588.7A CN117708231B (en) | 2023-05-15 | 2023-05-15 | Pressure value synchronization method and device and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN117708231A CN117708231A (en) | 2024-03-15 |
| CN117708231B true CN117708231B (en) | 2024-09-13 |
Family
ID=90144913
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310550588.7A Active CN117708231B (en) | 2023-05-15 | 2023-05-15 | Pressure value synchronization method and device and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117708231B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108254541A (en) * | 2016-12-28 | 2018-07-06 | 腾讯科技(深圳)有限公司 | Blood sugar test data correcting method, device and blood glucose meter |
| CN115240850A (en) * | 2022-06-23 | 2022-10-25 | 维沃移动通信有限公司 | Information processing method, device, wearable device and electronic device |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9141087B2 (en) * | 2009-04-26 | 2015-09-22 | Nike, Inc. | Athletic watch |
| KR102606689B1 (en) * | 2018-06-14 | 2023-11-28 | 삼성전자 주식회사 | Method and apparatus for providing biometric information in electronic device |
| CN111708302A (en) * | 2020-06-23 | 2020-09-25 | 吴松林 | System for synchronously acquiring biomechanical data by using mouse |
| CN114661681A (en) * | 2020-12-23 | 2022-06-24 | 华为技术有限公司 | Data synchronization method and related equipment |
| CN115827774B (en) * | 2022-10-24 | 2025-11-18 | 超聚变数字技术有限公司 | Data synchronization methods and computing devices |
-
2023
- 2023-05-15 CN CN202310550588.7A patent/CN117708231B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108254541A (en) * | 2016-12-28 | 2018-07-06 | 腾讯科技(深圳)有限公司 | Blood sugar test data correcting method, device and blood glucose meter |
| CN115240850A (en) * | 2022-06-23 | 2022-10-25 | 维沃移动通信有限公司 | Information processing method, device, wearable device and electronic device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117708231A (en) | 2024-03-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3322175B1 (en) | Electronic device including camera and acoustic component | |
| US10602076B2 (en) | Method for combining and providing image, obtained through a camera, electronic device, and storage medium | |
| CN113545745B (en) | Usage monitoring method and medium for wearable electronic device and electronic device thereof | |
| WO2021052263A1 (en) | Voice assistant display method and device | |
| US20170308226A1 (en) | Display driving integrated circuit and electronic device having the same | |
| KR102408649B1 (en) | Configuration setting method and device | |
| EP3352666B1 (en) | Activity information providing method and electronic device supporting the same | |
| US10095191B2 (en) | Method of outputting alarm and electronic device supporting the same | |
| CN118626005A (en) | Method and device for adjusting memory configuration parameters | |
| CN114443156A (en) | Application processing method and electronic device | |
| KR20180022211A (en) | Electronic device and method for controlling operation thereof | |
| US20240137870A1 (en) | Power Consumption Control Method and Apparatus | |
| KR20180064934A (en) | Electronic device and method for controlling surface heat in the electronic device | |
| CN117708231B (en) | Pressure value synchronization method and device and electronic equipment | |
| CN116700585B (en) | Screen off control method, electronic device and storage medium | |
| CN113996046A (en) | Warming-up judgment method and device and electronic equipment | |
| CN117135582B (en) | Motion data synchronization method and device | |
| CN113672454B (en) | Freeze screen monitoring method, electronic device and computer-readable storage medium | |
| CN116662130A (en) | Method for counting application usage time, electronic device and readable storage medium | |
| CN116999024B (en) | Physiological parameter detection method, electronic device, storage medium, and program product | |
| US20160066090A1 (en) | Audio data processing method and electronic device supporting the same | |
| CN117729561B (en) | System upgrade method, terminal and storage medium | |
| CN118069154B (en) | Application compiling control method and related equipment | |
| CN118444767B (en) | Electronic equipment performance optimization method and electronic equipment | |
| WO2024235150A1 (en) | Sports data synchronization method and electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |