Wearable product strap identification method, device, wearable product and medium
By obtaining the magnetic field data detected by the Hall sensor and its changing trend, combined with sliding mean filtering and extreme value detection, the strap number is identified, which solves the problem of identification errors caused by external magnetic field interference and improves identification accuracy and user experience.
Patent Information
- Application Number
- CN202210611144.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-05-31
AI Technical Summary
The existing method of identifying watch strap numbers based on Hall sensors can easily lead to recognition errors or failure when external magnetic fields interfere or the strap is inserted discontinuously, degrading the user experience.
By obtaining the magnetic field data detected by the Hall sensor and its changing trend, the strap number is identified, sliding mean filtering and extreme value detection are used to determine the candidate insertion moment, and external interference is eliminated within the second preset time period to ensure accurate identification.
It improves the recognition accuracy of the strap number, reduces misrecognition caused by interference, improves the user experience, and ensures the real-time and accuracy of theme switching.
Smart Images

Figure CN115015814B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wearable products, and in particular to a method, device, wearable product and medium for identifying a strap of a wearable product. Background Art
[0002] Smart watches generally support the function of changing the dial, providing users with the system's own dial themes to meet their diverse needs. One of the common switching methods to switch the dial theme is to use the strap. Specifically, there is a magnet at one end of the watch, and the magnetization direction and other configurations of the strap magnets with different numbers are different. Correspondingly, the magnetic field changes detected by the Hall sensor will also be different. According to the change pattern of the magnetic field data, the corresponding number of the strap is identified, and then the corresponding dial theme is switched according to the strap number.
[0003] In the existing method of identifying the strap number based on the Hall sensor, the strap number is determined by comparing the current magnetic field data size or the difference between the current magnetic field data and the reference magnetic field data with the corresponding set threshold. However, when there is external magnetic field interference or the strap insertion action is discontinuous, the magnetic field data changes, and then when the number corresponding to the strap is identified according to the change law of the magnetic field data, the strap number is incorrectly identified or the strap number cannot be identified, so that the corresponding dial main theme cannot be switched, which reduces the user experience.
[0004] It can be seen that how to more accurately identify the number of the strap according to the change of the magnetic field is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The purpose of the present application is to provide a method, device, wearable product and medium for identifying the strap of a wearable product, which is used to more accurately identify the number of the strap of the wearable product according to the change of the magnetic field, and then switch the theme of the wearable product or the theme of other products that can communicate with the wearable product according to the number of the strap.
[0006] In order to solve the above technical problems, the present application provides a method for identifying a strap of a wearable product, which is applied to a device including a strap, wherein a Hall sensor is provided at the main body of the device, including:
[0007] Acquire magnetic field data of the strap to be identified detected by the Hall sensor within a first preset time period; wherein the first preset time period is greater than the cumulative time period of at least two sampling periods, and the sampling period is the sampling period of the Hall sensor;
[0008] Obtaining a change trend of the magnetic field data;
[0009] The number of the strap is identified according to the magnetic field data and a change trend of the magnetic field data.
[0010] Preferably, after acquiring the magnetic field data of the strap to be identified detected by the Hall sensor within the first preset time period, the method further includes:
[0011] Performing sliding mean filtering on the magnetic field data and obtaining filtered data;
[0012] Acquire a first difference between the magnetic field data and the filtered data;
[0013] Performing extreme value detection on the first difference and obtaining a result of the extreme value detection;
[0014] In the case where the result of the extreme value detection meets the first preset requirement, determining the candidate insertion time of the to-be-identified bandage; wherein the first preset requirement is determined according to the actual change amount of the magnetic field data when the bandage is inserted and the change amount of the magnetic field data when there is interference of a preset intensity;
[0015] Correspondingly, obtaining the change trend of the magnetic field data includes:
[0016] Acquire the change trend of the magnetic field data within a second preset time period; wherein the second preset time period is the time period starting from the candidate insertion time and before the candidate insertion time;
[0017] The step of identifying the number of the strap according to the magnetic field data and the change trend of the magnetic field data includes:
[0018] The number of the strap is identified according to the magnetic field data within the second preset time period and a change trend of the magnetic field data.
[0019] Preferably, the obtaining of the change trend of the magnetic field data within a second preset time period includes:
[0020] Respectively obtain the total number S of the magnetic field data on the X-axis, Y-axis, and Z-axis detected by the Hall sensor within the second preset time length, and obtain the current number of rises and the current number of falls; wherein the current number of rises and the current number of falls start from 0 respectively;
[0021] Starting from the i-th magnetic field data obtained, determining whether the i-th magnetic field data is greater than the previous magnetic field data of the i-th magnetic field data; wherein i starts from 1 and i is less than S;
[0022] If so, add 1 to the current number of ascents;
[0023] If not, then increase the current number of descents by 1;
[0024] Set the value of i+1 as the new i;
[0025] Determine whether the new i is less than or equal to S;
[0026] When the new i is less than or equal to S, return to the step of determining whether the i-th magnetic field data is greater than the previous magnetic field data of the i-th magnetic field data;
[0027] When the new i is greater than S, obtain the values of the current number of rises and the current number of decreases respectively; when the current number of rises meets the second preset requirement, confirm that the change trend of the magnetic field data is an upward trend; when the current number of decreases meets the third preset requirement, confirm that the change trend of the magnetic field data is a downward trend.
[0028] Preferably, it also includes:
[0029] When the current number of rises does not meet the second preset requirement or the current number of drops does not meet the third preset requirement, it is confirmed that the magnetic field data is data obtained under external interference.
[0030] Preferably, after determining the candidate insertion time of the to-be-identified binding band, the method further comprises:
[0031] Acquire the maximum value and the minimum value of the magnetic field data on the first preset axis within the second preset time; wherein the selected first preset axis is determined by the parameters of the magnetic field;
[0032] Obtaining a second difference between the maximum value and the minimum value on the first preset axis;
[0033] When the second difference satisfies a fourth preset requirement and the change trend of the magnetic field data on the first preset axis is a first preset trend, confirming the insertion time of the bandage from the candidate insertion times of the bandage to be identified;
[0034] Correspondingly, the identifying the number of the strap according to the magnetic field data within the second preset time and the change trend of the magnetic field data includes:
[0035] The number of the strap is identified according to the magnetic field data within the second preset time period starting from the insertion moment of the strap and before the insertion moment of the strap and the change trend of the magnetic field data.
[0036] Preferably, the identifying the number of the strap according to the magnetic field data within the second preset time period starting from the moment when the strap is inserted and before the moment when the strap is inserted and the change trend of the magnetic field data comprises:
[0037] Acquire the maximum value and the minimum value of the magnetic field data on a second preset axis within the second preset time period starting from the moment when the strap is inserted and before the moment when the strap is inserted; wherein the second preset axis is an axis other than the first preset axis;
[0038] Obtaining a third difference between the maximum value and the minimum value on the second preset axis;
[0039] When the third difference meets the fifth preset requirement and the change trend of the magnetic field data on the second preset axis is the second preset trend, the number of the strap is confirmed.
[0040] Preferably, after identifying the serial number of the strap according to the magnetic field data and the change trend of the magnetic field data, the method further includes:
[0041] Outputting the serial number of the strap;
[0042] The theme of the corresponding device is switched according to the number of the strap.
[0043] In order to solve the above technical problems, the present application also provides a device for identifying a strap of a wearable product, which is applied to a device including a strap, wherein a Hall sensor is provided at the main body of the device, including:
[0044] A first acquisition module, used to acquire magnetic field data of the strap to be identified detected by the Hall sensor within a first preset time period; wherein the first preset time period is greater than the cumulative time period of at least two sampling periods, and the sampling period is the sampling period of the Hall sensor;
[0045] A second acquisition module is used to obtain the change trend of the magnetic field data;
[0046] An identification module is used to identify the serial number of the strap according to the magnetic field data and the change trend of the magnetic field data.
[0047] In order to solve the above technical problems, the present application also provides a wearable product, including:
[0048] Memory for storing computer programs;
[0049] The processor is used to implement the steps of the above-mentioned method for identifying the strap of the wearable product when executing the computer program.
[0050] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for strap identification of the above-mentioned wearable product are implemented.
[0051] The present application provides a method for identifying a strap of a wearable product, which is applied to a device including a strap, wherein a Hall sensor is provided at the main body of the device, and the method comprises: obtaining magnetic field data of a strap to be identified detected by the Hall sensor within a first preset time period; obtaining a change trend of the magnetic field data; and identifying the number of the strap according to the magnetic field data and the change trend of the magnetic field data. In the previous method of judging the strap number by comparing the current magnetic field data size or the difference between the current magnetic field data and the reference magnetic field data with a corresponding set threshold, the strap is identified only based on the magnetic field data, while in the present application, the strap is identified based on the magnetic field data within a period of time and the change trend of the magnetic field data, which can minimize the occurrence of misidentification of the strap number or failure to identify the strap number due to interference, so that the identified strap number is more accurate, and then the theme of the wearable product or the theme of other products that can communicate with the wearable product can be switched according to the strap number, thereby improving the user experience.
[0052] In addition, the present application also provides a device for identifying a strap of a wearable product, a wearable product, and a computer-readable storage medium, which correspond to the method for identifying a strap of a wearable product mentioned above, and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 A flowchart of a method for identifying a strap of a wearable product provided in an embodiment of the present application;
[0055] Figure 2 A flowchart of a method for obtaining a candidate insertion time of a strap provided in an embodiment of the present application;
[0056] Figure 3a A schematic diagram of the change of X-axis magnetic field data caused by interference from a magnetic charging stand provided in an embodiment of the present application;
[0057] Figure 3b A schematic diagram of the change of Y-axis magnetic field data caused by interference from a magnetic charging stand provided in an embodiment of the present application;
[0058] Figure 3c A schematic diagram of a change in Z-axis magnetic field data caused by interference from a magnetic charging stand provided in an embodiment of the present application;
[0059] Figure 4A schematic diagram of the relationship between the insertion time of a candidate watch strap and the change of X-axis magnetic field data provided in an embodiment of the present application;
[0060] Figure 5 A flowchart of a method for obtaining a change trend of magnetic field data within a second preset time period provided in an embodiment of the present application;
[0061] Fig.6a1 A schematic diagram of a curve showing a change in X-axis magnetic field data of a watch band No. 1 provided in an embodiment of the present application;
[0062] Fig.6a2 A schematic diagram of a curve showing a change in Y-axis magnetic field data of a watch band No. 1 provided in an embodiment of the present application;
[0063] Fig.6a3 A schematic diagram of a change curve of the Z-axis magnetic field data of a watch band No. 1 provided in an embodiment of the present application;
[0064] Figure 6b1 A schematic diagram of a curve showing a change in X-axis magnetic field data of a watch band No. 2 provided in an embodiment of the present application;
[0065] Figure 6b2 A schematic diagram of a curve showing a change in Y-axis magnetic field data of a watch band No. 2 provided in an embodiment of the present application;
[0066] Figure 6b3 A schematic diagram of a variation curve of the Z-axis magnetic field data of a watch band No. 2 provided in an embodiment of the present application;
[0067] Figure 7 A structural diagram of a device for identifying a strap of a wearable product provided in one embodiment of the present application;
[0068] Figure 8 A structural diagram of a wearable product provided in another embodiment of the present application;
[0069] Fig. 9 A specific flow chart for identifying watch strap numbers 1 and 2 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0071] The core of this application is to provide a method, device, wearable product and medium for identifying the strap of a wearable product, which is used to more accurately identify the number of the strap of the wearable product according to the change of the magnetic field, and then switch the theme of the wearable product or the theme of other products that can communicate with the wearable product according to the number of the strap.
[0072] The wearable products involved in this application may be products such as watches, bracelets, VR devices, etc. This application divides the wearable products into a main body and a strap part. For example, the wearable product is a watch, the part where the dial is located is the main body of the watch, and the strap is the strap of the watch. A Hall sensor is provided at one end of the main body of the wearable product, and a magnetic field is provided in the strap of the wearable product. The magnetization direction of the magnetic field in the straps with different numbers, the volume of the magnet, etc. are different, so the number of the strap can be distinguished according to the magnetic field data of the strap detected by the Hall sensor. In addition, different strap numbers correspond to different themes. After distinguishing the number of the strap, the corresponding theme can be switched according to the number of the strap. It should be noted that the theme of the wearable product can be switched according to the number of the wearable product strap, and the theme of other products that communicate with the wearable product can also be switched, such as the theme of the bracelet display can be switched according to the number of the strap on the bracelet; or in the case of establishing Bluetooth communication between the bracelet and the mobile phone, the instruction to switch the corresponding theme can be transmitted to the mobile phone through Bluetooth communication according to the number of the strap on the bracelet, and the mobile phone switches the theme of the mobile phone according to the number of the strap after receiving the instruction.
[0073] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Figure 1 A flowchart of a method for identifying a strap of a wearable product provided in an embodiment of the present application. The method is applied to a device including a strap, and a Hall sensor is provided at the main body of the device, such as Figure 1 As shown, the method includes:
[0074] S10: Acquire magnetic field data of the strap to be identified detected by the Hall sensor within a first preset time period; wherein the first preset time period is greater than the accumulated time period of at least two sampling periods, and the sampling period is the sampling period of the Hall sensor.
[0075] When straps with different numbers are inserted into wearable products, the changes in the magnetic field data detected by the Hall sensor are different. The magnetic field data of the strap to be identified detected by the Hall sensor within the first preset time length is obtained. It should be noted that there is no limitation on the first preset time length. However, since at least two magnetic field data are required to know the changing trend of the magnetic field data, the first preset time length cannot be too short. The first preset time length is greater than the cumulative time length of at least two sampling cycles, and the sampling cycle is the sampling cycle of the Hall sensor.
[0076] S11: Obtain the changing trend of magnetic field data.
[0077] In the above steps, the magnetic field data of the first preset time length is obtained, and then the changing trend of the magnetic field can be judged according to the difference between the two adjacent magnetic field data obtained. In implementation, there may be changes in the magnetic field data caused by strong interference or discontinuous insertion of the strap action, such as when the disk charging stand is close to the wearable product, resulting in obvious changes in the magnetic field data. Therefore, in order to more accurately obtain the changing trend of the magnetic field data, within the first preset time length, the total number of times the magnetic field data rises or falls is obtained according to the difference between the two adjacent magnetic field data. When the total number of rises or the total number of falls meets certain conditions, the changing trend of the magnetic field data within the first preset time length is determined; otherwise, it is considered that the external environment has a strong or weak magnetic field interference on the wearable product.
[0078] S12: Identify the number of the strap according to the magnetic field data and the change trend of the magnetic field data.
[0079] For straps with different numbers, when there is no interference or very little interference, the magnetic field data fluctuates within a certain range, and the changing trend of the magnetic field data has a certain regularity. Therefore, the number of the strap can be determined based on the magnetic field data obtained in the above steps and the changing trend of the magnetic field data.
[0080] In implementation, when the strap is inserted, the device theme needs to respond in time to switch. This means that in addition to accuracy, the identification of the strap number also needs to consider real-time performance. If there is a delay in strap identification, the switching of the strap theme will also be delayed accordingly, which will seriously affect the user experience. Therefore, based on the historical data from the time the strap is inserted and a period of time before the insertion of the strap, the interference of the external magnetic field is eliminated and the trend of the magnetic field change is obtained, and then the strap number is determined. For example, if the historical data for a period of time before the insertion of the strap are all within the specified range, and the magnetic field changes in an upward trend, the strap is determined to be No. 1; if the historical data for a period of time before the insertion of the strap are all within the specified range, and the magnetic field changes in a downward trend, the strap is determined to be No. 2.
[0081] The present embodiment provides a method for identifying a strap of a wearable product, which is applied to a device including a strap, wherein a Hall sensor is provided at the main body of the device, and the method comprises: obtaining magnetic field data of a strap to be identified detected by the Hall sensor within a first preset time period; obtaining a change trend of the magnetic field data; and identifying the number of the strap according to the magnetic field data and the change trend of the magnetic field data. In the previous method of determining the strap number by comparing the current magnetic field data size or the difference between the current magnetic field data and the reference magnetic field data with a corresponding set threshold, the strap is identified only according to the magnetic field data, while in this method, the strap is identified according to the magnetic field data and the change trend of the magnetic field data within a period of time, which can minimize the occurrence of misidentification of the strap number or failure to identify the strap number due to interference, so that the identified strap number is more accurate, and then the theme of the wearable product or the theme of other products that can communicate with the wearable product can be switched according to the strap number, thereby improving the user experience.
[0082] In practice, if there is a delay in strap recognition, the switching of the device theme will also be delayed accordingly, which will seriously affect the user experience. Therefore, a preferred implementation is that after obtaining the magnetic field data of the strap to be recognized detected by the Hall sensor within the first preset time, it also includes
[0083] Perform sliding mean filtering on the magnetic field data and obtain filtered data;
[0084] Acquire a first difference between the magnetic field data and the filtered data;
[0085] Performing extreme value detection on the first difference and obtaining the result of the extreme value detection;
[0086] When the result of the extreme value detection meets the first preset requirement, a candidate insertion time of the to-be-identified bandage is determined; wherein the first preset requirement is determined according to the change amount of the actual magnetic field data when the bandage is inserted and the change amount of the magnetic field data when there is interference of a preset intensity;
[0087] Correspondingly, the change trend of obtaining magnetic field data in step S11 in the above embodiment includes:
[0088] Obtaining a change trend of the magnetic field data within a second preset time period; wherein the second preset time period is a time period starting from the candidate insertion time and before the candidate insertion time;
[0089] In the above step S12, identifying the number of the strap according to the magnetic field data and the change trend of the magnetic field data includes:
[0090] The number of the strap is identified according to the magnetic field data within a second preset time period and a change trend of the magnetic field data.
[0091] Here, the magnetic field data on the X-axis obtained within the first preset time period is taken as an example to illustrate the process of selecting the candidate strap insertion time. Figure 2 A flowchart of a method for obtaining a candidate insertion time of a strap provided in an embodiment of the present application. Figure 2 As shown, the method includes:
[0092] S13: Perform sliding mean filtering on the original data on the X-axis to obtain filtered data;
[0093] S14: Subtracting the filtered data from the original data to obtain a first difference value diff;
[0094] S15: perform extreme value detection on diff;
[0095] S16: Determine whether the amplitude of the X-axis extreme point satisfies [Thr1, Thr2]; if so, proceed to step S17, if not, return to step S13;
[0096] The value of Thr1 is determined based on the change in actual magnetic field data when the strap is inserted and when there is weak interference, and the value of Thr2 is determined based on the change in actual magnetic field data when the strap is inserted and when there is strong interference; Figure 3a A schematic diagram of the change of X-axis magnetic field data caused by interference from a magnetic charging stand provided in an embodiment of the present application; Figure 3b A schematic diagram of the change of Y-axis magnetic field data caused by interference from a magnetic charging stand provided in an embodiment of the present application; Figure 3c A schematic diagram of a change in Z-axis magnetic field data caused by interference from a magnetic charging stand provided in an embodiment of the present application; the actual magnetic field data change when the strap is inserted and Figure 3a , 3b , The value of Thr2 is determined by the change in the magnetic field data in 3c.
[0097] S17: Determine candidate insertion times for the strap.
[0098] Figure 4 A schematic diagram of the relationship between the insertion time of a candidate watch strap and the change of the X-axis magnetic field data provided in an embodiment of the present application. The horizontal axis in the figure represents the sample point (the horizontal axis can also represent time, and the sample point here refers to the number of data acquired at different times), and the vertical axis represents the magnetic field strength corresponding to different sample points.
[0099] If the candidate insertion moment is not confirmed, it is considered that the change in magnetic field data is caused by external magnetic field interference or discontinuous insertion of the strap. After obtaining the candidate insertion moment of the strap, the magnetic field data and the change trend of the magnetic field data within the second preset time period before the candidate insertion moment are obtained, and the number of the strap is identified according to the magnetic field data within the second preset time period before the candidate insertion moment and the change trend of the magnetic field data. It should be noted that the second preset time period is less than the first preset time period.
[0100] After obtaining the magnetic field data of the to-be-identified strap detected by the Hall sensor within the first preset time period, the present embodiment further includes obtaining candidate insertion times of the strap, and the efficiency of identifying the strap number can be improved according to the candidate insertion times.
[0101] In implementation, in order to more accurately obtain the changing trend of magnetic field data and eliminate the interference caused by external magnetic fields. Figure 5 A flowchart of a method for obtaining a change trend of magnetic field data within a second preset time period provided in an embodiment of the present application, such as Figure 5 As shown, the method includes:
[0102] S18: respectively obtaining the total number S of magnetic field data on the X-axis, Y-axis, and Z-axis detected by the Hall sensor within the second preset time length, and obtaining the current number of rises and the current number of falls;
[0103] Among them, the current rising number and the current falling number start from 0 respectively;
[0104] S19: starting from the i-th magnetic field data obtained, determining whether the i-th magnetic field data is greater than the previous magnetic field data of the i-th magnetic field data;
[0105] Where i starts from 1 and i is less than S; if yes, proceed to step S20; if no, proceed to step S21;
[0106] S20: add 1 to the current number of rises;
[0107] S21: add 1 to the current number of descents;
[0108] S22: Set the value of i+1 as the new i;
[0109] S23: Determine whether the new i is less than or equal to S; if so, return to step S19; if not, proceed to step S24;
[0110] S24: Obtain the current number of ascents and the current number of descents;
[0111] S25: when the current number of rises meets the second preset requirement, confirming that the change trend of the magnetic field data is an upward trend; when the current number of falls meets the third preset requirement, confirming that the change trend of the magnetic field data is a downward trend;
[0112] S26: When the current number of rising times does not meet the second preset requirement or the current number of falling times does not meet the third preset requirement, confirming that there is external interference.
[0113] It should be noted that the second preset requirement and the third preset requirement are not limited, and the second preset requirement and the third preset requirement may be determined according to the number of magnetic field data obtained within the second preset duration. The second preset requirement may be the same as the third preset requirement, or may be different. If the magnetic field data obtained within the second preset duration is 10, the second preset requirement may be 8 times, and the third preset requirement may be 7 times. In other words, when the number of increases is greater than 8 times, the change trend of the magnetic field data is determined to be an upward trend, and when the number of decreases is greater than 7, the change trend of the magnetic field data is determined to be a downward trend.
[0114] In addition, when the current number of rises does not meet the second preset requirement or the current number of falls does not meet the third preset requirement, it is confirmed that the magnetic field data is data obtained under external interference.
[0115] According to the historical data of the second preset time length provided in this embodiment, each magnetic field data is compared with the corresponding previous magnetic field data, and the change trend of the magnetic field is determined only when the number of rises finally obtained meets the second preset requirement or the number of drops meets the third preset requirement, so that the change trend of the obtained magnetic field data is more accurate. In addition, the interference of the external magnetic field can be eliminated according to the historical data of the magnetic field.
[0116] After the candidate insertion time is obtained in the above embodiment, the insertion time of the strap can be further determined based on the magnetic field data within a second preset time period starting from the candidate time and before the candidate time and the change trend of the magnetic field data, thereby determining the number corresponding to the strap based on the magnetic field data within a second preset time period starting from the insertion time of the strap and before the insertion time and the change trend of the magnetic field data. A preferred implementation is that after determining the candidate insertion time of the strap to be identified, it also includes:
[0117] Acquire a maximum value and a minimum value of the magnetic field data on a first preset axis within a second preset time period; wherein the selected first preset axis is determined by a parameter of the magnetic field;
[0118] Obtaining a second difference between the maximum value and the minimum value on the first preset axis;
[0119] When the second difference meets a fourth preset requirement and the change trend of the magnetic field data on the first preset axis is the first preset trend, confirming the insertion time of the bandage from the candidate insertion times of the bandage to be identified;
[0120] Correspondingly, identifying the number of the strap according to the magnetic field data within the second preset time period and the change trend of the magnetic field data includes:
[0121] The number of the bandage is identified based on the magnetic field data within a second preset time period starting from the insertion time of the bandage and before the insertion time of the bandage and the change trend of the magnetic field data.
[0122] In implementation, the change of magnetic field corresponding to different strap numbers is obtained based on a large amount of experimental data. The number of selected first preset axes can be one or more, and the first preset axes selected for straps with different numbers are determined by the parameters of the magnetic field. Taking a watch as an example, Fig.6a1 A schematic diagram of a curve showing a change in X-axis magnetic field data of a watch band No. 1 provided in an embodiment of the present application; Fig.6a2 A schematic diagram of a curve showing a change in Y-axis magnetic field data of a watch band No. 1 provided in an embodiment of the present application; Fig.6a3 A schematic diagram of a change curve of the Z-axis magnetic field data of a watch band No. 1 provided in an embodiment of the present application; Figure 6b1 A schematic diagram of a curve showing a change in X-axis magnetic field data of a watch band No. 2 provided in an embodiment of the present application; Figure 6b2 A schematic diagram of a curve showing a change in Y-axis magnetic field data of a watch band No. 2 provided in an embodiment of the present application; Figure 6b3 A schematic diagram of the change curve of the Z-axis magnetic field data of a watch strap numbered 2 provided in an embodiment of the present application. In each figure, the horizontal axis represents the sample point (the horizontal axis can also represent time, and the sample point here refers to the number of data acquired at different times), and the vertical axis represents the magnetic field strength corresponding to different sample points). When two watch straps with different numbers are inserted, the change trend of the three-axis magnetic field data is significantly different:
[0123] (1) When strap No. 1 and strap No. 2 are inserted, the X-axis data shows a downward trend; when the straps are removed, the X-axis data shows an upward trend.
[0124] (2) When the No. 1 strap is inserted, the Y-axis data shows an upward trend and the Z-axis data shows a downward trend.
[0125] (3) When the No. 2 strap is inserted, the Y-axis data shows a downward trend and the Z-axis data shows an upward trend.
[0126] The X-axis magnetic field data is used to determine whether a strap is inserted, and the Y and Z-axis data are used to identify the number of the inserted strap. In addition, there are differences in the amount of change in the three-axis magnetic field data. The amount of change in the Y and Z-axis magnetic field data of strap number 1 is obviously greater than the amount of change in the magnetic field data of strap number 2. Therefore, when identifying strap number 1 and strap number 2, the first preset axis selected can be the X-axis. For strap number 1, the first preset trend is a downward trend. The maximum and minimum values in the magnetic field data on X are obtained within the second preset time length; the second difference DX1 between the maximum and minimum values on the X-axis is obtained; when the second difference meets the fourth preset requirement and the change trend of the magnetic field data on the X-axis is a downward trend, the insertion time of the strap is confirmed from the candidate insertion times of the strap to be identified. There is no limitation on the fourth preset requirement, which is determined according to the actual situation. Here, the fourth preset requirement is recorded as [Thr3, Thr4]. It should be noted that when there is only one candidate insertion moment, the steps of this embodiment do not need to be performed, and the candidate insertion moment is directly used as the insertion moment of the strap; when the number of candidate insertion moments is greater than or equal to 2, the steps of this embodiment need to be performed.
[0127] The method provided in this embodiment determines the insertion time of the bandage from the candidate insertion times after determining the candidate insertion time of the bandage to be identified, and determines the insertion time of the bandage according to the change of the magnetic field data on the preset axis, so that the insertion time of the bandage can be quickly determined.
[0128] On the basis of the above embodiment, the identification of the number of the strap according to the magnetic field data within a second preset time period starting from the moment when the strap is inserted and before the moment when the strap is inserted and the change trend of the magnetic field data includes:
[0129] Acquire the maximum value and the minimum value of the magnetic field data on a second preset axis within a second preset time period starting from the moment when the bandage is inserted and before the moment when the bandage is inserted; wherein the second preset axis is an axis other than the first preset axis;
[0130] Obtaining a third difference between the maximum value and the minimum value on the second preset axis;
[0131] When the third difference meets the fifth preset requirement and the change trend of the magnetic field data on the second preset axis is the second preset trend, the number of the strap is confirmed.
[0132] There is no limitation on the values of the second preset axis and the fifth preset requirement, which are determined according to the actual situation. The second preset trend is determined according to the change of the magnetic field corresponding to each numbered strap. Similarly, taking the strap No. 1 and the strap No. 2 in the above implementation as an example, in the above embodiment, it is judged whether a strap is inserted based on the magnetic field data on the X-axis, and the second preset axis is the Y-axis and the Z-axis. For the strap No. 1, the second preset trend is that the magnetic field data on the Y-axis shows an upward trend and the magnetic field data on the Z-axis shows a downward trend; for the strap No. 2, the second preset trend is that the magnetic field data on the Y-axis shows a downward trend and the magnetic field data on the Z-axis shows an upward trend. Then, the number corresponding to the strap can be identified according to the fifth preset requirement and the second preset trend.
[0133] The method provided in this embodiment for identifying the number of a strap based on the magnetic field data within a second preset time period before the strap is inserted and the change trend of the magnetic field data can more accurately identify the number of the strap based on the change of the magnetic field data on each axis.
[0134] After the number of the strap is identified, in order to facilitate the user to know the number of the strap, a preferred implementation method is that after the number of the strap is identified according to the magnetic field data and the change trend of the magnetic field data, the method further includes:
[0135] Output the number of the strap;
[0136] Switch the theme of the corresponding device according to the strap number.
[0137] There is no limitation on the method of outputting the strap number. The strap number can be read out in the form of voice broadcast, or the strap number can be displayed on the display screen of the wearable product, etc. The corresponding device theme is switched according to the strap number. The theme of the wearable product can be switched according to the strap number, or the theme of other products that can communicate with the wearable product can be switched. When setting themes corresponding to different strap numbers, different themes can be set according to the user's age, personality, gender, etc., and there is no limitation on the theme corresponding to the strap number here.
[0138] The present embodiment provides that after the number of the strap is identified, the number of the strap is output, so that the user can intuitively obtain the number of the strap, and then switch the corresponding device theme according to the number of the strap, thereby improving the user experience.
[0139] In the above embodiments, the method for identifying the strap of a wearable product is described in detail. The present application also provides a device for identifying the strap of a wearable product and an embodiment of the wearable product. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the perspective of the functional module, and the other is based on the perspective of the hardware.
[0140] Figure 7 A structural diagram of a device for identifying a strap of a wearable product provided in one embodiment of the present application. This embodiment is based on the perspective of functional modules and includes:
[0141] A first acquisition module 10 is used to acquire magnetic field data of the strap to be identified detected by the Hall sensor within a first preset time period; wherein the first preset time period is greater than the cumulative time period of at least two sampling periods, and the sampling period is the sampling period of the Hall sensor;
[0142] The second acquisition module 11 is used to obtain the change trend of the magnetic field data;
[0143] The identification module 12 is used to identify the number of the strap according to the magnetic field data and the change trend of the magnetic field data.
[0144] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0145] The device for identifying the strap of a wearable product provided in this embodiment obtains the magnetic field data of the strap to be identified detected by the Hall sensor within a first preset time length through a first acquisition module; obtains the change trend of the magnetic field data through a second acquisition module; and identifies the number of the strap according to the magnetic field data and the change trend of the magnetic field data through an identification module. In the previous method of judging the strap number by comparing the current magnetic field data size or the difference between the current magnetic field data and the reference magnetic field data with the corresponding set threshold, the strap is identified only based on the magnetic field data, while in this embodiment, the strap is identified based on the magnetic field data and the change trend of the magnetic field data within a period of time, which can minimize the occurrence of misidentification of the strap number or failure to identify the strap number due to interference, so that the identified strap number is more accurate, and then the theme of the wearable product or the theme of other products that can communicate with the wearable product can be switched according to the strap number, thereby improving the user experience.
[0146] Figure 8 This is a structural diagram of a wearable product provided by another embodiment of the present application. This embodiment is based on the hardware perspective, such as Figure 8 As shown, wearable products include:
[0147] A memory 20, for storing computer programs;
[0148] The processor 21 is used to implement the steps of the method for identifying the strap of the wearable product mentioned in the above embodiment when executing the computer program.
[0149] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0150] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the method for strap identification of a wearable product disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the method for strap identification of a wearable product mentioned above.
[0151] In some embodiments, the wearable product may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power source 25 , and a communication bus 26 .
[0152] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation of the wearable product and may include more or fewer components than shown in the figure.
[0153] The wearable product provided in an embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: a method for identifying the strap of a wearable product, and the effect is the same as above.
[0154] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.
[0155] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0156] The computer-readable storage medium provided in the present application includes the above-mentioned method for identifying the strap of a wearable product, and the effect is the same as above.
[0157] In order to enable those skilled in the art to better understand the technical solution of the present application, Fig. 9 The above application is further described in detail. Fig. 9 A specific flow chart for identifying a watch band number 1 and a watch band number 2 provided in an embodiment of the present application is as follows: Fig. 9 As shown, the method includes:
[0158] S27: Collect X-axis data to find candidate strap insertion points;
[0159] S28: Determine whether the amplitude of the X-axis extreme point satisfies [Thr1, Thr2]; if so, proceed to step S29; if not, return to step S27;
[0160] S29: The current data point is a candidate strap insertion point;
[0161] S30: Find the maximum and minimum values of the three-axis historical data in the previous T1 period;
[0162] S31: Determine whether the difference between the maximum value and the minimum value on the X-axis satisfies [Thr3, Thr4] and the X-axis data shows a downward trend; if so, proceed to step S32; if not, return to step S27;
[0163] S32: The candidate watchband insertion point is the watchband insertion point;
[0164] S33: Determine whether the difference between the maximum and minimum values on the Y and Z axes meets the threshold requirements and the data on the Y axis shows an upward trend, while the data on the Z axis shows a downward trend; if so, proceed to step S34; if not, proceed to step S35;
[0165] S34: strap number is 1;
[0166] S35: Determine whether the difference between the maximum and minimum values on the Y and Z axes meets the threshold requirements and the data on the Y axis shows a downward trend, and the data on the Z axis shows an upward trend; if so, proceed to step S36; if not, return to step S27;
[0167] S36: The strap number is 2.
[0168] The present embodiment provides a method for finding the strap insertion point based on the magnetic field data on the X-axis, and then eliminating the interference of the external magnetic field by combining the historical data in the previous T1 time period of the candidate strap insertion point, confirming the strap insertion point and identifying the strap number. The previous method of judging the strap number based on the current magnetic field data size or the difference between the current magnetic field data and the reference magnetic field data and the corresponding set threshold value only identifies the strap based on the magnetic field data, while the present embodiment identifies the strap based on the magnetic field data and the changing trend of the magnetic field data over a period of time, which can minimize the occurrence of misidentification of the strap number or failure to identify the strap number due to interference, so that the identified strap number is more accurate, and then the theme of the wearable product or the theme of other products that can communicate with the wearable product can be switched according to the strap number, thereby improving the user experience.
[0169] The above is a detailed introduction to the method, device, wearable product and medium for strap identification of wearable products provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
[0170] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for identifying a strap of a wearable product, characterized in that: Applicable to a device including a strap, wherein a Hall sensor is provided at the main body of the device, including: Acquire magnetic field data of the strap to be identified detected by the Hall sensor within a first preset time period; wherein the first preset time period is greater than the cumulative time period of at least two sampling periods, and the sampling period is the sampling period of the Hall sensor; Obtaining a change trend of the magnetic field data; Identifying the number of the strap according to the magnetic field data and a change trend of the magnetic field data; After acquiring the magnetic field data of the strap to be identified detected by the Hall sensor within the first preset time period, the method further includes: Performing sliding mean filtering on the magnetic field data and obtaining filtered data; Acquire a first difference between the magnetic field data and the filtered data; Performing extreme value detection on the first difference and obtaining a result of the extreme value detection; In the case where the result of the extreme value detection meets the first preset requirement, determining the candidate insertion time of the to-be-identified bandage; wherein the first preset requirement is determined according to the actual change amount of the magnetic field data when the bandage is inserted and the change amount of the magnetic field data when there is interference of a preset intensity; Correspondingly, obtaining the change trend of the magnetic field data includes: Acquire the change trend of the magnetic field data within a second preset time period; wherein the second preset time period is the time period starting from the candidate insertion time and before the candidate insertion time; The step of identifying the number of the strap according to the magnetic field data and the change trend of the magnetic field data includes: The number of the strap is identified according to the magnetic field data within the second preset time period and a change trend of the magnetic field data.
2. The method for identifying a strap of a wearable product according to claim 1, characterized in that: The obtaining of the change trend of the magnetic field data within a second preset time period includes: Respectively obtain the total number S of the magnetic field data on the X-axis, Y-axis, and Z-axis detected by the Hall sensor within the second preset time length, and obtain the current number of rises and the current number of falls; wherein the current number of rises and the current number of falls start from 0 respectively; Starting from the i-th magnetic field data obtained, determining whether the i-th magnetic field data is greater than the previous magnetic field data of the i-th magnetic field data; wherein i starts from 1 and i is less than S; If so, add 1 to the current number of ascents; If not, then increase the current number of descents by 1; Set the value of i+1 as the new i; Determine whether the new i is less than or equal to S; When the new i is less than or equal to S, the process returns to the step of determining whether the i-th magnetic field data is greater than the previous magnetic field data of the i-th magnetic field data; When the new i is greater than S, obtain the values of the current number of rises and the current number of decreases respectively; when the current number of rises meets the second preset requirement, confirm that the change trend of the magnetic field data is an upward trend; when the current number of decreases meets the third preset requirement, confirm that the change trend of the magnetic field data is a downward trend.
3. The method for identifying a strap of a wearable product according to claim 2, characterized in that: Also includes: When the current number of rises does not meet the second preset requirement or the current number of drops does not meet the third preset requirement, it is confirmed that the magnetic field data is data obtained under external interference.
4. The method for identifying a strap of a wearable product according to claim 2, characterized in that: After determining the candidate insertion time of the to-be-identified binding band, the method further includes: Acquire the maximum value and the minimum value of the magnetic field data on the first preset axis within the second preset time; wherein the selected first preset axis is determined by the parameters of the magnetic field; Obtaining a second difference between the maximum value and the minimum value on the first preset axis; When the second difference satisfies a fourth preset requirement and the change trend of the magnetic field data on the first preset axis is a first preset trend, confirming the insertion time of the bandage from the candidate insertion times of the bandage to be identified; Correspondingly, the identifying the number of the strap according to the magnetic field data within the second preset time and the change trend of the magnetic field data includes: The number of the strap is identified according to the magnetic field data within the second preset time period starting from the insertion moment of the strap and before the insertion moment of the strap and the change trend of the magnetic field data.
5. The method for identifying a strap of a wearable product according to claim 4, characterized in that: The identifying the number of the strap according to the magnetic field data within the second preset time period starting from the strap insertion moment and before the strap insertion moment and the change trend of the magnetic field data comprises: Acquire the maximum value and the minimum value of the magnetic field data on a second preset axis within the second preset time period starting from the moment when the strap is inserted and before the moment when the strap is inserted; wherein the second preset axis is an axis other than the first preset axis; Obtaining a third difference between the maximum value and the minimum value on the second preset axis; When the third difference meets the fifth preset requirement and the change trend of the magnetic field data on the second preset axis is the second preset trend, the number of the strap is confirmed.
6. The method for identifying a strap of a wearable product according to any one of claims 1 to 5, characterized in that: After identifying the serial number of the strap according to the magnetic field data and the change trend of the magnetic field data, the method further includes: Outputting the serial number of the strap; The theme of the corresponding device is switched according to the number of the strap.
7. A device for identifying a strap of a wearable product, characterized in that: Applicable to a device including a strap, wherein a Hall sensor is provided at the main body of the device, including: A first acquisition module, used to acquire magnetic field data of the strap to be identified detected by the Hall sensor within a first preset time period; wherein the first preset time period is greater than the cumulative time period of at least two sampling periods, and the sampling period is the sampling period of the Hall sensor; A second acquisition module is used to obtain the change trend of the magnetic field data; An identification module, used to identify the serial number of the strap according to the magnetic field data and the change trend of the magnetic field data; After acquiring the magnetic field data of the strap to be identified detected by the Hall sensor within the first preset time period, the method further includes: Performing sliding mean filtering on the magnetic field data and obtaining filtered data; Acquire a first difference between the magnetic field data and the filtered data; Performing extreme value detection on the first difference and obtaining a result of the extreme value detection; In the case where the result of the extreme value detection meets the first preset requirement, determining the candidate insertion time of the to-be-identified bandage; wherein the first preset requirement is determined according to the actual change amount of the magnetic field data when the bandage is inserted and the change amount of the magnetic field data when there is interference of a preset intensity; Correspondingly, the second acquisition module is used for: Acquire the change trend of the magnetic field data within a second preset time period; wherein the second preset time period is the time period starting from the candidate insertion time and before the candidate insertion time; The identification module is used for: The number of the strap is identified according to the magnetic field data within the second preset time period and a change trend of the magnetic field data.
8. A wearable product, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for identifying a strap of a wearable product as claimed in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying a strap of a wearable product according to any one of claims 1 to 6 are implemented.
