[go: up one dir, main page]

CN114602155B - Swimming information statistical method, computer-readable storage medium and electronic device - Google Patents

Swimming information statistical method, computer-readable storage medium and electronic device Download PDF

Info

Publication number
CN114602155B
CN114602155B CN202210509907.5A CN202210509907A CN114602155B CN 114602155 B CN114602155 B CN 114602155B CN 202210509907 A CN202210509907 A CN 202210509907A CN 114602155 B CN114602155 B CN 114602155B
Authority
CN
China
Prior art keywords
electronic device
swimming
user
data
stroke
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
Application number
CN202210509907.5A
Other languages
Chinese (zh)
Other versions
CN114602155A (en
Inventor
邸皓轩
李丹洪
张晓武
陈政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210509907.5A priority Critical patent/CN114602155B/en
Publication of CN114602155A publication Critical patent/CN114602155A/en
Application granted granted Critical
Publication of CN114602155B publication Critical patent/CN114602155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B71/00Games or sports accessories not covered in groups A63B1/00 - A63B69/00
    • A63B71/06Indicating or scoring devices for games or players, or for other sports activities
    • A63B71/0619Displays, user interfaces and indicating devices, specially adapted for sport equipment, e.g. display mounted on treadmills
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B69/00Training appliances or apparatus for special sports
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B71/00Games or sports accessories not covered in groups A63B1/00 - A63B69/00
    • A63B71/06Indicating or scoring devices for games or players, or for other sports activities
    • A63B71/0619Displays, user interfaces and indicating devices, specially adapted for sport equipment, e.g. display mounted on treadmills
    • A63B71/0622Visual, audio or audio-visual systems for entertaining, instructing or motivating the user
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B71/00Games or sports accessories not covered in groups A63B1/00 - A63B69/00
    • A63B71/06Indicating or scoring devices for games or players, or for other sports activities
    • A63B71/0619Displays, user interfaces and indicating devices, specially adapted for sport equipment, e.g. display mounted on treadmills
    • A63B71/0622Visual, audio or audio-visual systems for entertaining, instructing or motivating the user
    • A63B2071/0625Emitting sound, noise or music
    • A63B2071/063Spoken or verbal instructions
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B71/00Games or sports accessories not covered in groups A63B1/00 - A63B69/00
    • A63B71/06Indicating or scoring devices for games or players, or for other sports activities
    • A63B71/0619Displays, user interfaces and indicating devices, specially adapted for sport equipment, e.g. display mounted on treadmills
    • A63B2071/065Visualisation of specific exercise parameters
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B71/00Games or sports accessories not covered in groups A63B1/00 - A63B69/00
    • A63B71/06Indicating or scoring devices for games or players, or for other sports activities
    • A63B71/0619Displays, user interfaces and indicating devices, specially adapted for sport equipment, e.g. display mounted on treadmills
    • A63B2071/0658Position or arrangement of display
    • A63B2071/0661Position or arrangement of display arranged on the user
    • A63B2071/0663Position or arrangement of display arranged on the user worn on the wrist, e.g. wrist bands
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B2220/00Measuring of physical parameters relating to sporting activity
    • A63B2220/40Acceleration

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Physical Education & Sports Medicine (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The application relates to the technical field of wearable equipment, and discloses a swimming information statistical method, a computer readable storage medium and electronic equipment, which are applied to a system comprising first electronic equipment and second electronic equipment, wherein the first electronic equipment is worn on a first part of a user, the second electronic equipment is worn on a second part of the user, and the difference between the motion tracks of the first part under different swimming postures is smaller than the difference between the motion tracks of the second part. The method comprises the following steps: the method comprises the steps that first electronic equipment obtains first motion data of a user; the first electronic equipment acquires second motion data acquired by the second electronic equipment in the swimming process of the user; the first electronic equipment integrates the first motion data and the second motion data to obtain integrated motion data; the first electronic equipment counts swimming information of the user based on the integrated motion data. According to the technical scheme, the swimming information of the user counted by the first electronic equipment is more accurate, and the user experience is favorably improved.

Description

游泳信息统计方法、计算机可读存储介质和电子设备Swimming information statistical method, computer-readable storage medium and electronic device

技术领域technical field

本申请涉及可穿戴设备技术领域,特别涉及一种游泳信息统计方法、计算机可读存储介质和电子设备。The present application relates to the technical field of wearable devices, in particular to a swimming information statistics method, a computer-readable storage medium and electronic devices.

背景技术Background technique

随着物质文化水平的提高,人们的运动健康意识也逐步提升,游泳作为一项具有能够改善心肺功能、提高身体协调性、增强呼吸肌力量等诸多好处的运动,越来越多的人选择游泳,来增强体质。同时人们也希望能够准确监测及记录自己的游泳相关数据,以对自身的运动情况有更为全面的了解。With the improvement of material and cultural level, people's awareness of sports and health has gradually improved. As a sport that can improve cardiopulmonary function, improve body coordination, and strengthen respiratory muscle strength, more and more people choose swimming. , to enhance physical fitness. At the same time, people also hope to accurately monitor and record their own swimming-related data, so as to have a more comprehensive understanding of their own sports conditions.

人们可以通过智能手表对游泳数据进行监测,智能手表的价格较低,穿戴方便,被大众广泛采用,但是由于其传感器有限,且用户的穿戴习惯差异较容易影响监测到的游泳数据的准确度。People can monitor swimming data through smart watches. Smart watches are cheap and easy to wear, and are widely used by the public. However, due to their limited sensors and differences in users' wearing habits, it is easy to affect the accuracy of the monitored swimming data.

发明内容Contents of the invention

有鉴于此,本申请实施例提供了一种游泳信息统计方法、计算机可读存储介质和电子设备。In view of this, the embodiments of the present application provide a swimming information statistics method, a computer-readable storage medium, and an electronic device.

本申请技术方案中,佩戴用户第一部位的第一电子设备(例如佩戴于用户手腕的运动手表),将第一电子设备采集的用户的第一运动数据,和从佩戴于用户第二部位的第二电子设备(例如佩戴于用户耳朵上的运动耳机)获取的用户的第二运动数据,进行整合后进行用户的游泳信息的统计。由于在不同泳姿下第一部位的运动轨迹之间的差别小于第二部位之间的运动轨迹之间的差别,例如对于不同的泳姿,即使用户的手部动作一致,但是用户的头部动作差别较大。因此利用佩戴于用户第一部位的第一电子设备采集的用户的运动数据,以及和佩戴于用户第二部位的第二电子设备采集的用户的运动数据进行整合后,统计出的用户的游泳信息更加准确,例如可以更加准确地区分出用户的泳姿、划水次数、游泳趟数、划水频率等。In the technical solution of the present application, the first electronic device worn on the user's first part (for example, a sports watch worn on the user's wrist), the user's first motion data collected by the first electronic device, and the user's first motion data collected from the user's second part The user's second exercise data acquired by the second electronic device (for example, a sports earphone worn on the user's ear) is integrated to perform statistics on the user's swimming information. Since the difference between the motion trajectories of the first parts is smaller than the difference between the motion trajectories of the second parts under different swimming styles, for example, for different swimming styles, even if the user's hand movements are consistent, but the user's head Actions vary greatly. Therefore, after integrating the user's exercise data collected by the first electronic device worn on the user's first part and the user's exercise data collected by the second electronic device worn on the user's second part, the user's swimming information is calculated More accurate, for example, the user's swimming style, number of strokes, number of strokes, frequency of strokes, etc. can be more accurately distinguished.

第一方面,本申请实施例提供了一种游泳信息统计方法,应用于包含第一电子设备和第二电子设备的系统中,其特征在于,第一电子设备佩戴于用户的第一部位,第二电子设备佩戴于用户的第二部位,在不同泳姿下第一部位的运动轨迹之间的差别小于第二部位之间的运动轨迹之间的差别,方法包括:In the first aspect, the embodiment of the present application provides a swimming information statistics method, which is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device is worn on the first part of the user, and the second The second electronic device is worn on the second part of the user, and the difference between the motion trajectories of the first part under different swimming styles is smaller than the difference between the motion trajectories of the second parts. The method includes:

第一电子设备获取用户在游泳过程中的第一运动数据;The first electronic device acquires first motion data of the user during swimming;

第一电子设备获取第二电子设备在用户游泳过程中采集的第二运动数据;The first electronic device acquires second motion data collected by the second electronic device during the user's swimming;

第一电子设备将第一运动数据和第二运动数据进行整合,得到整合后的运动数据;The first electronic device integrates the first exercise data and the second exercise data to obtain integrated exercise data;

第一电子设备基于整合后的运动数据统计出用户的游泳信息。The first electronic device calculates the user's swimming information based on the integrated exercise data.

在上述第一方面的一种可能的实现中,第一电子设备将第一运动数据和第二运动数据进行整合,得到整合后的运动数据,包括:In a possible implementation of the first aspect above, the first electronic device integrates the first exercise data and the second exercise data to obtain integrated exercise data, including:

第一电子设备将第一运动数据和第二运动数据进行数据组帧,得到整合后的运动数据。The first electronic device frames the first motion data and the second motion data to obtain integrated motion data.

在上述第一方面的一种可能的实现中,第一电子设备将第一运动数据和第二运动数据进行数据组帧,得到整合后的运动数据,包括:In a possible implementation of the first aspect above, the first electronic device frames the first motion data and the second motion data to obtain integrated motion data, including:

第一电子设备根据第二运动数据的帧率,对第一运动数据进行降采样处理,得到降采样后的第一运动数据,其中,降采样后的第一运动数据的帧率和第二运动数据的帧率相同。The first electronic device performs down-sampling processing on the first motion data according to the frame rate of the second motion data to obtain the down-sampled first motion data, wherein the frame rate of the down-sampled first motion data and the second motion data The frame rate of the data is the same.

在上述第一方面的一种可能的实现中,第一电子设备将第一运动数据和第二运动数据进行数据组帧,得到整合后的运动数据,包括:In a possible implementation of the first aspect above, the first electronic device frames the first motion data and the second motion data to obtain integrated motion data, including:

第一电子设备根据第一运动数据的帧率,对第二运动数据进行插值处理,得到插值处理后的第二运动数据,其中,插值处理后的第二运动数据的帧率和第一运动数据的帧率相同。The first electronic device performs interpolation processing on the second motion data according to the frame rate of the first motion data to obtain the second motion data after the interpolation processing, wherein the frame rate of the second motion data after the interpolation processing and the first motion data The frame rate is the same.

在上述第一方面的一种可能的实现中,用户的游泳信息包括用户的泳姿,第一电子设备基于整合后的运动数据统计出用户的游泳信息,包括:In a possible implementation of the first aspect above, the user's swimming information includes the user's swimming style, and the first electronic device calculates the user's swimming information based on the integrated exercise data, including:

第一电子设备对整合后的运动数据进行特征提取,得到整合后的运动数据的时域特征;The first electronic device extracts features from the integrated motion data to obtain time-domain features of the integrated motion data;

第一电子设备将整合后的运动数据的时域特征输入预设的泳姿识别模型,得到泳姿识别结果;The first electronic device inputs the time-domain features of the integrated motion data into a preset stroke recognition model to obtain a stroke recognition result;

第一电子设备基于泳姿识别结果,统计出用户的泳姿。The first electronic device counts the swimming strokes of the user based on the recognition result of the swimming strokes.

在上述第一方面的一种可能的实现中,预设的泳姿识别模型为二分类模型。In a possible implementation of the first aspect above, the preset stroke recognition model is a binary classification model.

在上述第一方面的一种可能的实现中,用户的游泳信息还包括用户的划水动作,第一电子设备基于整合后的运动数据统计出用户的游泳信息,包括:In a possible implementation of the first aspect above, the user's swimming information also includes the user's stroke action, and the first electronic device calculates the user's swimming information based on the integrated exercise data, including:

第一电子设备根据统计出的用户的泳姿,确定出整合后的运动数据中用以统计用户的划水动作的第一目标数据,其中,第一目标数据包括第一电子设备采集的第一目标子数据以及第二电子设备采集的第二目标子数据;According to the statistics of the user's swimming strokes, the first electronic device determines the first target data for counting the user's stroke movements in the integrated motion data, wherein the first target data includes the first target data collected by the first electronic device. Target sub-data and second target sub-data collected by the second electronic device;

第一电子设备根据第一目标子数据确定出多个粗筛划水动作;The first electronic device determines a plurality of coarse sieving strokes according to the first target sub-data;

第一电子设备根据第二目标子数据,从多个粗筛划水动作中统计出用户的划水动作。According to the second target sub-data, the first electronic device counts the stroke actions of the user from the plurality of roughly screened stroke actions.

在上述第一方面的一种可能的实现中,第一电子设备包括陀螺仪和加速度计,第一目标子数据包括第一电子设备的陀螺仪采集的数据或者第一电子设备的加速度计采集的数据。In a possible implementation of the first aspect above, the first electronic device includes a gyroscope and an accelerometer, and the first target sub-data includes data collected by the gyroscope of the first electronic device or data collected by the accelerometer of the first electronic device. data.

在上述第一方面的一种可能的实现中,第一电子设备包括加速度计,第二目标子数据包括第二电子设备的加速度计采集的数据。In a possible implementation of the foregoing first aspect, the first electronic device includes an accelerometer, and the second target sub-data includes data collected by the accelerometer of the second electronic device.

在上述第一方面的一种可能的实现中,用户的游泳信息包括用户的转身动作,第一电子设备基于整合后的运动数据统计出用户的游泳信息,包括:In a possible implementation of the above first aspect, the user's swimming information includes the user's turning action, and the first electronic device calculates the user's swimming information based on the integrated exercise data, including:

第一电子设备确定出用户的初始划水动作;The first electronic device determines the user's initial water stroke;

第一电子设备根据包括初始划水动作在内的连续第一数量的划水动作对应的第二运动数据,确定出用户的初始游泳方向;The first electronic device determines the user's initial swimming direction according to the second motion data corresponding to the first number of consecutive strokes including the initial stroke;

第一电子设备根据连续第一数量的划水动作之后的各划水动作对应的第二运动数据,确定出连续第一数量的划水动作之后的各划水动作对应的游泳方向;The first electronic device determines the swimming direction corresponding to each stroke after the first continuous number of strokes according to the second motion data corresponding to each stroke after the first number of consecutive strokes;

在第一电子设备根据连续第一数量的划水动作之后的每相邻两个划水动作对应的游泳方向之间的差异,判断用户发生转身时,第一电子设备确定出用户发生转身时对应的目标划水动作;When the first electronic device judges that the user has turned around based on the difference between the swimming directions corresponding to every two adjacent strokes after the first consecutive number of strokes, the first electronic device determines that the user has turned around. target stroke;

第一电子设备根据目标划水动作之后连续第二数量的划水动作对应的第二运动数据,确定出目标划水动作之后连续第二数量的划水动作对应的目标游泳方向;The first electronic device determines the target swimming direction corresponding to the second number of consecutive strokes after the target stroke according to the second motion data corresponding to the second number of consecutive strokes after the target stroke;

在第一电子设备确定出目标游泳方向和初始游泳方向之间的差异达到阈值时,第一电子设备确认用户在目标划水动作期间发生了转身,并统计出用户的转身动作。When the first electronic device determines that the difference between the target swimming direction and the initial swimming direction reaches a threshold, the first electronic device confirms that the user turns around during the target stroke, and counts the user's turning movements.

在上述第一方面的一种可能的实现中,上述方法还包括:In a possible implementation of the above first aspect, the above method further includes:

第一电子设备将初始游泳方向更新为目标游泳方向。The first electronic device updates the initial swimming direction to a target swimming direction.

在上述第一方面的一种可能的实现中,第二电子设备包括陀螺仪、加速度计、磁力计,第二运动数据包括第二电子设备的陀螺仪采集的数据、第二电子设备的加速度计采集的数据、第二电子设备的磁力计采集的数据。In a possible implementation of the first aspect above, the second electronic device includes a gyroscope, an accelerometer, and a magnetometer, and the second movement data includes data collected by the gyroscope of the second electronic device, data collected by the accelerometer of the second electronic device The collected data, the data collected by the magnetometer of the second electronic device.

在上述第一方面的一种可能的实现中,第一电子设备为运动手表。In a possible implementation of the first aspect above, the first electronic device is a sports watch.

在上述第一方面的一种可能的实现中,第二电子设备为运动耳机。In a possible implementation of the foregoing first aspect, the second electronic device is a sports earphone.

第二方面,本申请实施里提供了一种计算机可读存储介质,计算机可读存储介质上存储有指令,该指令在电子设备上执行时使电子设备执行上述第一方面以及第一方面的任意一种可能的实现中的游泳信息统计方法。In the second aspect, the implementation of the present application provides a computer-readable storage medium, and instructions are stored on the computer-readable storage medium, and when the instructions are executed on the electronic equipment, the electronic equipment executes any of the above-mentioned first aspect and the first aspect. A statistical method for swimming information in a possible implementation.

第三方面,本申请实施里提供了一种电子设备,包括:In a third aspect, the implementation of this application provides an electronic device, including:

存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及memory for storing instructions to be executed by one or more processors of the electronic device, and

处理器,当指令被一个或多个处理器执行时,处理器用于执行上述第一方面以及第一方面的任意一种可能的实现中的游泳信息统计方法。A processor, when the instructions are executed by one or more processors, the processor is configured to execute the above first aspect and the swimming information statistics method in any possible implementation of the first aspect.

附图说明Description of drawings

图1根据本申请的一些实施例,示出了一种用户佩戴手表100和耳机200游泳的应用场景;Fig. 1 shows an application scenario in which a user wears a watch 100 and earphones 200 for swimming according to some embodiments of the present application;

图2A根据本申请的一些实施例,示出了一种图1所示的手表100的硬件结构框图;FIG. 2A shows a block diagram of the hardware structure of the watch 100 shown in FIG. 1 according to some embodiments of the present application;

图2B根据本申请的一些实施例,示出了一种图1所示的耳机200的硬件结构框图;FIG. 2B shows a hardware structural block diagram of the earphone 200 shown in FIG. 1 according to some embodiments of the present application;

图3根据本申请的一些实施例,示出了一种手表100的泳姿识别的流程图;Fig. 3 shows a flow chart of swimming stroke recognition of the watch 100 according to some embodiments of the present application;

图4A根据本申请的一些实施例,示出了另外一种手表100的泳姿识别的流程图;Fig. 4A shows another flow chart of swimming stroke recognition of the watch 100 according to some embodiments of the present application;

图4B根据本申请的一些实施例,示出了一种气压计数值的分布示意图;Fig. 4B shows a schematic diagram of the distribution of air pressure counter values according to some embodiments of the present application;

图4C根据本申请的一些实施例,示出了一种泳姿识别模型的结构示意图;Fig. 4C shows a schematic structural diagram of a swimming stroke recognition model according to some embodiments of the present application;

图4D根据本申请的一些实施例,示出了几种规范泳姿的示意图;Fig. 4D shows a schematic diagram of several standard swimming strokes according to some embodiments of the present application;

图5A根据本申请的一些实施例,示出了一种手表100进行划水动作识别的流程图;Fig. 5A shows a flow chart of a watch 100 performing water stroke recognition according to some embodiments of the present application;

图5B根据本申请的一些实施例,示出了一种图5A中粗筛动作实现的方法示流程示意图;Fig. 5B shows a schematic flowchart of a method for realizing the coarse screening action in Fig. 5A according to some embodiments of the present application;

图5C根据本申请的一些实施例,示出了一种手表100端信号和耳机200端信号的时域分布图;FIG. 5C shows a time-domain distribution diagram of a signal at the watch 100 terminal and a signal at the earphone 200 according to some embodiments of the present application;

图6A根据本申请的一些实施例,示出了一种手表100的转身识别流程示意图;FIG. 6A shows a schematic diagram of a turn-around recognition process of a watch 100 according to some embodiments of the present application;

图6B根据本申请的一些实施例,示出了一种耳机200的偏航角数值的时域分布示意图;Fig. 6B shows a schematic diagram of the time-domain distribution of the yaw angle value of an earphone 200 according to some embodiments of the present application;

图7根据本申请的一些实施例,示出了一种手表100的游泳信息统计的用户界面示意图;Fig. 7 shows a schematic user interface of swimming information statistics of the watch 100 according to some embodiments of the present application;

图8根据本申请的一些实施例,示出了一种图1所示的手表100的软件逻辑框图。Fig. 8 shows a software logic block diagram of the watch 100 shown in Fig. 1 according to some embodiments of the present application.

具体实施方式Detailed ways

本申请的说明性实施例包括但不限于一种游泳信息统计方法、计算机可读存储介质和电子设备。下面将使用本领域技术人员通常采用的术语来描述说明性实施例的各个方面。Illustrative embodiments of the present application include, but are not limited to, a swimming information statistics method, a computer-readable storage medium, and an electronic device. Various aspects of the illustrative embodiments are described below using terms commonly employed by those skilled in the art.

图1示出了本申请实施方式的示例性应用场景。图1中,用户在游泳过程中,手臂上佩戴有手表100。手表100可以对用户的游泳数据进行监测,例如,监测用户泳姿,划水次数等,以便于用户后续进行查看。Fig. 1 shows an exemplary application scenario of the embodiment of the present application. In FIG. 1 , a user wears a watch 100 on his arm during swimming. The watch 100 can monitor the user's swimming data, for example, monitor the user's swimming style, number of strokes, etc., so that the user can check it later.

手表100通常通过内置的传感器(例如,加速度传感器,陀螺仪)测量用户手臂的运动数据,并基于测量得到的运动数据来确定泳姿、划水次数等游泳数据。但是,手表100由于其测量能力的局限性,测量得到的游泳数据的准确度有限。The watch 100 usually measures the motion data of the user's arm through built-in sensors (eg, acceleration sensor, gyroscope), and determines swimming data such as swimming strokes and stroke times based on the measured motion data. However, due to the limitation of the measurement capability of the watch 100, the accuracy of the measured swimming data is limited.

例如,用户游泳时的泳姿可能为蛙泳、蝶泳、自由泳、仰泳等。当用户在自由泳或仰泳时,用户手臂动作差异不大,此时,基于手表100测量到的运动数据可能难以准确对自由泳和仰泳进行区分,从而导致游泳数据的准确度较低。For example, the swimming style of the user may be breaststroke, butterfly, freestyle, backstroke, etc. when swimming. When the user is swimming freestyle or backstroke, there is little difference in the movement of the user's arms. At this time, it may be difficult to accurately distinguish between freestyle and backstroke based on the motion data measured by the watch 100 , resulting in low accuracy of the swimming data.

为此,本申请实施例提供了一种基于多设备联合的游泳数据监测系统,该系统包括易于穿脱的第一可穿戴设备,例如运动手表(以下简称手表),和第二可穿戴设备,例如运动耳机(以下简称耳机)。用户在游泳过程中需要佩戴这两个可穿戴设备,例如在图1所示的应用场景中,手表100佩戴在用户手腕,耳机200佩戴在用户耳朵上。这两个可穿戴设备均配置有加速度(acceleration transducer,ACC)计、磁力计(magnetometer,MAG)、陀螺仪(gyroscope,GYRO)等传感器,且这两个可穿戴设备可以通过蓝牙实现实时数据通信。在用户游泳过程中,这两个可穿戴设备均实时获取传感器数据,其中一个可穿戴设备将实时采集的传感器数据实时回传至另一处理能力较强的可穿戴设备,该处理能力较强的可穿戴设备将自身传感器采集的数据以及从另一可传输设备接收到的传感器数据进行联合分析,从而确定出用户的游泳姿势、划水次数、游泳趟数、划水频率等游泳信息。To this end, the embodiment of the present application provides a swimming data monitoring system based on the combination of multiple devices, the system includes a first wearable device that is easy to put on and take off, such as a sports watch (hereinafter referred to as a watch), and a second wearable device, For example, sports earphones (hereinafter referred to as earphones). The user needs to wear these two wearable devices during swimming. For example, in the application scenario shown in FIG. 1 , the watch 100 is worn on the user's wrist, and the earphone 200 is worn on the user's ear. Both wearable devices are equipped with accelerometer (acceleration transducer, ACC) meter, magnetometer (magnetometer, MAG), gyroscope (gyroscope, GYRO) and other sensors, and these two wearable devices can realize real-time data communication through Bluetooth . During the swimming process of the user, the two wearable devices obtain sensor data in real time, and one of the wearable devices transmits the real-time collected sensor data to the other wearable device with stronger processing capability in real time. The wearable device jointly analyzes the data collected by its own sensor and the sensor data received from another transmittable device to determine swimming information such as the user's swimming posture, number of strokes, number of strokes, stroke frequency, etc.

其中,游泳姿势可以包括蛙泳、蝶泳、自由泳、仰泳四种规范泳姿及混合泳等;划水次数可以为游泳时摆臂的动作次数;游泳趟数可以为游泳过程中在泳道中的折返次数;划水频率可以为游泳时摆臂动作的频率。应理解,本申请实施例涉及的手表和耳机可以具有防水功能。Among them, the swimming posture can include breaststroke, butterfly stroke, freestyle, backstroke four standard strokes and medley, etc.; the number of strokes can be the number of movements of swinging arms during swimming; the number of swimming times can be the number of times of turning back in the swimming lane during swimming ; The stroke frequency may be the frequency of the arm swing during swimming. It should be understood that the watch and earphones involved in the embodiments of the present application may have a waterproof function.

本申请实施例是将佩戴于用户手腕的可穿戴设备采集的用户的运动数据,以及佩戴于用户头部(例如佩戴于用户耳朵上)的可穿戴设备采集的用户的运动数据进行联合分析。对于不同的泳姿,即使用户的手部动作一致,但是用户的头部动作差别较大。因此利用佩戴于用户手腕的可穿戴设备采集的用户的运动数据,以及和佩戴于用户头部的可穿戴设备采集的用户的运动数据进行游泳信息的联合分析,得到的用户的游泳信息更加准确,例如可以更加准确地区分出用户的泳姿、划水次数、游泳趟数、划水频率等。In this embodiment of the present application, the user's motion data collected by a wearable device worn on the user's wrist and the user's motion data collected by a wearable device worn on the user's head (for example, worn on the user's ear) are jointly analyzed. For different swimming styles, even if the user's hand movements are consistent, the user's head movements are quite different. Therefore, using the user's motion data collected by the wearable device worn on the user's wrist and the user's motion data collected by the wearable device worn on the user's head to conduct a joint analysis of swimming information, the user's swimming information obtained is more accurate. For example, the user's swimming style, number of strokes, number of strokes, frequency of strokes, etc. of the user can be more accurately distinguished.

另外,在一些实施例中,游泳信息监测设备为专业设备,成本高,穿戴难度较大。相对于该实施例,本申请上述第一/第二可穿戴设备均可以为轻便易佩戴,成本较低的可穿戴设备。本申请技术方案不仅可以为用户提供轻便易佩戴的使用体验,还能在用户游泳过程中提供准确的游泳信息,有助于提升用户体验。In addition, in some embodiments, the swimming information monitoring equipment is professional equipment, which is expensive and difficult to wear. Compared with this embodiment, the above-mentioned first/second wearable devices in this application may be wearable devices that are light, easy to wear, and low in cost. The technical solution of the present application can not only provide the user with a light and easy-to-wear experience, but also provide accurate swimming information during the swimming process of the user, which helps to improve the user experience.

应理解,本申请技术方案适用的可穿戴设备包括但不限于运动手表,运动耳机,其中第一可穿戴设备还可以为智能手环、智能戒指等设备。第二可穿戴设备还可以为头戴式设备,例如增强现实设备等。It should be understood that the wearable devices to which the technical solution of the present application is applicable include but are not limited to sports watches and sports earphones, wherein the first wearable device may also be a smart bracelet, a smart ring, and other devices. The second wearable device may also be a head-mounted device, such as an augmented reality device.

需要说明的是,图1所示的应用场景只是为了说明本申请的技术方案的一个示例性的应用场景,其中只包括佩戴于一个佩戴于用户手腕的手表100和一副佩戴于用户耳朵的耳机200。在本申请的一些实施例中,用户还可以佩戴两个以上的可穿戴设备,例如除了佩戴于用户手腕的手表100和一副佩戴于用户耳朵的耳机200之外,还可以包括佩戴于用户脚腕等其他部位的脚环等。It should be noted that the application scenario shown in FIG. 1 is only to illustrate an exemplary application scenario of the technical solution of the present application, which only includes a watch 100 worn on the user's wrist and a pair of earphones worn on the user's ear 200. In some embodiments of the present application, the user can also wear more than two wearable devices. For example, in addition to the watch 100 worn on the user's wrist and a pair of earphones 200 worn on the user's ears, it can also include Wrist and other parts of the foot ring, etc.

为了便于理解本申请的技术方案,下面将结合图1所示的应用场景中用户佩戴有手表100和耳机200进行游泳为例,详细介绍本申请的技术方案。In order to facilitate the understanding of the technical solution of the present application, the technical solution of the present application will be described in detail below by taking the application scenario shown in FIG. 1 where the user wears the watch 100 and the earphone 200 for swimming as an example.

首先结合图2A和图2B分别介绍图1所示的手表100和耳机200的硬件结构。如图2A为本申请实施例示出的一种手表100的硬件结构图,手表100的硬件结构包括:加速度计101、陀螺仪102、磁力计103、气压计104、处理器105,存储器106,通信模块107,电源模块108。First, the hardware structures of the watch 100 and the earphone 200 shown in FIG. 1 are introduced respectively with reference to FIG. 2A and FIG. 2B . Figure 2A is a hardware structure diagram of a watch 100 shown in the embodiment of the present application. The hardware structure of the watch 100 includes: accelerometer 101, gyroscope 102, magnetometer 103, barometer 104, processor 105, memory 106, communication Module 107, power supply module 108.

尽管未示出,该手表100还可以包括显示屏、环境温传感器、天线、无线保真(wireless-fidelity,Wi-Fi)模块,近距离无线通信技术(near filed communication,NFC)模块,全球定位系统(global positioning system,GPS)模块、扬声器等。Although not shown, the watch 100 may also include a display screen, an ambient temperature sensor, an antenna, a wireless-fidelity (Wi-Fi) module, a near field communication technology (near filed communication, NFC) module, a global positioning System (global positioning system, GPS) module, speaker, etc.

加速度计101可检测手表100在各个方向上(一般为三轴)加速度的大小。用户在游泳过程中,在不同泳姿下,随着用户手臂的摆动,加速度计101的三个坐标轴的数据的信号表现不同,因此,对加速度计101三个坐标轴的信号进行分析,可以区分出用户的泳姿、不同泳姿对应的划水动作等。The accelerometer 101 can detect the acceleration of the watch 100 in various directions (generally three axes). During the user's swimming process, in different swimming styles, with the swing of the user's arm, the signals of the data of the three coordinate axes of the accelerometer 101 behave differently. Therefore, the signals of the three coordinate axes of the accelerometer 101 can be analyzed. Distinguish the user's swimming style, stroke actions corresponding to different swimming styles, etc.

陀螺仪102可以检测手表100在各个方向(例如,三轴方向)的角速度或角加速度。用户在游泳过程中,在不同泳姿下,随着用户手臂的摆动,陀螺仪102的三个坐标轴的数据的信号表现不同,因此,对陀螺仪102三个坐标轴的信号进行分析,也可以区分出用户的泳姿、不同泳姿对应的划水动作等。The gyroscope 102 can detect angular velocity or angular acceleration of the watch 100 in various directions (for example, three-axis directions). During the user's swimming process, in different swimming styles, with the swing of the user's arm, the signals of the data of the three coordinate axes of the gyroscope 102 behave differently. Therefore, it is also necessary to analyze the signals of the three coordinate axes of the gyroscope 102 It can distinguish the user's swimming style, stroke actions corresponding to different swimming styles, etc.

磁力计103可以检测地磁场的方向。基于地磁场方向可以确定手表100的运动方向。用户在游泳过程中,由于在用户完成每趟游泳,开始下一趟游泳时,用户会进行转身,从而使得佩戴于用户手腕处的手表100的运动方向发生较大改变,因此,采用磁力计103采集的手表100的运动方向数据,有利于识别用户的转身动作。The magnetometer 103 can detect the direction of the earth's magnetic field. The movement direction of the watch 100 can be determined based on the direction of the earth's magnetic field. During the swimming process of the user, since the user will turn around when the user completes each swimming and starts the next swimming, so that the movement direction of the watch 100 worn on the user's wrist will change greatly, therefore, the magnetometer 103 is used to The collected movement direction data of the watch 100 is beneficial to identify the user's turning action.

气压计104可以用于检测手表100所处环境中的压强。由于手表100在水中和空气中气压计104采集的压力数值不同,因此,对气压计104采集的数据进行分析,便于对用户进行入水、出水检测。The barometer 104 can be used to detect the pressure in the environment where the watch 100 is located. Since the pressure values collected by the barometer 104 are different when the watch 100 is in water and in air, analyzing the data collected by the barometer 104 is convenient for the user to detect water entry and exit.

处理器105用于进行系统调度,可用于控制前述加速度计101、陀螺仪102、磁力计103、气压计104等传感器,以及对这些传感器采集的数据进行运算。例如在本申请的一些实施例中,处理器105用于根据加速度计101、陀螺仪102采集的数据,以及从耳机200获取的传感器数据进行组帧、特征提取,然后基于提取的特征进行泳姿识别。又如,在本申请的一些实施例中,处理器105用于根据手表100的加速度计101和/或陀螺仪102采集的数据,以及耳机200采集的加速计数据进行划水动作的识别。又如,在本申请的一些实施例中,处理器105用于根据从耳机200获取的加速度计数据、陀螺仪数据以及磁力计数据进行转身识别。The processor 105 is used for system scheduling, and can be used to control the aforementioned sensors such as the accelerometer 101 , the gyroscope 102 , the magnetometer 103 , and the barometer 104 , and to perform operations on the data collected by these sensors. For example, in some embodiments of the present application, the processor 105 is used to perform framing and feature extraction based on the data collected by the accelerometer 101, the gyroscope 102, and the sensor data obtained from the earphone 200, and then perform swimming strokes based on the extracted features. identify. As another example, in some embodiments of the present application, the processor 105 is used to identify the stroke action according to the data collected by the accelerometer 101 and/or the gyroscope 102 of the watch 100 and the accelerometer data collected by the earphone 200 . As another example, in some embodiments of the present application, the processor 105 is configured to perform turn recognition according to accelerometer data, gyroscope data, and magnetometer data acquired from the earphone 200 .

存储器106用于存储软件程序以及数据,处理器105通过运行存储在存储器的软件程序以及数据,执行手表100的各种功能应用以及数据处理。在本申请的一些实施例中,存储器2可以存储上述加速度计101、陀螺仪102、磁力计103、气压计104等传感器采集到的数据,以及从耳机200获取的一些传感器数据。The memory 106 is used to store software programs and data, and the processor 105 executes various functional applications and data processing of the watch 100 by running the software programs and data stored in the memory. In some embodiments of the present application, the memory 2 may store data collected by the accelerometer 101 , gyroscope 102 , magnetometer 103 , barometer 104 and other sensors, as well as some sensor data obtained from the earphone 200 .

通信模块107,手表100可通过通信模块107与其他电子设备建立连接,例如在本申请实施例中,手表100可通过与用户的耳机200建立蓝牙连接,并且从耳机200接收耳机200采集到的一些传感器数据。The communication module 107, the watch 100 can establish a connection with other electronic devices through the communication module 107. For example, in the embodiment of the present application, the watch 100 can establish a Bluetooth connection with the user's earphone 200, and receive some data collected by the earphone 200 from the earphone 200. sensor data.

电源模块108 可以用于为上述手表100的各部件供电。The power supply module 108 can be used to supply power to various components of the watch 100 mentioned above.

可以理解的是,本发明实施例示意的结构并不构成对手表100的具体限定。在本申请另一些实施例中,手表100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure shown in the embodiment of the present invention does not constitute a specific limitation on the watch 100 . In other embodiments of the present application, the watch 100 may include more or fewer components than shown in the illustration, or combine some components, or separate some components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.

图2B所示为本申请实施例提供的一种耳机200的硬件结构图,耳机200的硬件结构包括:加速度计201、陀螺仪202、磁力计203、存储器204、处理器205、通信模块206、电源模块207、音频模块210。其中,音频模块210包括扬声器211、麦克风212。FIG. 2B is a hardware structure diagram of an earphone 200 provided by an embodiment of the present application. The hardware structure of the earphone 200 includes: an accelerometer 201, a gyroscope 202, a magnetometer 203, a memory 204, a processor 205, a communication module 206, Power module 207, audio module 210. Wherein, the audio module 210 includes a speaker 211 and a microphone 212 .

加速度计201可检测耳机200在各个方向上(一般为三轴)加速度的大小。The accelerometer 201 can detect the acceleration of the earphone 200 in various directions (generally three axes).

陀螺仪202可以用于确定耳机200的运动姿态。The gyroscope 202 can be used to determine the motion posture of the earphone 200 .

磁力计203可以用于检测手耳机200的运动方向。The magnetometer 203 can be used to detect the movement direction of the hand headset 200 .

存储器204用于存储软件程序以及数据,处理器205通过运行存储在存储器的软件程序以及数据,实现耳机200的各种功能应用以及数据处理。在本申请的一些实施例中,存储器204可以存储上述加速度计201、陀螺仪202、磁力计203、等传感器采集到的数据。The memory 204 is used to store software programs and data, and the processor 205 implements various functional applications and data processing of the earphone 200 by running the software programs and data stored in the memory. In some embodiments of the present application, the memory 204 may store data collected by the accelerometer 201 , the gyroscope 202 , the magnetometer 203 , and other sensors.

处理器205用于进行系统调度,可用于控制前述加速度计201、陀螺仪202、磁力计203等传感器进行数据采集。The processor 205 is used for system scheduling, and can be used to control the accelerometer 201, gyroscope 202, magnetometer 203 and other sensors to collect data.

通信模块206,耳机200可通过通信模块206与其他电子设备建立连接,例如在本申请实施例中,耳机200可通过与用户的手表100建立蓝牙连接,并且将耳机200采集到的一些传感器数据发送给手表100。Communication module 206, the headset 200 can establish a connection with other electronic devices through the communication module 206, for example, in the embodiment of the application, the headset 200 can establish a Bluetooth connection with the user's watch 100, and send some sensor data collected by the headset 200 Give the watch 100.

电源模块207可以用于为耳机200的各部件供电。The power module 207 can be used to supply power to various components of the earphone 200 .

扬声器211也称“喇叭”,用于将音频电信号转换为声音信号。耳机200可以通过扬声器211收听音乐,或收听免提通话。当通过耳机200接听电话或语音信息时,可以通过将扬声器211靠近人耳接听语音。The speaker 211 is also called a "horn", and is used to convert audio electrical signals into sound signals. The headset 200 can listen to music through the speaker 211, or listen to hands-free calls. When receiving a phone call or voice information through the earphone 200, the speaker 211 can be placed close to the human ear to receive the voice.

麦克风212也称“话筒”、“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近通话麦克风212发声,将声音信号输入到通话麦克风212。耳机200可以设置至少一个通话麦克风212。在另一些实施例中,耳机212可以设置两个通话麦克风,除了采集声音信号,还可以实现降噪功能。The microphone 212 is also called "microphone" or "microphone", and is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can put his mouth close to the call microphone 212 to make a sound, and input the sound signal to the call microphone 212 . The headset 200 can be provided with at least one call microphone 212 . In other embodiments, the earphone 212 may be provided with two call microphones, which may also implement a noise reduction function in addition to collecting sound signals.

可以理解的是,本发明实施例示意的结构并不构成对耳机200的具体限定。在本申请另一些实施例中,耳机200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the earphone 200 . In other embodiments of the present application, the earphone 200 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.

下面将结合上述手表100和耳机200的硬件结构框图,对本申请技术方案可以实现的泳姿识别、划水动作识别、转身识别等功能分别进行进一步的详细介绍。The functions such as swimming stroke recognition, stroke recognition, and turn recognition that can be realized by the technical solution of the present application will be further introduced in detail below in conjunction with the hardware structure block diagrams of the above-mentioned watch 100 and earphone 200 .

首先介绍泳姿识别的示例性实现方式。图3为本申请一些实施例提供的一种手表100进行泳姿识别的流程图,图3所示的流程图中各步骤的执行主体可以为手表100。参考图3,本申请提供的一种泳姿识别方法包括以下各步骤:First, an exemplary implementation of stroke recognition is introduced. FIG. 3 is a flowchart of swimming stroke recognition performed by a watch 100 provided by some embodiments of the present application. The execution subject of each step in the flowchart shown in FIG. 3 may be the watch 100 . With reference to Fig. 3, a kind of stroke recognition method provided by the present application includes the following steps:

S301:确定入水。S301: Determine to enter the water.

例如,根据从手表100的气压计104采集的气压数据确定用户是否入水,当用户入水,也即手表100进入水中时,手表100的气压计104采集的气压数值会突然增高。当气压值满足一定的阈值条件时可以确定用户入水。具体将在下文中展开描述。For example, according to the air pressure data collected from the barometer 104 of the watch 100, it is determined whether the user has entered the water. When the air pressure value satisfies a certain threshold condition, it can be determined that the user enters the water. The details will be described below.

S302:采集用户的运动数据。S302: Collect motion data of the user.

例如,手表100利用加速度计101采集手表100在各个方向上(一般为三轴)加速度数据。利用陀螺仪102采集手表100在各个方向(例如,三轴方向)的角速度或角加速度。利用磁力计103可以采集地磁场的方向。For example, the watch 100 uses the accelerometer 101 to collect acceleration data of the watch 100 in various directions (generally three axes). The gyroscope 102 is used to collect angular velocity or angular acceleration of the watch 100 in various directions (for example, three-axis directions). The direction of the earth's magnetic field can be collected by using the magnetometer 103 .

S303:获取耳机200采集的用户的运动数据。S303: Obtain the motion data of the user collected by the earphone 200 .

例如,手表100向耳机200发送数据获取请求,耳机200响应于该请求,将耳机200通过加速度计201、陀螺仪202、磁力计203采集的用户的运动数据发送至手表100。For example, watch 100 sends a data acquisition request to earphone 200 , and earphone 200 responds to the request by sending the user's motion data collected by earphone 200 through accelerometer 201 , gyroscope 202 , and magnetometer 203 to watch 100 .

S304:将手表100的传感器采集的运动数据和从耳机200获取的运动数据进行整合,得到整合后的运动数据。S304: Integrate the motion data collected by the sensor of the watch 100 and the motion data obtained from the earphone 200 to obtain integrated motion data.

例如,手表100获取到耳机100采集的加速计数据(以下简称ACC数据),陀螺仪数据(以下简称GYRO数据)和手表100采集到的ACC数据、GYRO数据进行数据组包,得到组合后的数据,具体如何组包将在下文进行详细介绍。For example, the watch 100 obtains accelerometer data (hereinafter referred to as ACC data) and gyroscope data (hereinafter referred to as GYRO data) collected by the earphone 100, and the ACC data and GYRO data collected by the watch 100 for data grouping to obtain the combined data , how to group packages will be described in detail below.

S305:基于整合后的运动数据确定出用户的泳姿。S305: Determine the user's swimming style based on the integrated exercise data.

例如,手表100对上述数据组合得到的数据进行时域特征提取,得到陀螺仪和加速度计数据的窗口均值、方差、平均绝对偏差、峰谷特征等时域特征。然后将提取出的这些时域特征输入预先训练好的泳姿识别模型,从而确定出用户的泳姿。具体实现细节将在下文中详细阐述。For example, the watch 100 performs time-domain feature extraction on the data obtained by combining the above data, and obtains time-domain features such as window mean value, variance, mean absolute deviation, and peak-to-valley features of the gyroscope and accelerometer data. Then these extracted time-domain features are input into the pre-trained stroke recognition model to determine the user's stroke. The specific implementation details will be described in detail below.

图3介绍了本申请实施例的一种泳姿识别的方法流程,下面将以图4A所示的具体示例,对手表100进行泳姿识别的详细流程进行示例性介绍。参考图4A所示的一种手表100泳姿识别的流程图,本申请的泳姿识别方法包括下述步骤:FIG. 3 introduces a method flow of a swimming stroke recognition method according to an embodiment of the present application. The following will use the specific example shown in FIG. 4A to exemplarily introduce the detailed flow of the wristwatch 100 performing stroke recognition. With reference to the flow chart of a wrist watch 100 swimming stroke recognition shown in FIG. 4A, the swimming stroke recognition method of the present application includes the following steps:

S401:出入水检测。S401: Water in and out detection.

例如,利用从手表100的气压计104采集的气压数据进行出入水检测。当手表100进入水中时,气压计104采集的气压数值会突然增高,当手表100出水时,气压计104采集的气压数值会突然降低。For example, water entry and exit detection is performed using air pressure data collected from the barometer 104 of the wristwatch 100 . When the watch 100 enters the water, the air pressure value collected by the barometer 104 will suddenly increase, and when the watch 100 comes out of the water, the air pressure value collected by the barometer 104 will suddenly decrease.

S402:判断是否入水,如果判断出手表100入水,则进入S406,对手表100采集的ACC数据、GYRO数据以及耳机200采集的ACC数据、GYRO数据进行时域特征提取。如果判断出手表100未入水,表明用户还没有开始游泳,则进入S403,等待入水。S402: Judging whether the watch 100 has entered the water, if it is judged that the watch 100 has entered the water, proceed to S406, and perform time-domain feature extraction on the ACC data and GYRO data collected by the watch 100 and the ACC data and GYRO data collected by the earphone 200 . If it is judged that the watch 100 has not entered the water, it means that the user has not started swimming yet, then enter S403 and wait for entering the water.

示例性地,如图4B所示,手表100的气压计104采集的气压计数值(也即气压数据)突然增高,并且大于阈值P1,初步判断手表100入水,也即初步判断用户开始游泳。然后可以通过对一段时间内采集的气压数据进行进一步处理,以再次验证手表100是否入水。例如,连续采集T1时长的气压数据,一秒钟共有50帧气压数据,以4秒钟作为一个窗口,一个窗口内共有200帧气压数据,然后分别对每个窗口内的200帧气压数据求平均值,得到各窗口内的平均气压值,再对相邻窗口内的平均气压值进行差分计算,如果各窗口内的平均气压值均大于阈值P1,并且相邻窗口的平均气压值的差值大于阈值P2时,判定手表100入水,也即再次确认用户开始游泳;如果未满足各窗口内的平均气压值均大于阈值Threshold1,并且相邻窗口的平均气压值的差值大于阈值Threshold2这两个条件,则判定为手表100未入水,也即最终判定用户未开始游泳。Exemplarily, as shown in FIG. 4B , the air pressure count value (that is, air pressure data) collected by the barometer 104 of the watch 100 suddenly increases and is greater than the threshold P1, and it is preliminarily judged that the watch 100 has entered the water, that is, it is preliminarily judged that the user has started swimming. The air pressure data collected over a period of time can then be further processed to verify whether the watch 100 is submerged in water again. For example, continuous collection of air pressure data of T1 duration, a total of 50 frames of air pressure data in one second, with 4 seconds as a window, a total of 200 frames of air pressure data in one window, and then averaging the 200 frames of air pressure data in each window value, get the average air pressure value in each window, and then calculate the difference between the average air pressure values in adjacent windows, if the average air pressure values in each window are greater than the threshold P1, and the difference between the average air pressure values in adjacent windows is greater than When the threshold is P2, it is determined that the watch 100 has entered the water, that is, the user is reconfirmed to start swimming; if the average air pressure values in each window are greater than the threshold value Threshold1, and the difference between the average air pressure values of adjacent windows is greater than the threshold value Threshold2. , it is determined that the watch 100 has not entered the water, that is, it is finally determined that the user has not started swimming.

在一些实施例中,气压计数据恢复至入水前气压的1.5倍持续30s,并且持续T2时长,例如持续30秒,则判定为手表100出水。In some embodiments, the barometer data returns to 1.5 times the air pressure before entering the water for 30 seconds, and lasts for T2, for example, 30 seconds, then it is determined that the watch 100 is out of the water.

S403:等待入水。S403: Wait for entering the water.

也就是说判断出手表100未入水,则等待入水,在此过程中可以一直继续通过手表100的气压计104采集气压数据。That is to say, if it is judged that the watch 100 has not entered the water, it waits for entering the water. During this process, the barometer 104 of the watch 100 can continue to collect air pressure data.

S404:数据组帧。S404: Data framing.

也即手表100的泳姿识别模块111通过气压计104采集的数据确定出手表100入水,也即表明用户开始游泳,则手表100中的泳姿识别模块111将通过加速度计101和陀螺仪102采集到的数据(分别记为ACC数据、GYRO数据),以及耳机200实时回传的通过耳机200的加速度计201、陀螺仪202采集的数据,进行组帧。That is to say, the swimming stroke recognition module 111 of the watch 100 determines that the watch 100 has entered the water through the data collected by the barometer 104, which means that the user starts swimming. The received data (respectively denoted as ACC data and GYRO data), and the data collected by the accelerometer 201 and the gyroscope 202 of the earphone 200 returned by the earphone 200 in real time, are framed.

例如,手表100在1秒钟采集了100帧的ACC数据、GYRO数据,耳机200在1秒钟采集了50帧的ACC数据、GYRO数据,泳姿识别模块111分别将手表100自身采集的100帧的ACC数据每两帧取个均值,得到新的50帧ACC数据,以及将自身采集的100帧的GYRO数据每两帧取个均值,得到新的50帧GYRO数据。然后将新的50帧ACC数据、新的50帧GYRO数据再和耳机200回传的50帧ACC数据、GYRO数据基于时间进行对齐,得到50帧组合数据。又如,由于手表100采集ACC数据、GYRO数据的数据采样率高于耳机100,则可以将手表100的ACC数据、GYRO数据进行降采样,例如原本1秒钟采集100帧数据,降采样后,手表100每1秒钟采集50帧数据;或者将耳机200的ACC数据、GYRO数据进行插值处理,使得手表100和耳机200这两个设备的ACC数据、GYRO数据能够按时间对齐并保持数据个数一致,以便于后续处理。For example, the watch 100 collects 100 frames of ACC data and GYRO data in 1 second, and the earphone 200 collects 50 frames of ACC data and GYRO data in 1 second. The ACC data is averaged every two frames to obtain a new 50-frame ACC data, and the 100-frame GYRO data collected by itself is averaged every two frames to obtain a new 50-frame GYRO data. Then align the new 50 frames of ACC data and the new 50 frames of GYRO data with the 50 frames of ACC data and GYRO data returned by the headset 200 based on time to obtain 50 frames of combined data. As another example, since the data sampling rate of ACC data and GYRO data collected by watch 100 is higher than that of earphone 100, the ACC data and GYRO data of watch 100 can be down-sampled. The watch 100 collects 50 frames of data every 1 second; or interpolates the ACC data and GYRO data of the earphone 200, so that the ACC data and GYRO data of the two devices, the watch 100 and the earphone 200, can be aligned in time and maintain the number of data consistent for subsequent processing.

S405:对组帧后的数进行滑窗处理。S405: Sliding window processing is performed on the numbers after framing.

示例性地,以设定时长(例如,4秒)为一个窗口,以设定步长(例如,0.5秒)对通过S404获得的数据进行滑窗处理。Exemplarily, a set time length (for example, 4 seconds) is used as a window, and a set step size (for example, 0.5 seconds) is used to perform sliding window processing on the data obtained through S404.

应理解,在具体应用中,上述窗口为根据需要自定义的具有固定时长的数据窗口,例如,对于前述得到的50帧的组合数据,还可以以5秒钟、6秒钟等时间跨度的数据作为一个窗口,步长也可以根据需要自定义,例如步长还可以为1秒。由于前述实施例中,组帧后得到的数据时长为1秒钟,共有50帧ACC数据、GYRO数据,则以4秒做一个窗口,则一个窗口有200帧ACC数据、GYRO数据,这样的话,在后续对一个窗口里的数据(也就是一段时间内的数据)进行一次特征提取,相对于一帧数据的准确率高。It should be understood that in a specific application, the above-mentioned window is a data window with a fixed duration customized according to needs. For example, for the combined data of 50 frames obtained above, data with a time span of 5 seconds, 6 seconds, etc. can also be used. As a window, the step size can also be customized according to needs, for example, the step size can also be 1 second. Because in the foregoing embodiment, the data duration obtained after framing is 1 second, and there are 50 frames of ACC data and GYRO data, a window is made in 4 seconds, and a window has 200 frames of ACC data and GYRO data. In this case, In the follow-up, a feature extraction is performed on the data in a window (that is, the data within a period of time), and the accuracy rate is higher than that of one frame of data.

S406:时域特征提取。S406: Time-domain feature extraction.

例如,从前述得到的组合数据中提取出陀螺仪和加速度计数据的窗口均值、方差、平均绝对偏差、峰谷特征等时域特征。For example, time-domain features such as window mean, variance, mean absolute deviation, and peak-to-valley features of the gyroscope and accelerometer data are extracted from the combined data obtained above.

S407:决策树打分。S407: Scoring the decision tree.

也就是说,通过S406提取出ACC数据、GYRO数据的一些时域特征后,泳姿识别模块111可以利用这些时域特征,采用多棵决策树(例如二分类模型)打分的策略,得到对用户的泳姿打分的结果。换言之,采用预设的泳姿识别模型对上述时域特征进行泳姿识别,该预设的泳姿识别模型可以是图4C所示的决策树模型,由于规范泳姿通常有图4D所示的蛙泳、仰泳、蝶泳、自由泳这四种,因此决策树模型需要至少包括“蛙泳模型”、“蝶泳模型”、“自由泳模型”、“仰泳模型”,对应于这四种规范泳姿之外的其他泳姿,可以采用“未知泳姿模型”进行打分。也就是说,由于总共待识别的结果为5种,所以共需训练5种泳姿识别模型。That is to say, after extracting some time-domain features of ACC data and GYRO data through S406, the swimming stroke recognition module 111 can use these time-domain features and adopt a scoring strategy of multiple decision trees (such as binary classification models) to obtain the user's The result of scoring strokes. In other words, a preset stroke recognition model is used to perform stroke recognition on the above-mentioned time-domain features. The preset stroke recognition model can be the decision tree model shown in FIG. 4C, because the standard stroke usually has the There are four types of breaststroke, backstroke, butterfly, and freestyle, so the decision tree model needs to include at least "breaststroke model", "butterfly model", "freestyle model", and "backstroke model", corresponding to other strokes other than these four standard strokes Swimming style can be scored using the "unknown swimming style model". That is to say, since there are 5 types of results to be recognized in total, 5 types of stroke recognition models need to be trained in total.

其中这5种模型中的每一个用于识别蛙泳、仰泳、蝶泳、自由泳、未知泳姿的其中一种泳姿,每种模型会有多棵树,每棵树会输出是某种结果的概率和非某个结果的概率(例如是蛙泳的概率为0.7,不是蛙泳的概率为0.3),把每棵树中识别到是某种泳姿的概率加起来就得到识别为这种泳姿的总概率。然后再选取5种模型中总概率最大的泳姿作为识别结果。Each of these five models is used to identify one of breaststroke, backstroke, butterfly, freestyle, and unknown strokes. Each model will have multiple trees, and each tree will output the probability of a certain result. And the probability of not a certain result (for example, the probability of breaststroke is 0.7, the probability of not breaststroke is 0.3), and the probability of recognizing a certain stroke in each tree is added to get the total number of strokes recognized as this stroke. probability. Then select the stroke with the highest total probability among the five models as the recognition result.

S408:得到识别结果。S408: Obtain a recognition result.

例如,在一些实施例中,可以将4s内的ACC数据、GYRO数据对应的一些时域特征输入上述决策树模型中,取总概率最大的泳姿作为识别结果。例如,上述各模型得到的是蛙泳、仰泳、蝶泳、自由泳、未知泳姿的总概率依次分别为50%、60%、65%、85%、20%,则可以确定出总概率最高的自由泳作为用户的泳姿。For example, in some embodiments, some time-domain features corresponding to the ACC data and GYRO data within 4s can be input into the above decision tree model, and the stroke with the highest total probability is taken as the recognition result. For example, the total probabilities of breaststroke, backstroke, butterfly, freestyle, and unknown strokes obtained by the above models are respectively 50%, 60%, 65%, 85%, and 20%, and then the freestyle with the highest total probability can be determined as The user's stroke.

可以理解,上述步骤S401至步骤S408的执行顺序只是一种示例,在另一些实施例中,也可以采用其他执行顺序,还可以拆分或合并部分步骤,在此不做限定。例如,S404和S405可以在S401之前执行,还可以和S401同时执行。S401和S402还可以合并成一个步骤。It can be understood that the above execution order of steps S401 to S408 is just an example, and in other embodiments, other execution orders may also be adopted, and some steps may also be split or combined, which is not limited here. For example, S404 and S405 can be executed before S401, and can also be executed simultaneously with S401. S401 and S402 can also be combined into one step.

下面将介绍划水动作识别的示例性实现方式。图5A为本申请一些实施例提供的一种划水动作识别的流程图,图5A所示的流程图中各步骤的执行主体可以为手表100。参考图5A,该流程包括以下内容:An exemplary implementation of water stroke recognition will be introduced below. FIG. 5A is a flow chart of water stroke recognition provided by some embodiments of the present application. The execution subject of each step in the flow chart shown in FIG. 5A may be the watch 100 . Referring to Figure 5A, the process includes the following:

S501:确定泳姿。S501: Determine the swimming style.

例如,在根据步骤S401-S408提供的方法确定出用户的泳姿,以准确确定用户泳姿。在其他实施例中,也可以通过其他方法(例如,基于手表100传感器数据确定泳姿的方法)确定泳姿。For example, the user's swimming style is determined according to the method provided in steps S401-S408, so as to accurately determine the user's swimming style. In other embodiments, the swimming style may also be determined by other methods (for example, a method of determining the swimming style based on the sensor data of the watch 100 ).

S502:根据泳姿进行轴选择。S502: Perform axis selection according to the stroke.

由于GYRO(陀螺仪)数据包括X、Y、Z三个坐标轴,不同泳姿所对应的GYRO数据不同坐标轴的信号表现不同,并且用户在使用不同泳姿游泳时,手部动作差别较大,而头部动作差别较小,从而为了提高识别准确度,划水动作识别模块112可以根据确定出的泳姿,选择对手表100采集的GYRO数据(包括X、Y、Z三个坐标轴)中某一个坐标轴的数据进行分析。Since the GYRO (gyroscope) data includes three coordinate axes of X, Y, and Z, the signals of different coordinate axes of the GYRO data corresponding to different swimming styles are different, and the user's hand movements are quite different when swimming with different swimming styles. , and the difference in head movements is small, so in order to improve the recognition accuracy, the stroke recognition module 112 can select the GYRO data collected by the watch 100 (including the three coordinate axes of X, Y and Z) according to the determined stroke The data of one of the coordinate axes is analyzed.

在一些实施例中,假设确定出用户的泳姿为蛙泳,则选择对手表100采集的GYRO数据的Y轴信号进行分析;假设确定出用户的泳姿为仰泳,则选择对手表100采集的GYRO数据的Z轴信号进行分析;假设确定出用户的泳姿为蝶泳,则选择对手表100采集的GYRO数据的Z轴信号进行分析;假设确定出用户的泳姿为仰泳或者未知泳姿,则选择对手表100采集的ACC数据(加速度采集的数据)的三个坐标轴的信号的模值进行分析,例如对该ACC数据的三个坐标轴的数据分别进行平方运算后,再将三个坐标轴平方运算的结果进行求和,然后对求和结果进行开方运算,将开方运算得到的模值作为后续对手表100数据分析波形分析的数据源。In some embodiments, if it is determined that the user's swimming style is breaststroke, the Y-axis signal of the GYRO data collected by the watch 100 is selected for analysis; Analyze the Z-axis signal of the data; if it is determined that the user's swimming style is butterfly, then choose to analyze the Z-axis signal of the GYRO data collected by the watch 100; if it is determined that the user's swimming style is backstroke or an unknown swimming style, then select Analyze the modulus values of the signals of the three coordinate axes of the ACC data (data collected by acceleration) collected by the watch 100, for example, after performing square operations on the data of the three coordinate axes of the ACC data, and then the three coordinate axes The results of the square operation are summed, and then the square root operation is performed on the summation result, and the modulus value obtained by the square root operation is used as a data source for subsequent waveform analysis of the watch 100 data analysis.

S503:手表数据波峰分析。S503: Analyze the peak of watch data.

也即是对S502中根据确定出的泳姿选择的GYRO(陀螺仪)数据或者ACC数据的坐标轴的数据进行分析,例如,首先可以对选定的待分析的数据进行高斯滤波处理,然后确定出滤波后的信号的波峰波谷。That is to analyze the GYRO (gyroscope) data or the coordinate axis data of the ACC data selected in S502 according to the determined stroke. The peaks and valleys of the filtered signal.

S504:粗筛动作。S504: Coarse screening action.

也就是说,针对上述滤波处理后的信号确定出波峰波谷之后,即可根据确定出的波峰波谷初步进行划水动作的筛选。例如,在图6B示意出的一种粗筛动作的流程图中包括以下内容:That is to say, after the peaks and valleys are determined for the above-mentioned filtered signal, the stroke action can be preliminarily screened according to the determined peaks and valleys. For example, the flow chart of a rough screening action shown in Figure 6B includes the following:

S5041:确定极值点。S5041: Determine the extreme point.

例如确定出图5C所示的手表100端信号的极值点A1、A2。For example, the extreme points A1 and A2 of the signal at the watch 100 terminal shown in FIG. 5C are determined.

S5042:判断极值点是否大于阈值。如果判断出极值点大于阈值,则进入S5043,将大于阈值的极值点确定为初筛波峰点;如果判断出极值点小于或等于阈值,则进入S4044,丢弃相应的极值点。S5042: Determine whether the extreme point is greater than a threshold. If it is judged that the extreme point is greater than the threshold, then enter S5043, and determine the extreme point greater than the threshold as the peak point of the preliminary screening; if it is judged that the extreme point is less than or equal to the threshold, then enter S4044, and discard the corresponding extreme point.

S5043:确定出初筛波峰点。S5043: Determine the peak point of the preliminary screening.

在一些实施例中,可以预先设置一个峰值阈值,当搜索到的极值点大于此阈值时,将对应的极值点作为待选择动作点,也即确定为初筛波峰点。例如,在图5C所示的实施例中,搜索到极值点A1、A2,极值点A1、A2大于峰值阈值Threshold3,则可以将极值点A1、A2作为初筛波峰点。In some embodiments, a peak threshold may be preset, and when the searched extreme point is greater than the threshold, the corresponding extreme point is used as an action point to be selected, that is, determined as a peak point for preliminary screening. For example, in the embodiment shown in FIG. 5C , if the extreme points A1 and A2 are found, and the extreme points A1 and A2 are greater than the peak threshold Threshold3, then the extreme points A1 and A2 can be used as the peak points for preliminary screening.

S5044:丢弃相应极值点。S5044: Discard corresponding extreme points.

也即,如果搜索到的极值点小于前述峰值阈值,则丢弃该极值点,也就是说在后续的划水动作识别中不使用该极值点。That is, if the searched extreme point is smaller than the aforementioned peak value threshold, the extreme point is discarded, that is to say, the extreme point is not used in the subsequent stroke recognition.

S5045:判断波峰间距是否大于时间阈值。如果判断出波峰间距大于时间阈值,则进入S5046,确定出初筛动作点;如果判断出波峰间距小于或等于时间阈值,则进入S4067,丢弃相应波峰点。S5045: Determine whether the peak distance is greater than the time threshold. If it is judged that the peak distance is greater than the time threshold, go to S5046 to determine the primary screening action point; if it is judged that the peak distance is less than or equal to the time threshold, go to S4067 and discard the corresponding peak point.

S5046:确定出初筛动作点。S5046: Determine the primary screening action point.

也就是根据波峰之间的时间间隔,进一步筛查出初步确定的划水动作点。示例性地,判断相邻两个波峰之间的时间间隔t,当t大于时间阈值T0时,此波峰作为有效波峰,当两个相邻波峰时间间隔t小于T0时,则选择相邻波峰中较大值作为有效波峰。例如,如图5C所示的相邻两个极值点(也即相邻两个波峰)A1、A2之间的时间间隔t1大于时间阈值T0,则可以将极值点A1、A2作为初筛动作点。That is, according to the time interval between wave peaks, the initially determined stroke action points are further screened out. Exemplarily, the time interval t between two adjacent peaks is judged. When t is greater than the time threshold T0, this peak is regarded as an effective peak. When the time interval t between two adjacent peaks is less than T0, the adjacent peak is selected The larger value is taken as the effective peak. For example, as shown in Figure 5C, the time interval t1 between two adjacent extreme points (that is, two adjacent peaks) A1 and A2 is greater than the time threshold T0, then the extreme points A1 and A2 can be used as the primary screening action point.

S5047:丢弃相应波峰点。S5047: Discard the corresponding peak points.

也就是说,在前述确定出的初筛波峰点中选择波峰间距不满足时间阈值的初筛波峰点作为无效波峰点。That is to say, among the previously determined preliminary screening peak points, the primary screening peak points whose distance between peaks does not meet the time threshold are selected as invalid peak points.

根据本实施例的方案,可以避免无效划水动作对统计数据的干扰,有利于准确统计划水次数。According to the solution of this embodiment, it is possible to avoid the interference of invalid strokes on statistical data, which is beneficial to accurately count the number of strokes.

S505:耳机200数据波峰分析。S505: Analyze the peak of the earphone 200 data.

耳机200数据波峰分析的数据源为耳机200采集的ACC数据的模值,寻找波峰的方法和S504中类似,只是涉及的波峰阈值、时间阈值不同,这里不再展开描述。The data source of the headphone 200 data peak analysis is the modulus value of the ACC data collected by the headphone 200. The method of finding the peak is similar to that in S504, except that the peak threshold and time threshold involved are different, and will not be described here.

S506:动作确认。S506: Action confirmation.

虽然对手表100数据的波峰分析可以得到初步筛选的划水动作点,但是由于在泳池中用户手部晃动而未游泳时,手表100有可能误将用户手部晃动判断为用户在游泳,从而错误地将用户手部晃动判断为用户的划水动作,因此需要再次结合手表100的ACC数据或者GYRO数据,以及耳机200的ACC数据,对S504确定出来的粗筛动作进行进一步确认。Although the wave peak analysis of the watch 100 data can obtain the initially screened stroke action point, but when the user's hand shakes in the swimming pool and the user is not swimming, the watch 100 may mistakenly judge that the user's hand shake is the user's swimming, thereby erroneously Therefore, it is necessary to combine the ACC data or GYRO data of the watch 100 and the ACC data of the earphone 200 again to further confirm the rough screening action determined in S504.

示例性地,可以判断由手表100的ACC数据或者GYRO数据得到的两个粗筛动作点之间,是否存在耳机200的ACC数据的一个波峰点,如果存在,则将这两个粗筛动作点确认为一个完整的划水动作。例如,在图5C所示的实施例中,手表100端数据的波峰点A1、A2之间,对应耳机200端信号有一个波峰点B1,则可以确认波峰点A1、A2之间存在一个完整的划水动作。Exemplarily, it can be judged whether there is a peak point of the ACC data of the earphone 200 between the two rough screening action points obtained from the ACC data or GYRO data of the watch 100, and if so, the two rough screening action points Confirmed as a complete stroke. For example, in the embodiment shown in FIG. 5C, between the peak points A1 and A2 of the data at the watch 100 terminal, there is a peak point B1 corresponding to the signal at the earphone 200 terminal, and it can be confirmed that there is a complete peak point B1 between the peak points A1 and A2. paddling action.

通过以上关于划水动作识别的介绍可知,通过对手表100的ACC数据或者GYRO数据进行分析得到初筛波峰点之后,再结合耳机200的ACC数据,进一步进行划水动作的确认,筛选出的划水动作更加准确。From the above introduction about water stroke recognition, we can know that after analyzing the ACC data or GYRO data of the watch 100 to obtain the initial screening peak point, combined with the ACC data of the earphone 200, further confirm the stroke motion, and the screened stroke Water movements are more accurate.

可以理解,上述步骤S501至步骤S506的执行顺序只是一种示例,在另一些实施例中,也可以采用其他执行顺序,还可以拆分或合并部分步骤,在此不做限定。It can be understood that the above execution order of steps S501 to S506 is just an example, and in other embodiments, other execution orders may also be adopted, and some steps may also be split or combined, which is not limited here.

下面将介绍转身识别的示例性实现方式。图6A为本申请一些实施例提供的一种转身识别的流程图,图6A各步骤的执行主体可以为手表100。参考图6A,该转身识别流程包括以下内容:An exemplary implementation of turn recognition will be introduced below. FIG. 6A is a flow chart of turning around recognition provided by some embodiments of the present application. The execution subject of each step in FIG. 6A may be the watch 100 . With reference to Figure 6A, the turn-around recognition process includes the following:

S601:识别划水动作。S601: Identify a stroke action.

例如,手表100的划水动作识别模块112识别出用户的划水动作之后,将识别的结果数据发送给手表100的转身识别模块113,转身识别模块113根据接收到的该结果数据,识别出用户的划水动作。在其他实施例中,也可以通过其他方法识别划水动作。For example, after the water stroke recognition module 112 of the watch 100 recognizes the user's water stroke, it sends the recognition result data to the turn recognition module 113 of the watch 100, and the turn recognition module 113 recognizes the user's stroke according to the received result data. stroke action. In other embodiments, other methods may also be used to identify stroke actions.

S602:判断动作个数是否大于设定数量N1。下文中,以N1=3为例进行介绍。但本申请不限于此。在其他实施例中,N可以为2,5等其他数量。S602: Determine whether the number of actions is greater than the set number N1. In the following, N1=3 is taken as an example for introduction. But the present application is not limited thereto. In other embodiments, N can be 2, 5 and other numbers.

如果判断出有大于3个划水动作,则进入S603,进行前3个划水动作所对应的耳机200偏航角均值的计算。如果判断出划水动作的个数小于或者等于3,则返回S601。If it is judged that there are more than 3 strokes, go to S603 and calculate the mean value of the yaw angle of the earphone 200 corresponding to the first 3 strokes. If it is determined that the number of strokes is less than or equal to 3, return to S601.

S603:记录前3个动作耳机200的偏航角平均值Angle0。从而可以根据前3个划水动作所对应的耳机200的偏航角平均值Angle0(具体可参考图6B),确定用户游泳的起始朝向。S603: Record the average yaw angle Angle0 of the earphone 200 in the first three actions. Therefore, the starting orientation of the user's swimming can be determined according to the average yaw angle Angle0 of the earphone 200 corresponding to the first three strokes (for details, refer to FIG. 6B ).

例如,划水动作识别模块112在识别出划水动作时,还可以计算出用户游泳过程中的每个划水动作的起始时间,从而来识别到3次划水动作时,取此3次连续划水动作时间段内的由耳机100的偏航角均值Angle0作为游泳起始的朝向。For example, when the stroke movement recognition module 112 recognizes the stroke movement, it can also calculate the start time of each stroke movement during the swimming process of the user, so that when 3 stroke movements are recognized, take the 3 times The average value of the yaw angle Angle0 of the earphone 100 within the continuous stroke time period is used as the starting orientation of swimming.

其中,耳机100的偏航角均值的计算方法可以为:通过对耳机200采集的ACC数据(包括三个轴)、GYRO数据(包括三个轴)、MAG数据(包括三个轴)进行九轴融合计算得到游泳时耳机200的姿态角,将该姿态角作为耳机200的偏航角。还可以根据该姿态角推算出用户头部的偏航角。Among them, the calculation method of the mean value of the yaw angle of the earphone 100 can be as follows: ACC data (including three axes), GYRO data (including three axes), and MAG data (including three axes) collected by the earphone 200 are calculated in nine axes. The attitude angle of the earphone 200 during swimming is obtained through fusion calculation, and the attitude angle is used as the yaw angle of the earphone 200 . The yaw angle of the user's head can also be calculated according to the attitude angle.

S604:获取后续每个划水动作期间内耳机200的偏航角均值Angle1。S604: Obtain the mean value Angle1 of the yaw angle of the earphone 200 during each subsequent stroke.

例如对用户开始游泳的前3个划水动作之后的每个划水动作对应的ACC数据、GYRO数据、MAG数据进行九轴融合计算,得到前3个划水动作之后的每个划水动作所对应的耳机200的偏航角均值Angle1。For example, the nine-axis fusion calculation is performed on the ACC data, GYRO data, and MAG data corresponding to each stroke after the first three strokes of the user's swimming, and the results of each stroke after the first three strokes are obtained. Corresponding to the average value of the yaw angle Angle1 of the earphone 200 .

S605:判断两个相邻动作的偏航角平均值之差是否大于阈值delta0。如果判断出前后两个相邻动作的偏航角平均值之差大于阈值delta0,则进入S606,初步判断用户在这两个相邻动作之间有转身动作。否则返回S604。S605: Determine whether the difference between the mean values of yaw angles of two adjacent actions is greater than a threshold value delta0. If it is determined that the difference between the average yaw angles of the two adjacent actions is greater than the threshold value delta0, then go to S606 and preliminarily determine that the user has turned around between the two adjacent actions. Otherwise, return to S604.

S606:预判断为转身。也就是在判断出有大于3个划水动作后,可以对这3个划水动作之后每相邻的两个划水动作的偏航角均值做对比,如果相邻两个划水动作的偏航角均值的差值大于差值阈值delta0,可以初步推断游泳者发生了转身动作。S606: It is pre-determined to turn around. That is to say, after judging that there are more than 3 strokes, you can compare the mean value of the yaw angle of each adjacent two strokes after the 3 strokes. If the difference of the mean value of the flight angle is greater than the difference threshold delta0, it can be preliminarily inferred that the swimmer has turned around.

S607:判断预判转身后动作个数是否大于设定数量N2。下文中,以N2=3为例进行介绍。但本申请不限于此。在其他实施例中,N可以为2,4等其他数量。S607: Judging whether the number of actions after the predicted turn is greater than the set number N2. In the following, N2=3 is taken as an example for introduction. But the present application is not limited thereto. In other embodiments, N can be 2, 4 and other numbers.

也就是判断前述初步判断的转身动作之后是否有3个以上的划水动作。如果判断出预判转身后划水动作的个数大于3,则进入S608,获取预判转身后的这3个划水动作的偏航角均值。否则进入S609,等待预判转身后达到3个动作个数。That is, it is judged whether there are more than 3 strokes after the turning motion of the aforementioned preliminary judgment. If it is determined that the number of strokes after the predicted turn is greater than 3, go to S608 to obtain the average value of the yaw angles of the three strokes after the predicted turn. Otherwise, enter S609 and wait for the number of actions to reach 3 after the predicted turn.

S608:获取转身后3个连续划水动作期间内偏航角均值Angle2。S608: Obtain the mean value of the yaw angle Angle2 within 3 consecutive strokes after the turn.

例如对前述预判转身之后的3个连续划水动作对应的ACC数据、GYRO数据、MAG数据进行九轴融合计算,得到这3个划水动作所对应的耳机200的偏航角,然后再对这3个划水动作对应的偏航角求均值,得到偏航角均值Angle2(具体可参考图6B)。For example, the nine-axis fusion calculation is performed on the ACC data, GYRO data, and MAG data corresponding to the three consecutive strokes after the aforementioned predicted turn to obtain the yaw angle of the earphone 200 corresponding to the three strokes, and then calculate the The average value of the yaw angles corresponding to these three strokes is calculated to obtain the average value of the yaw angle Angle2 (for details, refer to FIG. 6B ).

S609:等待预判转身后达到3个动作个数。S609: Wait for the number of actions to reach 3 after the predicted turn.

S610:判断|Angle2-Angle0|>delta1。也即是判断上述转身后3个连续划水动作期间内偏航角均值Angle2,与用户初始3个连续的划水动作的偏航角均值Angle0的差值的绝对值是否大于差值阈值delta1。如果该差值大于差值阈值delta1,则进入S611,确定发生了转身动作,否则进入S612,确定用户伪转身,也即未发生转身。S610: Determine |Angle2-Angle0|>delta1. That is to determine whether the absolute value of the difference between the mean value of yaw angle Angle2 during the 3 consecutive strokes after turning around and the mean value of yaw angle Angle0 of the user's initial 3 consecutive strokes is greater than the difference threshold delta1. If the difference is greater than the difference threshold delta1, go to S611 to determine that a turning action has occurred, otherwise go to S612 to determine that the user has turned around falsely, that is, no turning has occurred.

S611:确定转身。S611: Make sure to turn around.

在一些实施例中,当确定游泳者转身,则可以将转身后的连续三个划水动作偏航角均值Angle2作为新的游泳朝向,也即将原先代表耳机100的初始朝向的偏航角Angle0的数值更新为Angle2的数值,从而将更新后的Angle0所表征的方向作为后续判断转身的参考方向。In some embodiments, when it is determined that the swimmer turns around, the average yaw angle Angle2 of three consecutive strokes after the turn can be used as the new swimming orientation, that is, the yaw angle Angle0 that originally represented the initial orientation of the earphone 100 The value is updated to the value of Angle2, so that the direction represented by the updated Angle0 is used as the reference direction for subsequent judgment of turning.

S612:确定伪转身。S612: Determine a false turn.

通过以上关于转身动作识别的介绍可知,由于用户在游泳过程中,用户发生转身时,耳机200采集的ACC数据、GYRO数据、MAG数据的信号有较大的差异体现,手表100通过从耳机200接收到的ACC数据、GYRO数据、MAG数据进行偏航角的计算,可以获得更加准确的偏航角度,从而可以使得转身识别的结果更加准确。在一些实施例中,在识别出用户的转身动作之后,还可以计算出转身的总次数,然后根据转身的总次数计算出用户的游泳趟数。例如,如果转身识别到n次,则游泳总趟数计为n+1趟。From the above introduction about the recognition of turning movements, it can be seen that when the user turns around during swimming, the signals of ACC data, GYRO data, and MAG data collected by the earphone 200 have a large difference. The ACC data, GYRO data, and MAG data are used to calculate the yaw angle, and a more accurate yaw angle can be obtained, so that the turn recognition result can be more accurate. In some embodiments, after the user's turning action is recognized, the total number of turning times can also be calculated, and then the user's swimming times can be calculated according to the total number of turning times. For example, if turning around is recognized n times, the total number of swimming times is counted as n+1 times.

在一些实施例中,还可以计算出每趟划水次数,例如第N(假设N>1)趟的划水次数可以由第N-1次转身结束到第N次转身开始时间点之间的划水动作次数之和得到。In some embodiments, the number of strokes per stroke can also be calculated. For example, the number of strokes for the Nth (assuming N>1) stroke can be calculated from the time between the end of the N-1th turn and the start of the Nth turn. The sum of stroke times is obtained.

在一些实施例中,还可以对每趟游泳中采用的泳姿进行统计,例如,确定出一趟游泳中包括多少种泳姿,以及各泳姿的时长占比,将时长占比最大的泳姿作为该趟的主泳姿。In some embodiments, it is also possible to make statistics on the strokes used in each swim, for example, to determine how many strokes are included in a swim, and the duration ratio of each stroke, and the stroke with the largest duration as the main stroke for the trip.

在一些实施例中,还可以对用户的划水频率进行计算,例如对每次划水动作的时长求和得到划水总时长为totalTime,确定出总划水次数为strokeCnt,则平均单次划水时长meanStrokeTime = totalTime/strokeCnt 。然后再将平均单次划水时长转换为每分钟划水次数即为划水频率:strokeFreq =( 60 * 1000) / meanStrokeTime。In some embodiments, the user's stroke frequency can also be calculated, for example, the sum of the duration of each stroke action is obtained as totalTime, and the total stroke times are determined as strokeCnt, then the average single stroke Water duration meanStrokeTime = totalTime/strokeCnt. Then convert the average single stroke duration into stroke frequency per minute: strokeFreq = (60 * 1000) / meanStrokeTime.

在一些实施例中,手表100在统计出用户的划水趟数、每趟划水次数、泳姿、划水频率之后,还可以通过显示屏程序给用户,具体可参考图7所示的界面示意图。In some embodiments, after the watch 100 counts the number of strokes of the user, the number of strokes per stroke, the stroke, and the frequency of strokes, it can also be shown to the user through a display program. For details, refer to the interface shown in FIG. 7 schematic diagram.

可以理解,上述步骤S601至步骤S612的执行顺序只是一种示例,在另一些实施例中,也可以采用其他执行顺序,还可以拆分或合并部分步骤,在此不做限定。It can be understood that the above execution order of steps S601 to S612 is just an example, and in other embodiments, other execution orders may also be adopted, and some steps may also be split or combined, which is not limited here.

下面将结合图8介绍上述手表100的软件逻辑框图。如图8所示,手表100包括泳姿识别模块111、划水动作识别模块112、转身识别模块113、结果统计模块114。The software logic block diagram of the watch 100 described above will be introduced below with reference to FIG. 8 . As shown in FIG. 8 , the watch 100 includes a swimming stroke recognition module 111 , a stroke motion recognition module 112 , a turn recognition module 113 , and a result statistics module 114 .

其中,泳姿识别模块111可以用于识别用户的游泳姿势,例如识别出用户某一趟的游泳姿势为图4D所示的蛙泳、蝶泳、仰泳、自由泳中的其中一种。当用户使用这几种规范泳姿游泳时,耳机200及手表100采集的加速度计信号和陀螺仪信号将会有明显的特征表现,可以基于这些特征进行泳姿识别模型的训练,从而利用训练好的模型进行泳姿的识别。在一些实施例中,泳姿识别模型可以为一种决策树模型。Among them, the swimming style recognition module 111 may be used to identify the user's swimming style, for example, to recognize that the user's certain swimming style is one of breaststroke, butterfly, backstroke, and freestyle as shown in FIG. 4D . When the user swims with these standard strokes, the accelerometer signal and gyroscope signal collected by the earphone 200 and the watch 100 will have obvious characteristics, and the stroke recognition model can be trained based on these characteristics, so as to use the trained model for stroke recognition. In some embodiments, the stroke recognition model may be a decision tree model.

泳姿识别模块111可以包括数据组包子模块M101、特征提取子模块M102、决策树泳姿识别子模块M103。The swimming stroke recognition module 111 may include a data group packet submodule M101, a feature extraction submodule M102, and a decision tree swimming stroke recognition submodule M103.

示例性地,数据组包子模块M101可以用于进行数据组包(或者成为数据组帧),也即手表100通过气压计104采集的数据确定出用户开始游泳,手表100中的泳姿识别模块111将通过加速度计101和陀螺仪102采集到的数据(分别记为ACC数据、GYRO数据),以及耳机200实时回传的通过耳机200的加速度计201、陀螺仪202采集的数据,进行组包(也可以称之为组帧)。例如,手表100在1秒钟采集了100帧的ACC数据、GYRO数据,耳机200在1秒钟采集了50帧的ACC数据、GYRO数据,泳姿识别模块111分别将手表100自身采集的100帧的ACC数据每两帧取个均值,得到新的50帧ACC数据,以及将自身采集的100帧的GYRO数据每两帧取个均值,得到新的50帧GYRO数据。然后将新的50帧ACC数据、新的50帧GYRO数据再和耳机200回传的50帧ACC数据、GYRO数据基于时间进行对齐,得到50帧组合数据。Exemplarily, the data packet sub-module M101 can be used for data packet (or data frame), that is, the wristwatch 100 determines that the user starts swimming through the data collected by the barometer 104, and the swimming stroke recognition module 111 in the wristwatch 100 The data collected by the accelerometer 101 and the gyroscope 102 (respectively denoted as ACC data and GYRO data), and the data collected by the accelerometer 201 and the gyroscope 202 of the earphone 200 returned in real time by the earphone 200 are packaged ( Also called framing). For example, the watch 100 collects 100 frames of ACC data and GYRO data in 1 second, and the earphone 200 collects 50 frames of ACC data and GYRO data in 1 second. The ACC data is averaged every two frames to obtain a new 50-frame ACC data, and the 100-frame GYRO data collected by itself is averaged every two frames to obtain a new 50-frame GYRO data. Then align the new 50 frames of ACC data and the new 50 frames of GYRO data with the 50 frames of ACC data and GYRO data returned by the headset 200 based on time to obtain 50 frames of combined data.

特征提取子模块M102可以对前述得到的组合数据进行特征提取。例如,从前述得到的组合数据中提取出陀螺仪和加速度计数据的窗口均值(也即一个窗口内的ACC数据的均值、GYRO数据的均值)、方差、平均绝对偏差、峰谷特征等时域特征。其中,窗口为根据需要自定义的具有固定时长的数据窗口,例如,对于前述得到的50帧的组合数据,以4秒钟时间跨度的数据作为一个窗口,步长也可以根据需要自定义,例如步长可以为0.5秒。由于前述实施例中,组帧后得到的数据时长为1秒钟,共有50帧ACC数据、GYRO数据,则以4秒做一个窗口,则一个窗口有200帧ACC数据、GYRO数据,这样的话,对一个窗口里的数据(也就是一段时间内的数据)进行一次特征提取,相对于一帧数据的准确率高。在一些实施例中,上述提取的涉及陀螺仪和加速度计的特征数据是分别提取的,例如分别对各个窗口内的ACC数据、GYRO数据分别进行特征提取,得到各窗口内的陀螺仪和加速度计的特征数据。The feature extraction sub-module M102 can perform feature extraction on the combined data obtained above. For example, the window mean value of gyroscope and accelerometer data (that is, the mean value of ACC data and the mean value of GYRO data in a window), variance, mean absolute deviation, peak-to-valley characteristics, etc. are extracted from the combined data obtained above. feature. Among them, the window is a data window with a fixed duration that can be customized according to needs. For example, for the combined data of 50 frames obtained above, the data with a time span of 4 seconds is used as a window, and the step size can also be customized according to needs, for example The step size can be 0.5 seconds. Because in the foregoing embodiment, the data duration obtained after framing is 1 second, and there are 50 frames of ACC data and GYRO data, a window is made in 4 seconds, and a window has 200 frames of ACC data and GYRO data. In this case, Performing a feature extraction on the data in a window (that is, the data within a period of time) has a higher accuracy than one frame of data. In some embodiments, the feature data related to the gyroscope and accelerometer extracted above are extracted separately, for example, the ACC data and GYRO data in each window are respectively subjected to feature extraction to obtain the gyroscope and accelerometer in each window. feature data.

决策树泳姿识别子模块M103可以基于前述提取的特征进行决策树泳姿识别。也即,决策树泳姿识别子模块M103基于前述提取的特征进行泳姿识别,例如将前述提取到的特征数据作为输入,采用预先训练好的决策树模型对这些提取出的特征数据进行推理,推理得到的结果即为泳姿识别结果。The decision tree stroke recognition sub-module M103 can perform decision tree stroke recognition based on the features extracted above. That is to say, the decision tree stroke recognition sub-module M103 performs stroke recognition based on the aforementioned extracted features, for example, using the aforementioned extracted feature data as input, using a pre-trained decision tree model to perform inference on these extracted feature data, The result of inference is the result of stroke recognition.

划水动作识别模块112可以包括波峰分析子模块M104、划水动作确认子模块M105。示例性地,波峰分析子模块M104可以用于识别用户的划水动作。例如,在泳姿识别模块111识别出用户的泳姿之后,将识别结果发送给波峰分析子模块M104。由于GYRO(陀螺仪)数据包括X、Y、Z三个坐标轴,不同泳姿所对应的GYRO数据不同坐标轴的信号表现不同,并且用户在使用不同泳姿游泳时,手部动作差别较大,而头部动作差别较小,从而为了提高识别准确度,波峰分析子模块M104可以根据不同的泳姿,对手表100采集的GYRO数据(包括X、Y、Z三个坐标轴)不同轴的数据进行波峰分析初步进行划水动作识别,然后划水动作确认子模块M105再对耳机200采集的ACC数据的波峰分析进行划水动作确认。应理解,由于用户每划一次水,会有一次划水动作,因此识别出划水动作,便于统计出用户游一趟划了多少次水。The stroke recognition module 112 may include a peak analysis submodule M104 and a stroke confirmation submodule M105. Exemplarily, the peak analysis sub-module M104 can be used to identify the user's water stroke. For example, after the swimming stroke recognition module 111 recognizes the swimming stroke of the user, the recognition result is sent to the peak analysis sub-module M104. Since the GYRO (gyroscope) data includes three coordinate axes of X, Y, and Z, the signals of different coordinate axes of the GYRO data corresponding to different swimming styles are different, and the user's hand movements are quite different when swimming with different swimming styles. , and the difference in head movements is small, so in order to improve the recognition accuracy, the peak analysis sub-module M104 can compare the GYRO data (including the three coordinate axes of X, Y, and Z) collected by the watch 100 according to different swimming strokes. The peak analysis of the data is carried out to initially identify the stroke action, and then the stroke action confirmation sub-module M105 performs the stroke action confirmation on the peak analysis of the ACC data collected by the earphone 200 . It should be understood that each time the user strokes the water, there will be a stroke action, so the recognition of the stroke action makes it easy to count how many times the user strokes the water in one swim.

转身识别模块113可以包括九轴融合姿态计算子模块M106、转身识别子模块M107。转身识别模块113可以用于识别用户的转身行为。应理解,通常用户在完成一趟游泳实施下一趟游泳行为时会有一次转身行为,因此,识别出用户的转身行为可以便于统计用户游了多少趟。由于用户在游泳时,手表100随着用户的划水的手臂不停的在空间中移动,而由于耳机200佩戴于用户的耳朵,且用户在游泳过程中头部相对于手臂的移动幅度较小,并且用户在转身时,耳机200的姿态发生较大的变化。因此转身识别模块113可以利用前述组合数据中耳机200的ACC数据、GYRO数据以及MAG数据(耳机200的磁力计203采集的数据)进行分析,例如九轴融合姿态计算子模块M106对耳机200的ACC数据、GYRO数据以及MAG数据通过九轴融合算法进行九轴融合姿态计算,也就是对耳机200的ACC数据(三个坐标轴)、GYRO数据(三个坐标轴)以及MAG数据(三个坐标轴)进行融合,计算出每个划水动作所对应的耳机200的姿态角,然后转身识别子模块M107根据计算得到的各划水动作的姿态角进行转身识别。应理解,若相邻两个划水动作对应的耳机200的姿态角发生较大变化,则表明用户发生了转身行为。The turn recognition module 113 may include a nine-axis fusion pose calculation submodule M106 and a turn recognition submodule M107. The turn-turn recognition module 113 can be used to recognize the user's turn-turn behavior. It should be understood that, usually, the user will turn around once after completing one swim and performing the next swim. Therefore, recognizing the user's turning behavior can facilitate counting how many times the user swam. When the user is swimming, the watch 100 keeps moving in space along with the user's arm, and since the earphone 200 is worn on the user's ear, and the movement of the user's head relative to the arm is relatively small during swimming, And when the user turns around, the posture of the earphone 200 changes greatly. Therefore, the turn recognition module 113 can use the ACC data, GYRO data, and MAG data (data collected by the magnetometer 203 of the earphone 200) of the earphone 200 in the aforementioned combined data for analysis. data, GYRO data, and MAG data through nine-axis fusion algorithm for nine-axis fusion attitude calculation, that is, the ACC data (three coordinate axes), GYRO data (three coordinate axes) and MAG data (three coordinate axes) of the headset 200 ) for fusion to calculate the attitude angle of the earphone 200 corresponding to each stroke, and then the turn recognition sub-module M107 performs turn recognition according to the calculated attitude angles of each stroke. It should be understood that if the attitude angle of the earphone 200 corresponding to two adjacent strokes changes greatly, it indicates that the user has turned around.

结果统计模块114可以用于根据前述泳姿识别模块111识别出的泳姿,划水动作识别模块112识别出的划水动作,以及转身识别模块113识别出的转身行为,统计出用户的泳姿、划水频率、划水趟数、划水次数(也即进行划水计数)。以便于手表100将统计结果显示给用户,供用户参考。The result statistics module 114 can be used to count the swimming strokes of the user according to the swimming strokes identified by the aforementioned swimming stroke recognition module 111, the stroke strokes recognized by the stroke recognition module 112, and the turning behavior recognized by the turn recognition module 113. , stroke frequency, number of strokes, number of strokes (that is, stroke count). In order to facilitate the watch 100 to display the statistical results to the user for reference.

在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读存储介质分发。因此,机器计算机可读存储介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、可擦除可编程只读存储器(ErasableProgrammable Read Only Memory,EPROM)、电可擦除可编程只读存储器(ElectricallyErasable Programmable Read-Only Memory,EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器计算机可读存储介质包括适合于以机器(例如计算机)可读的形式存储或传输电子指令或信息的任何类型的机器计算机可读存储介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which can be executed by one or more processors read and execute. For example, instructions may be distributed over a network or via other computer-readable storage media. Thus, a machine-computer-readable storage medium may include any mechanism for storing or transmitting information in a form readable by a machine (eg, a computer), including but not limited to, floppy disks, compact disks, compact disks, read-only memories (CD-ROMs), , magneto-optical disk, read-only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, EPROM), electrically erasable programmable Read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic or optical card, flash memory, or used to transmit information by means of electricity, light, sound or other forms of propagation signals using the Internet (for example, carrier waves, infrared signals, digital signals etc.) tangible machine-readable storage. Thus, a machine-computer-readable storage medium includes any type of machine-readable storage medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).

在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such specific arrangements and/or orderings may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the illustrative figures. Additionally, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments these features may not be included or may be combined with other features.

需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that each unit/module mentioned in each device embodiment of this application is a logical unit/module. Physically, a logical unit/module can be a physical unit/module, or a physical unit/module. A part of the module can also be realized with a combination of multiple physical units/modules, the physical implementation of these logical units/modules is not the most important, the combination of functions realized by these logical units/modules is the solution The key to the technical issues raised. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems proposed by this application, which does not mean that the above-mentioned device embodiments do not exist other units/modules.

需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and descriptions of this patent, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply There is no such actual relationship or order between these entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Although this application has been shown and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and details may be made therein without departing from this disclosure. The spirit and scope of the application.

Claims (13)

1.一种游泳信息统计方法,应用于包含第一电子设备和第二电子设备的系统中,其特征在于,所述第一电子设备佩戴于用户的第一部位,所述第二电子设备佩戴于用户的第二部位,在不同泳姿下所述第一部位的运动轨迹之间的差别小于所述第二部位之间的运动轨迹之间的差别,所述方法包括:1. A swimming information statistics method, applied to a system including a first electronic device and a second electronic device, characterized in that the first electronic device is worn on the first part of the user, and the second electronic device is worn For the second part of the user, the difference between the motion trajectories of the first part under different swimming styles is smaller than the difference between the motion trajectories of the second parts, and the method includes: 所述第一电子设备获取所述用户在游泳过程中的第一运动数据;The first electronic device acquires first motion data of the user during swimming; 所述第一电子设备获取所述第二电子设备在所述用户游泳过程中采集的第二运动数据;The first electronic device acquires second motion data collected by the second electronic device during swimming of the user; 所述第一电子设备将所述第一运动数据和所述第二运动数据进行数据组帧,得到组帧后的运动数据,其中所述数据组帧的方式包括:The first electronic device performs data framing of the first motion data and the second motion data to obtain framed motion data, wherein the data framing method includes: 根据所述第二运动数据的帧率,对所述第一运动数据进行降采样处理,或者,根据所述第一运动数据的帧率,对所述第二运动数据进行插值处理,以使所述第一运动数据与所述第二运动数据的帧率相同;Perform downsampling processing on the first motion data according to the frame rate of the second motion data, or perform interpolation processing on the second motion data according to the frame rate of the first motion data, so that the The frame rate of the first motion data is the same as that of the second motion data; 所述第一电子设备对所述组帧后的运动数据进行滑窗处理并提取时域特征;The first electronic device performs sliding window processing on the framed motion data and extracts time domain features; 所述第一电子设备基于提取到的时域特征及预设的泳姿识别模型,确定泳姿识别结果;The first electronic device determines a swimming stroke recognition result based on the extracted time-domain features and a preset swimming stroke recognition model; 所述第一电子设备基于所述泳姿识别结果,统计出所述用户的泳姿,其中所述用户的游泳信息包括用户的泳姿。The first electronic device counts the user's swimming style based on the swimming style recognition result, wherein the user's swimming information includes the user's swimming style. 2.根据权利要求1所述的方法,其特征在于,所述第一电子设备基于提取得到的时域特征及预设的泳姿识别模型,确定泳姿识别结果,包括:2. The method according to claim 1, wherein the first electronic device determines the swimming stroke recognition result based on the extracted time-domain features and the preset swimming stroke recognition model, including: 所述第一电子设备将所述组帧后的运动数据的时域特征输入预设的泳姿识别模型,得到泳姿识别结果。The first electronic device inputs the time-domain features of the framed motion data into a preset stroke recognition model to obtain a stroke recognition result. 3.根据权利要求2所述的方法,其特征在于,所述预设的泳姿识别模型由至少一个二分类决策树构成,并且,3. The method according to claim 2, wherein the preset stroke recognition model is composed of at least one binary classification decision tree, and, 所述第一电子设备基于提取到的时域特征及预设的泳姿识别模型,确定泳姿识别结果,包括:The first electronic device determines a swimming stroke recognition result based on the extracted time-domain features and a preset swimming stroke recognition model, including: 采用所述至少一个二分类决策树以及预设的打分策略,分别对提取到的时域特征进行打分,得到对用户的泳姿打分结果;Using the at least one binary classification decision tree and a preset scoring strategy to score the extracted time-domain features respectively to obtain a scoring result for the user's swimming stroke; 将所述泳姿打分结果中的最大分值对应的泳姿,确定为泳姿识别结果。The stroke corresponding to the maximum score in the stroke scoring results is determined as the stroke recognition result. 4.根据权利要求3所述的方法,其特征在于,所述用户的游泳信息还包括用户的划水动作,所述第一电子设备基于所述组帧后的运动数据统计出所述用户的游泳信息,包括:4. The method according to claim 3, wherein the user's swimming information also includes the user's stroke action, and the first electronic device calculates the user's swimming action based on the framed motion data. Swimming information, including: 所述第一电子设备根据统计出的所述用户的泳姿,确定出所述组帧后的运动数据中用以统计所述用户的划水动作的第一目标数据,其中,所述第一目标数据包括所述第一电子设备采集的第一目标子数据以及所述第二电子设备采集的第二目标子数据;The first electronic device determines first target data for counting the user's stroke movements in the framed motion data according to the counted swimming strokes of the user, wherein the first The target data includes first target sub-data collected by the first electronic device and second target sub-data collected by the second electronic device; 所述第一电子设备根据所述第一目标子数据确定出多个粗筛划水动作;The first electronic device determines a plurality of coarse sieving strokes according to the first target sub-data; 所述第一电子设备根据所述第二目标子数据,从所述多个粗筛划水动作中统计出用户的划水动作。According to the second target sub-data, the first electronic device counts the stroke actions of the user from the plurality of roughly screened stroke actions. 5.根据权利要求4所述的方法,其特征在于,所述第一电子设备包括陀螺仪和加速度计,所述第一目标子数据包括所述第一电子设备的陀螺仪采集的数据或者所述第一电子设备的加速度计采集的数据。5. The method according to claim 4, wherein the first electronic device includes a gyroscope and an accelerometer, and the first target sub-data includes data collected by the gyroscope of the first electronic device or the The data collected by the accelerometer of the first electronic device. 6.根据权利要求4所述的方法,其特征在于,所述第一电子设备包括加速度计,所述第二目标子数据包括所述第二电子设备的加速度计采集的数据。6. The method according to claim 4, wherein the first electronic device includes an accelerometer, and the second target sub-data includes data collected by the accelerometer of the second electronic device. 7.根据权利要求4至6中任一项所述的方法,其特征在于,所述用户的游泳信息包括用户的转身动作,所述第一电子设备基于所述组帧后的运动数据统计出所述用户的游泳信息,包括:7. The method according to any one of claims 4 to 6, wherein the user's swimming information includes the user's turning action, and the first electronic device calculates based on the framed motion data The user's swimming information, including: 所述第一电子设备确定出所述用户的初始划水动作;The first electronic device determines the user's initial water stroke; 所述第一电子设备根据包括所述初始划水动作在内的连续第一数量的划水动作对应的所述第二运动数据,确定出所述用户的初始游泳方向;The first electronic device determines the user's initial swimming direction according to the second motion data corresponding to the first number of consecutive strokes including the initial stroke; 所述第一电子设备根据所述连续第一数量的划水动作之后的各划水动作对应的所述第二运动数据,确定出所述连续第一数量的划水动作之后的各划水动作对应的游泳方向;The first electronic device determines each stroke after the first number of strokes in succession according to the second motion data corresponding to each stroke after the first number of strokes in succession Corresponding swimming direction; 在所述第一电子设备根据所述连续第一数量的划水动作之后的每相邻两个划水动作对应的游泳方向之间的差异,判断所述用户发生转身时,所述第一电子设备确定出所述用户发生转身时对应的目标划水动作;When the first electronic device judges that the user turns around according to the difference between the swimming directions corresponding to every two adjacent strokes after the first number of consecutive strokes, the first electronic device The device determines the corresponding target stroke action when the user turns around; 所述第一电子设备根据所述目标划水动作之后连续第二数量的划水动作对应的所述第二运动数据,确定出所述目标划水动作之后连续第二数量的划水动作对应的目标游泳方向;The first electronic device determines, according to the second motion data corresponding to the second number of consecutive strokes after the target stroke, the stroke corresponding to the second number of consecutive strokes after the target stroke. target swimming direction; 在所述第一电子设备确定出目标游泳方向和初始游泳方向之间的差异达到阈值时,所述第一电子设备确认所述用户在所述目标划水动作期间发生了转身,并统计出所述用户的转身动作。When the first electronic device determines that the difference between the target swimming direction and the initial swimming direction reaches a threshold, the first electronic device confirms that the user has turned around during the target stroke, and counts all Describe the user's turning action. 8.根据权利要求7所述的方法,其特征在于,还包括:8. The method according to claim 7, further comprising: 所述第一电子设备将所述初始游泳方向更新为所述目标游泳方向。The first electronic device updates the initial swimming direction to the target swimming direction. 9.根据权利要求8所述的方法,其特征在于,所述第二电子设备包括陀螺仪、加速度计、磁力计,所述第二运动数据包括所述第二电子设备的陀螺仪采集的数据、所述第二电子设备的加速度计采集的数据、所述第二电子设备的磁力计采集的数据。9. The method according to claim 8, wherein the second electronic device includes a gyroscope, an accelerometer, and a magnetometer, and the second motion data includes data collected by the gyroscope of the second electronic device . Data collected by the accelerometer of the second electronic device, and data collected by the magnetometer of the second electronic device. 10.根据权利要求1所述的方法,其特征在于,所述第一电子设备为运动手表。10. The method according to claim 1, wherein the first electronic device is a sports watch. 11.根据权利要求1所述的方法,其特征在于,所述第二电子设备为运动耳机。11. The method according to claim 1, wherein the second electronic device is a sports earphone. 12.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,该指令在电子设备上执行时使电子设备执行权利要求1-11中任一项所述的游泳信息统计方法。12. A computer-readable storage medium, wherein instructions are stored on the computer-readable storage medium, and when the instructions are executed on the electronic equipment, the electronic equipment executes the method described in any one of claims 1-11. Statistical method of swimming information. 13.一种电子设备,其特征在于,包括:13. An electronic device, characterized in that it comprises: 存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及,memory for storing instructions to be executed by one or more processors of the electronic device, and, 处理器,当所述指令被一个或多个处理器执行时,所述处理器用于执行权利要求1-11中任一项所述的游泳信息统计方法。A processor, when the instructions are executed by one or more processors, the processor is used to execute the swimming information statistics method according to any one of claims 1-11.
CN202210509907.5A 2022-05-11 2022-05-11 Swimming information statistical method, computer-readable storage medium and electronic device Active CN114602155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210509907.5A CN114602155B (en) 2022-05-11 2022-05-11 Swimming information statistical method, computer-readable storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210509907.5A CN114602155B (en) 2022-05-11 2022-05-11 Swimming information statistical method, computer-readable storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114602155A CN114602155A (en) 2022-06-10
CN114602155B true CN114602155B (en) 2023-02-21

Family

ID=81870362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210509907.5A Active CN114602155B (en) 2022-05-11 2022-05-11 Swimming information statistical method, computer-readable storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114602155B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115155044B (en) * 2022-07-13 2025-01-24 杭州光粒科技有限公司 A method, device, equipment and medium for determining swimming turn time
CN116943123A (en) * 2023-08-15 2023-10-27 上海七十迈数字科技有限公司 Method and equipment for calculating swimming lap number
CN119257547A (en) * 2024-08-30 2025-01-07 颂拓运动科技(东莞)有限公司 Data processing method, first wearable device and computer readable storage medium

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060020396A (en) * 2004-08-31 2006-03-06 성준태 Fitness equipment for swimming
CN106334307B (en) * 2015-07-07 2018-07-31 天彩电子(深圳)有限公司 A kind of swimming monitoring method
US20170035328A1 (en) * 2015-08-07 2017-02-09 Fitbit, Inc. User identification via data collected from sensors of a wearable fitness monitor
GB2550394B8 (en) * 2016-05-19 2020-10-21 Polar Electro Oy Enhancing monitoring of swimming
CN106175781B (en) * 2016-08-25 2019-08-20 歌尔股份有限公司 Utilize the method and wearable device of wearable device monitoring swimming state
CN109643499B (en) * 2016-08-31 2022-02-15 苹果公司 System and method for swimming analysis
CN106251584B (en) * 2016-10-14 2018-07-06 山西大学 Multifunctional intellectual swimming bracelet and swimming state monitoring device and method
JP2018068705A (en) * 2016-10-31 2018-05-10 セイコーエプソン株式会社 Electronic apparatus, program, method and recording medium
CN107115653B (en) * 2016-11-03 2023-04-28 京东方科技集团股份有限公司 Device for adjusting swimming stroke, swimming stroke information processing system and swimming stroke information processing method
CN207950567U (en) * 2018-01-24 2018-10-12 西安科技大学 A kind of swimming position monitoring system
CN108379818A (en) * 2018-04-20 2018-08-10 国家体育总局体育科学研究所 A kind of technology analysis system and method for swimming exercise
JP7458650B2 (en) * 2018-04-26 2024-04-01 オムニバス 157 プロプリエタリー リミテッド System and method for systematically representing swimmer motion performance metrics
CN108452504B (en) * 2018-07-03 2020-04-14 昆山快乐岛运动电子科技有限公司 Swimming posture analysis device and method based on sensor
CN108939512B (en) * 2018-07-23 2020-05-19 大连理工大学 A Swimming Attitude Measurement Method Based on Wearable Sensors
US11097177B1 (en) * 2020-08-25 2021-08-24 Orkus Swim Llc Repulsion-based swim system and methods for use thereof
CN112587901B (en) * 2020-11-24 2022-05-31 安徽华米健康科技有限公司 Swimming gesture recognition method, device, system and storage medium
CN112542030A (en) * 2020-12-02 2021-03-23 英华达(上海)科技有限公司 Intelligent wearable device, method and system for detecting gesture and storage medium
CN113713358B (en) * 2021-06-28 2023-12-26 深圳市奋达智能技术有限公司 Swimming monitoring method, device, storage medium and program product based on multi-sensor fusion
CN114153576A (en) * 2021-11-09 2022-03-08 上海卓菡科技有限公司 Multi-task scheduling method and device based on wearable device and electronic device

Also Published As

Publication number Publication date
CN114602155A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN114602155B (en) Swimming information statistical method, computer-readable storage medium and electronic device
AU2020273327B2 (en) Systems and methods of swimming analysis
EP3695404B1 (en) Audio activity tracking and summaries
CN205508399U (en) Sound processing system
KR101509472B1 (en) Motion parameter determination method and device and motion auxiliary equipment
EP2509070A1 (en) Apparatus and method for determining relevance of input speech
CN106388831B (en) Method for detecting tumbling action based on sample weighting algorithm
JP2007221300A (en) Robot and robot control method
CN110974641A (en) Intelligent walking stick system integrating machine learning and Internet of things technology for blind people
EP3186599B1 (en) Feedback provision system
US11418892B2 (en) Method of operating a hearing device, and hearing device
WO2017177582A1 (en) Method and device for implementing speed measurement of sports apparatus
KR20230081878A (en) System for analyzing mothion using sensor worn on the user's head
CN105142107B (en) A kind of indoor orientation method
CN115220230A (en) A kind of AR glasses that can distinguish sound sources
KR102671307B1 (en) Golf swing analysis device, golf swing analysis method and program stored in a recording medium
CN114585422B (en) Apparatus and method for determining swimming metrics
CN107203259B (en) Method and apparatus for determining probabilistic content awareness for mobile device users using single and/or multi-sensor data fusion
CN110705496B (en) Swimming posture identification method based on nine-axis sensor
CN114492520A (en) Action recognition method and device
US20230096949A1 (en) Posture and motion monitoring using mobile devices
US12154367B2 (en) Full body pose estimation through feature extraction from multiple wearable devices
US20240041354A1 (en) Tracking caloric expenditure using a camera
US20240401954A1 (en) Pedestrian dead reckoning estimation for different device placements
CN116088642A (en) Control system and control method for wearable device and wearable 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