Ball beating counting method and system based on motion sensor and storage medium

By using motion sensors and feature extraction models in hand wearable devices, the automation and accuracy of ball counting is achieved, and the errors and inefficiency of manual statistics in the prior art are solved.

CN120046640APending Publication Date: 2025-05-27SHENZHEN JIDONG FUTURE INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510069239.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing ball counting methods rely on manual statistics and are prone to errors, resulting in inaccurate data statistics, low efficiency and waste of human resources.

Method used

Using a motion sensor-based method, by setting a motion sensor in the hand wearable device, the hand movement data during the ball slap is obtained, and the trained feature extraction model is used to perform the ball slap feature extraction process to determine the number of effective ball slap features, thereby realizing automatic and accurate counting of the ball slap process.

Benefits of technology

Automatic and accurate counting of the ball-boarding process is realized, which avoids manual statistics errors, improves statistical efficiency, and saves human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120046640A_ABST
    Figure CN120046640A_ABST
Patent Text Reader

Abstract

The invention discloses a ball beating counting method and system based on a motion sensor and a storage medium. The ball beating counting method based on the motion sensor comprises the following steps: acquiring hand motion data in a ball beating process through the motion sensor; through a trained feature extraction model, ball patting feature extraction processing is carried out on the hand motion data, ball patting features of the hand motion data and the confidence coefficient of the ball patting features are obtained, and the feature extraction model is obtained through training sample data during ball patting; determining the number of effective ball beating features based on the confidence of the ball beating features; and determining a count value of the ball beating process based on the number of the effective ball beating features. According to the method, the problems of inaccurate data statistics, low statistical efficiency and waste of human resources caused by errors easily caused by manual statistics in the existing method can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fitness sports, and particularly relates to a method, system and storage medium for counting the number of times of dribbling a ball based on a motion sensor. Background Art

[0002] With the popularization of the national fitness campaign, people's awareness of fitness has been continuously improved, and more and more people pay attention to the rationality and health of sports. Dribbling a ball is a beneficial activity for human health. It can not only promote the coordination of hand-eye movements, enhance physical fitness, but also promote the balance of the left and right brains, and cultivate good qualities such as endurance and perseverance. Therefore, such competition games are often organized in various places. However, during the process of dribbling a ball, a special person is needed to count. With a large number of participants in the competition, counting each person will be very time-consuming. Moreover, sometimes when the dribbling speed is fast or people's attention is not concentrated, it is very easy to make counting mistakes. Therefore, there is an urgent need for a method for counting the number of times of dribbling a ball based on a motion sensor to solve the problems existing in the existing methods, such as easy mistakes in manual statistics, inaccurate data statistics, low statistical efficiency, and waste of human resources. Summary of the Invention

[0003] The present invention provides a method for counting the number of times of dribbling a ball based on a motion sensor, aiming to solve the problems existing in the existing methods, such as easy mistakes in manual statistics, inaccurate data statistics, low statistical efficiency, and waste of human resources, and to realize automatic and accurate counting of dribbling a ball.

[0004] To achieve the above object, the method for counting the number of times of dribbling a ball based on a motion sensor proposed by the present invention, the motion sensor is arranged in a hand wearable device, and the motion sensor is used to collect hand motion data corresponding to the hand wearable device. The method includes:

[0005] Obtaining hand motion data during the process of dribbling a ball through the motion sensor;

[0006] Performing dribbling feature extraction processing on the hand motion data through a trained feature extraction model to obtain the dribbling features of the hand motion data and the confidence level of the dribbling features, and the feature extraction model is trained through sample data during dribbling a ball;

[0007] Determining the number of effective dribbling features based on the confidence level of the dribbling features;

[0008] Determining the count value of the dribbling process based on the number of effective dribbling features.

[0009] Optionally, the feature extraction model includes an adaptive sliding window, at least one feature operator, and a classifier. The length and step size of the adaptive sliding window vary adaptively. The feature operator and the classifier are trained. Extracting the dribbling feature of the hand movement data through the trained feature extraction model to obtain the dribbling feature of the hand movement data includes:

[0010] Inputting the hand movement data into the dribbling feature extraction model;

[0011] Performing sliding window processing on the hand movement data through the adaptive sliding window to obtain multiple segments of hand movement sub-data;

[0012] Performing feature calculation on multiple segments of the hand movement sub-data through at least one of the feature operators to obtain the eigenvalue corresponding to each of the hand movement sub-data, and each of the hand movement sub-data corresponds to at least one eigenvalue;

[0013] Performing classification processing on each of the eigenvalues through the classifier to obtain the dribbling feature of the hand movement data.

[0014] Optionally, before performing sliding window processing on the hand movement data through the adaptive sliding window to obtain multiple segments of hand movement sub-data, the method further includes:

[0015] Preprocessing the hand movement data, where the preprocessing includes at least one of removing outliers and smoothing;

[0016] Calculating the standard deviation of the preprocessed hand movement data;

[0017] If the standard deviation is greater than a preset standard deviation threshold, performing sliding window processing on the hand movement data through the adaptive sliding window;

[0018] If the standard deviation is less than or equal to the preset standard deviation threshold, directly performing feature calculation on the hand movement data to obtain the overall eigenvalue corresponding to the hand movement data, and performing classification processing on the overall eigenvalue through the classifier to obtain the dribbling feature of the hand movement data.

[0019] Optionally, performing sliding window processing on the hand movement data through the adaptive sliding window to obtain multiple segments of hand movement sub-data includes:

[0020] Initializing the sliding window parameters of the adaptive sliding window to obtain an initial sliding window and an initial sliding step size;

[0021] Performing sliding window processing starting from the starting point of the hand movement data through the initial sliding window and the initial sliding step size;

[0022] During the sliding window processing, based on the sliding window of the current step, extract the data segment of the current step;

[0023] Based on the data segment of the current step, adaptively adjust the window length and sliding step size of the sliding window to obtain the adaptive sliding window;

[0024] Perform sliding window processing on the hand movement data based on the adaptive sliding window to obtain multiple segments of hand movement sub-data.

[0025] Optionally, the step of adaptively adjusting the window length and sliding step size of the sliding window based on the data segment of the current step to obtain the adaptive sliding window includes:

[0026] Predict the change amplitude and periodicity of the data segment of the current step to obtain the change amplitude prediction value and periodicity prediction value of the data segment of the current step;

[0027] Based on the change amplitude prediction value and periodicity prediction value, adaptively adjust the window length and sliding step size of the sliding window to obtain the adaptive sliding window.

[0028] Optionally, the step of adaptively adjusting the window length and sliding step size of the sliding window based on the change amplitude prediction value and the periodicity prediction value to obtain the adaptive sliding window includes:

[0029] If the change amplitude prediction value is greater than a preset first change amplitude threshold, increase the window length of the sliding window and adjust the sliding step size to 0 to obtain the adaptive sliding window of the current step;

[0030] If the change amplitude prediction value is less than a preset second change amplitude threshold, decrease the window length of the sliding window and adjust the sliding step size to 0 to obtain the adaptive sliding window of the current step, where the first change amplitude threshold is greater than the second change amplitude threshold;

[0031] If the change amplitude prediction value is greater than the second change amplitude threshold and less than the first change amplitude threshold, determine the adaptive adjustment of the sliding step size of the sliding window based on the periodicity prediction value to obtain the adaptive sliding window.

[0032] Optionally, the step of determining the adaptive adjustment of the sliding step size of the sliding window based on the periodicity prediction value to obtain the adaptive sliding window includes:

[0033] If the periodicity prediction value is true, predict the period interval of the data segment of the current step, and adjust the sliding step size based on the period interval to obtain the adaptive sliding window of the next step. The larger the period interval, the larger the sliding step size;

[0034] If the periodic prediction value is false, obtain the sliding step size of the previous step, use the sliding step size of the previous step as the sliding step size of the next step, and obtain the adaptive sliding window of the next step. The larger the periodic interval, the larger the sliding step size.

[0035] Optionally, determining the number of effective dribbling features based on the confidence of the dribbling features includes:

[0036] If the confidence of the dribbling feature is greater than a preset confidence threshold, determine that the dribbling feature is an effective dribbling feature;

[0037] Count the number of the effective dribbling features.

[0038] The present invention also provides a dribbling counting system based on a motion sensor. The dribbling counting system based on a motion sensor includes: a server and a motion sensor disposed in a hand wearable device, and the processor is communicatively connected to the motion sensor;

[0039] The motion sensor is disposed in the hand wearable device, and the motion sensor is configured to collect hand motion data corresponding to the hand wearable device and transmit the collected motion data to the server;

[0040] When the server executes, it implements the steps of the dribbling counting method based on a motion sensor provided in the embodiment of the present invention.

[0041] The present invention also provides a dribbling counting device based on a motion sensor. The dribbling counting device based on a motion sensor includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the dribbling counting method based on a motion sensor.

[0042] The present invention also provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the steps of the dribbling counting method based on a motion sensor.

[0043] The technical solution of the method for counting the number of times of bouncing a ball based on a motion sensor in the present invention is as follows: obtaining the hand motion data during the process of bouncing a ball through the motion sensor; performing feature extraction processing on the hand motion data through a trained feature extraction model to obtain the bouncing ball features of the hand motion data and the confidence of the bouncing ball features, where the feature extraction model is trained through sample data during the bouncing of the ball; determining the number of effective bouncing ball features based on the confidence of the bouncing ball features; and determining the count value of the bouncing ball process based on the number of effective bouncing ball features. The present invention obtains the hand motion data during the process of bouncing a ball through the motion sensor, performs feature extraction processing on the hand motion data through a trained feature extraction model to obtain the bouncing ball features of the hand motion data and the confidence of the bouncing ball features, determines the number of effective bouncing ball features according to the confidence of the bouncing ball features, and uses the number of effective bouncing ball features to determine the count value of the bouncing ball process, which can solve the problems existing in the existing methods, such as easy mistakes in manual statistics, inaccurate data statistics, low statistical efficiency, and waste of human resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic flowchart of the method for counting the number of times of bouncing a ball based on a motion sensor provided by an embodiment of the present invention;

[0045] Figure 2 It is a schematic structural diagram of the device for counting the number of times of bouncing a ball based on a motion sensor provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the protection scope of the present invention.

[0047] It should be noted that all the directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.

[0048] It should also be noted that when an element is referred to as "fixed to" or "disposed on" another element, it can be directly on the other element or there may be an intermediate element at the same time. When an element is referred to as "connected" to another element, it can be directly connected to the other element or there may be an intermediate element at the same time.

[0049] In addition, the descriptions involving "first", "second", etc. in the present invention are only for descriptive purposes and should not be construed as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments may be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0050] Refer to Figure 1 , Figure 1 which is a schematic flowchart of a ball-patting counting method based on a motion sensor provided by an embodiment of the present invention.

[0051] In this embodiment, the above-mentioned motion sensor is disposed in a hand-wearable device. The motion sensor is used to collect hand motion data corresponding to the hand-wearable device. The ball-patting counting method based on the motion sensor includes the following steps:

[0052] Step S10, obtain hand motion data during the ball-patting process through the motion sensor.

[0053] In this embodiment, the above-mentioned hand-wearable device can capture and record the motion data of the hand or the racket in real time.

[0054] The above-mentioned hand motion data may be motion data such as the acceleration, amplitude, and vibration frequency of the hand.

[0055] The above-mentioned motion sensor can capture and record the hand motion data during the ball-patting process, such as speed, acceleration, direction, vibration frequency, etc., and can monitor the hand motion state in real time and continuously monitor the change of the hand motion state.

[0056] It should be noted that the hand-wearable device can be fixed on the wrist of the athlete or on the arm of the athlete, etc. During the athlete's ball-patting process, the motion sensor of the hand-wearable device will monitor and record the hand motion data during the ball-patting process in real time.

[0057] Step S20, perform ball-patting feature extraction processing on the hand motion data through a trained feature extraction model to obtain the ball-patting features of the hand motion data and the confidence level of the ball-patting features.

[0058] In this embodiment, the above-mentioned feature extraction model is trained through sample data during ball-patting.

[0059] The above-mentioned feature extraction model can be a feature extraction model constructed based on machine learning or deep learning, such as a convolutional neural network (CNN), a recurrent neural network (RNN), etc.

[0060] The above-mentioned sample data during ball-patting includes data such as the amplitude, strength, and acceleration of the hand when hitting the ball, and the corresponding data is labeled with the ball-patting action. Also, data such as the amplitude, strength, and acceleration of the hand when not hitting the ball is included, and the corresponding data is labeled with the ball-patting action.

[0061] The above-mentioned ball-patting feature extraction process can be understood as extracting the motion information during ball-patting from the hand motion data, which is used to describe and distinguish different features.

[0062] The above-mentioned ball-patting features include feature information such as the angle, strength, and speed of the hand during ball-patting.

[0063] The confidence level of the above-mentioned ball-patting features can be understood as the degree of certainty of the model's prediction result for the ball-patting features. The confidence level indicates how likely the model thinks the prediction of the ball-patting features is correct.

[0064] It should be noted that the trained feature extraction model can identify the hand motion data features of the ball-patting action, such as sudden changes in acceleration, vibration frequency and amplitude, etc.

[0065] Step S30, determine the number of effective ball-patting features based on the confidence level of the ball-patting features.

[0066] In this embodiment, when the confidence level of the ball-patting feature is greater than the preset ball-patting feature confidence level threshold, it is determined that the ball-patting feature is an effective ball-patting feature; when the confidence level of the ball-patting feature is less than the preset ball-patting feature confidence level threshold, it is determined that the ball-patting feature is an ineffective ball-patting feature.

[0067] The above-mentioned preset ball-patting feature confidence level threshold is pre-set by the system and is used to measure whether the ball-patting feature is effective.

[0068] It should be noted that whenever an effective ball-patting feature is detected, a +1 count is performed until the last effective ball-patting feature is detected, and the count value is the number of effective ball-patting features.

[0069] Step S40, determine the count value of the ball-patting process based on the number of effective ball-patting features.

[0070] In this embodiment, statistics can be performed according to the number of detected effective ball-patting features to obtain a quantitative representation method. For example, when 10 effective ball-patting features are detected, the count value can be set to 10; when 50 effective ball-patting features are detected, the count value can be set to 50.

[0071] In this embodiment, the present invention uses a motion sensor to capture and record the motion data of the hand or racket in real time, and uses a feature extraction model to identify the features of an effective ball-patting action, and automatically counts and displays the number of ball-patting times, providing instant feedback to athletes and coaches.

[0072] It should be noted that the present invention can also be combined with other motion analysis systems to provide more comprehensive training data and performance evaluation. For example, the intensity, speed, rhythm, etc. of ball-patting can be analyzed. When an athlete is practicing ball-patting, the sensor device will transmit data to the connected smart device or computer in real time to help the athlete optimize technical movements and improve training effects. The present invention can also be applied to the joint recognition of ball-patting actions by motion sensors inside the ball and motion sensors inside the device. By jointly recognizing ball-patting actions by combining the motion state of the ball collected by the motion sensor inside the ball with the motion state of the human body collected by the motion sensor inside the device, the recognition accuracy can be improved.

[0073] To implement the ball-patting counting method based on a motion sensor in this embodiment, the hand motion data during the ball-patting process is obtained through the motion sensor; through a trained feature extraction model, the ball-patting feature extraction process is performed on the hand motion data to obtain the ball-patting feature of the hand motion data and the confidence of the ball-patting feature, and the feature extraction model is trained through sample data during ball-patting; the number of effective ball-patting features is determined based on the confidence of the ball-patting feature; based on the number of effective ball-patting features, the count value of the ball-patting process is determined. The present invention obtains the hand motion data during the ball-patting process through the motion sensor, performs the ball-patting feature extraction process on the hand motion data through a trained feature extraction model to obtain the ball-patting feature of the hand motion data and the confidence of the ball-patting feature, determines the number of effective ball-patting features according to the confidence of the ball-patting feature, and uses the number of effective ball-patting features to determine the count value of the ball-patting process, which can solve the problems existing in the existing method that manual statistics are prone to errors, resulting in inaccurate data statistics, low statistical efficiency, and waste of human resources.

[0074] It can be understood that in the specific implementation of this application, relevant data such as user data, control data, and action data are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data, as well as the training and use of various models, need to comply with relevant laws, regulations, and standards in relevant countries and regions.

[0075] Optionally, the feature extraction model includes an adaptive sliding window, at least one feature operator, and a classifier. The length and step size of the adaptive sliding window vary adaptively. The feature operator and the classifier are pre-trained. In the step of performing dribbling feature extraction on the hand movement data through the pre-trained feature extraction model to obtain the dribbling features of the hand movement data, the hand movement data can be input into the dribbling feature extraction model; the hand movement data is processed by the adaptive sliding window to obtain multiple segments of hand movement sub-data; the multiple segments of hand movement sub-data are subjected to feature calculation by at least one feature operator to obtain the eigenvalue corresponding to each hand movement sub-data; and the classifier classifies each eigenvalue to obtain the dribbling features of the hand movement data.

[0076] In the embodiment of the present invention, each hand movement sub-data corresponds to at least one eigenvalue.

[0077] The above-mentioned dribbling feature extraction model is obtained by training with sample data during dribbling, and can be a feature extraction model constructed based on machine learning or deep learning, such as a convolutional neural network (CNN), a recurrent neural network (RNN), etc.

[0078] The above-mentioned adaptive sliding window can be understood as a method for dynamically adjusting the window size, which optimizes the window size according to the change of data. For example, a smaller window is used when the data changes rapidly, and a larger window is used when the data changes slowly, so as to better capture the local features in the data and improve the accuracy of feature extraction.

[0079] The above-mentioned feature operator is a method for calculating the features of hand movement sub-data. The feature operator is pre-trained and can be directly used for the local area extracted by the adaptive sliding window to calculate the feature representation of this area. Specifically, the multiple segments of hand movement sub-data are subjected to feature calculation by at least one pre-trained feature operator to obtain the eigenvalue corresponding to each hand movement sub-data, and each hand movement sub-data corresponds to at least one eigenvalue.

[0080] The above-mentioned classifier is a model for classifying an image according to the extracted features. The classifier is pre-trained and can receive the feature representation calculated by the feature operator as input and output the class label of the image. The above-mentioned classifier can be a support vector machine (SVM), a convolutional neural network (CNN), etc.

[0081] The above-mentioned hand movement data is obtained by real-time monitoring of a motion sensor, and can be motion data such as the acceleration, amplitude, and vibration frequency of the hand.

[0082] Specifically, first, the hand movement data is slid by an adaptive sliding window at a certain step size or window size, moving one step size or window size each time to obtain a new sub-dataset; then each sub-dataset is analyzed to extract the feature information therein, so that multiple consecutive hand movement sub-datasets and their corresponding feature representations can be obtained; then, at least one feature operator is used to calculate the hand movement sub-data to extract the feature values corresponding to each hand movement sub-data; finally, the extracted feature values are input into a classifier for classification processing, and the classifier classifies the dribbling features of the hand movement data according to the pre-set categories or labels, thereby obtaining the final dribbling feature representation.

[0083] Optionally, before the step of obtaining multiple segments of hand movement sub-data by sliding window processing of the hand movement data through an adaptive sliding window, the hand movement data can also be preprocessed; calculate the standard deviation of the preprocessed hand movement data; if the standard deviation is greater than the pre-set standard deviation threshold, then perform sliding window processing on the hand movement data through an adaptive sliding window; if the standard deviation is less than or equal to the pre-set standard deviation threshold, directly perform feature calculation on the hand movement data to obtain the overall feature value corresponding to the hand movement data, and perform classification processing on the overall feature value through a classifier to obtain the dribbling feature of the hand movement data.

[0084] In the embodiment of the present invention, the above preprocessing includes at least one of removing outliers and smoothing processing. The above removing outliers is to remove the outliers in the data, and the above smoothing processing is a processing method for reducing data noise. The purpose of the above preprocessing is to improve the quality of the data for better subsequent analysis.

[0085] The above standard deviation is a statistic that measures the degree of data dispersion and can reflect the fluctuation of the hand movement data.

[0086] The above pre-set standard deviation threshold is a standard deviation threshold pre-set by the system for judging whether the standard deviation of the hand movement data is too large.

[0087] The above adaptive sliding window can optimize the window size according to the change of the data. For example, a smaller window is used when the data changes rapidly, and a larger window is used when the data changes slowly, so as to better capture the local features in the data and improve the accuracy of feature extraction.

[0088] Further, if the standard deviation of the hand movement data is greater than a preset standard deviation threshold, the data fluctuates greatly and there may be a lot of interference. At this time, an adaptive sliding window can be used to perform sliding window processing on the hand movement data. The adaptive sliding window can dynamically adjust the size and position of the sliding window according to the local characteristics of the hand movement data to smooth the data, remove noise, or extract key information. For example, we can use a smaller sliding window to smooth the unstable data at the beginning and end of the gesture, or use a larger sliding window to extract the characteristic information of the gesture.

[0089] The above feature calculation can be understood as a process of extracting useful features from the hand movement data, and these features can represent the behavior patterns of the hand movement data.

[0090] Further, if the standard deviation of the hand movement data is less than or equal to the preset standard deviation threshold, the data is relatively stable without obvious fluctuations or anomalies, and the feature calculation can be directly performed on the hand movement data to obtain the overall feature value corresponding to the hand movement data.

[0091] The purpose of the above classifier is to further screen and confirm which feature values represent the features of the ball - patting action, that is, to determine whether these feature values belong to the category of "ball - patting". Through the classification process, the final ball - patting features of the hand movement data can be obtained, and these ball - patting features are the key information related to the ball - patting action recognized by the model.

[0092] Optionally, in the step of performing sliding window processing on the hand movement data through an adaptive sliding window to obtain multiple segments of hand movement sub - data, the sliding window parameters of the adaptive sliding window can be initialized to obtain an initial sliding window and an initial sliding step; starting from the starting point of the hand movement data, sliding window processing is performed through the initial sliding window and the initial sliding step; during the sliding window processing, the data segment of the current step is extracted based on the sliding window of the current step; based on the data segment of the current step, the window length and the sliding step of the sliding window are adaptively adjusted to obtain an adaptive sliding window; and sliding window processing is performed on the hand movement data based on the adaptive sliding window to obtain multiple segments of hand movement sub - data.

[0093] In the embodiment of the present invention, the above initialization can be understood as a process of initializing the sliding window parameters of the adaptive sliding window before the system starts running. Initialization can ensure that the system is in a known and controllable state from the very beginning, avoiding potential errors and problems.

[0094] The above sliding window parameters include parameters such as window size and window sliding step. After initializing the sliding window parameters, the initial sliding window and the initial sliding step are obtained through calculation. The sliding window can be understood as a subset of data used for preliminary exploration; the sliding step can be understood as the unit length of the boundary change each time the window is moved. For example, if the window size is 5 and the sliding step is 1, then after each slide, the elements within the window will move one position to the right or left as a whole.

[0095] Taking the starting point of the hand movement data as the starting point of the sliding window, using the initial sliding window size as the window width, and gradually moving the window within the initial sliding step, the eigenvalue of the data contained in each window is calculated in turn. By adjusting the sizes of the initial sliding window and the initial sliding step, the balance between computational complexity and accuracy can be controlled.

[0096] The above data segment of the current step can be understood as a subset of data between the left endpoint and the right endpoint of the sliding window. Assuming the current step is i, the left endpoint of the sliding window is i - w / 2 (where w is the window length), and the right endpoint is i + w / 2; then, the data segment of the current step is extracted, that is, the subset of data between the left endpoint and the right endpoint.

[0097] Furthermore, according to the data segment of the current step, the length of the sliding window and the sliding step are dynamically adjusted so that the window size and step are more suitable for the current data situation. For example, when the data changes relatively smoothly, the window length can be increased and the step can be decreased to better capture local features; while when the data changes relatively violently, the window length can be decreased and the step can be increased to avoid overly sensitive response to noise. By adaptively adjusting the sliding window, the computational efficiency and accuracy can be improved, and the dependence on parameter settings can be reduced.

[0098] Even further, the hand movement data can be first divided into several continuous segments according to time or spatial relationships, and then the adaptive sliding window algorithm is applied to each segment to extract the data segment of the current segment, thereby obtaining multiple segments of hand movement sub-data.

[0099] Optionally, in the step of adaptively adjusting the window length and the sliding step of the sliding window based on the data segment of the current step to obtain an adaptive sliding window, the change amplitude and periodicity of the data segment of the current step can be predicted to obtain the predicted value of the change amplitude and the predicted value of the periodicity of the data segment of the current step; based on the predicted value of the change amplitude and the predicted value of the periodicity, the window length and the sliding step of the sliding window are adaptively adjusted to obtain an adaptive sliding window.

[0100] In this embodiment, statistics such as mean and variance can be used to calculate the change amplitude of the data of the data segment of the previous step, and methods such as autocorrelation function and Fourier transform can be used to calculate the periodicity of the data segment of the previous step.

[0101] Furthermore, the predicted change amplitude value and the periodic prediction value of the current step's data segment can better understand the characteristics and change trends of the data, thereby dynamically adjusting the length of the sliding window and the sliding step size, so that the window size and the moving distance can better adapt to the changes and local characteristics of the data. Through adaptive adjustment, the effect and accuracy of the sliding window processing can be improved, and the information loss and errors caused by the fixed window length and sliding step size can be avoided.

[0102] Optionally, in the step of adaptively adjusting the window length and the sliding step size of the sliding window based on the predicted change amplitude value and the periodic prediction value to obtain an adaptive sliding window, if the predicted change amplitude value is greater than a preset first change amplitude threshold, increase the window length of the sliding window and adjust the sliding step size to 0 to obtain the adaptive sliding window of the current step; if the predicted change amplitude value is less than a preset second change amplitude threshold, decrease the window length of the sliding window and adjust the sliding step size to 0 to obtain the adaptive sliding window of the current step; if the predicted change amplitude value is greater than the second change amplitude threshold and less than the first change amplitude threshold, determine the sliding step size for adaptively adjusting the sliding window based on the periodic prediction value to obtain the adaptive sliding window.

[0103] In this embodiment, the above-mentioned first change amplitude threshold is greater than the second change amplitude threshold.

[0104] The above-mentioned change amplitude threshold is a preset threshold for determining whether to adjust the length of the sliding window. When the predicted change amplitude value is greater than the preset first change amplitude threshold, it indicates that the data changes greatly, and it is necessary to increase the length of the sliding window to capture more information; when the predicted change amplitude value is less than the preset second change threshold, it indicates that the data changes little, and the length of the sliding window can be reduced to reduce the calculation amount; when the predicted change amplitude value is greater than the second change amplitude threshold and less than the first change amplitude threshold, it indicates that the data changes neither too much nor too little, and it is necessary to adjust the sliding step size according to the periodic prediction value to better capture the periodic components in the data.

[0105] Adjusting the sliding step size to 0 can be understood as keeping the sliding step size unchanged while adjusting the size of the sliding window, which can ensure continuous observation of the data while expanding the window length.

[0106] The above-mentioned adaptive sliding window can optimize the window size according to the changes in the data.

[0107] Optionally, in the step of determining the sliding step size of the adaptive sliding window based on the periodic prediction value to obtain the adaptive sliding window, if the periodic prediction value is true, then predict the periodic interval of the data segment at the current step, and adjust the sliding step size based on the periodic interval to obtain the adaptive sliding window for the next step. The larger the periodic interval, the larger the sliding step size. If the periodic prediction value is false, then obtain the sliding step size of the previous step, and use the sliding step size of the previous step as the sliding step size for the next step to obtain the adaptive sliding window for the next step. The larger the periodic interval, the larger the sliding step size.

[0108] In this embodiment, the larger the above-mentioned periodic interval, the larger the sliding step size. This means that if a larger periodic interval is predicted, then a larger sliding step size will be used to move the adaptive sliding window in order to better capture the periodic components of the signal.

[0109] The above-mentioned periodic interval can be understood as the time length between two data points with the same phase. For example, in a periodic signal with a period of 10 time points, the time length between two adjacent data points with the same phase is the periodic interval.

[0110] Specifically, if the prediction value is true, it indicates that the data has periodic characteristics, and it is necessary to predict the periodic interval of the current data segment and adjust the sliding step size according to the predicted periodic interval. If the prediction value is false, then use the sliding step size of the previous step as the sliding step size for the next step, which can enable the adaptive sliding window to better capture the periodic components of the signal, thereby performing more accurate analysis and processing.

[0111] Optionally, in the step of determining the number of effective dribbling features based on the confidence of the dribbling features, if the confidence of the dribbling feature is greater than the preset confidence threshold, then determine the dribbling feature as an effective dribbling feature; count the number of effective dribbling features.

[0112] In this embodiment, the above-mentioned preset confidence threshold is a confidence threshold preset by the system and is used to measure whether the dribbling feature is effective.

[0113] Further, when the confidence of the dribbling feature is greater than the preset dribbling feature confidence threshold, then determine the dribbling feature as an effective dribbling feature; when the confidence of the dribbling feature is less than the preset dribbling feature confidence threshold, then determine the dribbling feature as an ineffective dribbling feature and do not participate in the counting.

[0114] It should be noted that whenever an effective dribbling feature is detected, the count is incremented by 1. Until the last effective dribbling feature is detected, the finally counted number is the number of effective dribbling features.

[0115] The present invention also provides a ball-patting counting system based on a motion sensor. The ball-patting counting system based on a motion sensor includes: a server, and a motion sensor disposed in a wearable device, with a communication connection between the processor and the motion sensor;

[0116] The motion sensor is disposed in a hand wearable device, and is configured to collect hand motion data corresponding to the hand wearable device and transmit the collected motion data to the server;

[0117] When the server executes, it performs the steps of the ball-patting counting method based on a motion sensor provided in the embodiments of the present invention.

[0118] The present invention also provides a ball-patting counting device based on a motion sensor. Refer to Figure 2 , Figure 2 which is a schematic structural diagram of a ball-patting counting device based on a motion sensor in a hardware operating environment related to the solution of the embodiments of the present invention.

[0119] The ball-patting counting device based on a motion sensor in the embodiments of the present invention may be a computing device such as a desktop computer, a notebook, a palm computer, and a server. As shown in Figure 2 , the ball-patting counting device based on a motion sensor may include: a processor 1001 (such as a CPU), a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection communication between these components. The user interface 1003 may include a display screen (Display) and an input unit, such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0120] Those skilled in the art can understand that Figure 2 the structural diagram of the ball-patting counting device based on a motion sensor shown in

[0121] does not limit the ball-patting counting device based on a motion sensor, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 2 As shown in

[0122] In Figure 2In the described ball - patting counting device based on a motion sensor, the network interface 1004 is mainly used to connect to the background server and conduct data communication with the background server; the user interface 1003 is mainly used to connect to the client (user side) and conduct data communication with the client; and the processor 1001 can be used to call the computer program stored in the memory 1005. When the computer program is called and executed by the processor 1001, the steps of the above - mentioned ball - patting counting method based on a motion sensor are implemented.

[0123] Based on the computer program proposed in the foregoing embodiments, the present invention also proposes a storage medium. The storage medium stores a computer program, and when the computer program is executed by a controller, the ball - patting counting method based on a motion sensor described in the foregoing embodiments is implemented.

[0124] For the ball - patting counting device and storage medium based on a motion sensor of the present invention, since they can both implement the steps of the above - mentioned ball - patting counting method based on a motion sensor, they at least have all the beneficial effects brought by the technical solutions of the above - mentioned embodiments of the ball - patting counting method based on a motion sensor, which will not be elaborated one by one here.

[0125] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of the device or module can be in an electrical, mechanical or other form.

[0126] The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, they can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] In addition, in each embodiment of the present invention, the functional modules can be integrated in one processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The above - mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0128] When the integrated module is implemented in the form of a software functional module 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 invention, in essence, 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. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0129] The above are only partial or preferred embodiments of the present invention. Neither the text nor the drawings can limit the scope of protection of the present invention. Any equivalent structural transformation made by using the content of the specification and drawings of the present invention under the overall concept of the present invention, or any direct / indirect application in other related technical fields, is included in the scope of protection of the present invention.

Claims

1. A ball counting method based on motion sensor, characterized in that: The motion sensor is provided in the hand wearable device, and the motion sensor is used to collect hand motion data corresponding to the hand wearable device. The method includes: Acquiring hand motion data during the ball bouncing process through the motion sensor; By using a trained feature extraction model, the hand motion data is subjected to a ball bouncing feature extraction process to obtain a ball bouncing feature of the hand motion data and a confidence level of the ball bouncing feature, wherein the feature extraction model is trained using sample data during ball bouncing; Determining the number of valid ball-bouncing features based on the confidence of the ball-bouncing features; Based on the number of the effective ball-bouncing features, a count value of the ball-bouncing process is determined.

2. The ball counting method based on motion sensor according to claim 1 is characterized in that: The feature extraction model includes an adaptive sliding window, at least one feature operator and a classifier, the length and step size of the adaptive sliding window are adaptively changed, the feature operator and the classifier are trained, and the hand motion data is subjected to ball bouncing feature extraction processing by the trained feature extraction model to obtain the ball bouncing features of the hand motion data, including: Inputting the hand motion data into the ball bouncing feature extraction model; Performing sliding window processing on the hand motion data through the adaptive sliding window to obtain multiple segments of hand motion sub-data; Performing feature calculation on the multiple segments of the hand motion sub-data by using at least one feature operator to obtain feature values ​​corresponding to the respective hand motion sub-data, wherein each of the hand motion sub-data corresponds to at least one feature value; The classifier is used to classify each of the feature values ​​to obtain the ball-bouncing features of the hand motion data.

3. The ball counting method based on motion sensor according to claim 2 is characterized in that: Before performing sliding window processing on the hand motion data through the adaptive sliding window to obtain multiple segments of hand motion sub-data, the method further includes: Preprocessing the hand motion data, wherein the preprocessing includes at least one of removing outliers and smoothing; Calculating the standard deviation of the preprocessed hand motion data; If the standard deviation is greater than a preset standard deviation threshold, performing sliding window processing on the hand motion data through the adaptive sliding window; If the standard deviation is less than or equal to a preset standard deviation threshold, feature calculation is directly performed on the hand motion data to obtain an overall feature value corresponding to the hand motion data, and the overall feature value is classified and processed by the classifier to obtain the ball-bouncing features of the hand motion data.

4. The ball counting method based on motion sensor according to claim 2, characterized in that: The step of performing sliding window processing on the hand motion data through the adaptive sliding window to obtain multiple segments of hand motion sub-data includes: Initializing sliding window parameters of the adaptive sliding window to obtain an initial sliding window and an initial sliding step size; Performing sliding window processing starting from the starting point of the hand motion data by using the initial sliding window and the initial sliding step size; In the sliding window processing, the data segment of the current step is extracted based on the sliding window of the current step; Based on the data segment of the current step, adaptively adjust the window length and the sliding step length of the sliding window to obtain the adaptive sliding window; The hand motion data is subjected to sliding window processing based on the adaptive sliding window to obtain multiple segments of hand motion sub-data.

5. The ball counting method based on motion sensor according to claim 4 is characterized in that: The step of adaptively adjusting the window length and the sliding step length of the sliding window based on the data segment of the current step to obtain the adaptive sliding window includes: Predicting the change amplitude and periodicity of the data segment of the current step to obtain a change amplitude prediction value and a periodicity prediction value of the data segment of the current step; Based on the change amplitude prediction value and the periodicity prediction value, the window length and sliding step size of the sliding window are adaptively adjusted to obtain the adaptive sliding window.

6. The ball counting method based on motion sensor according to claim 5, characterized in that: The adaptively adjusting the window length and the sliding step length of the sliding window based on the change amplitude prediction value and the periodicity prediction value to obtain the adaptive sliding window includes: If the predicted change amplitude value is greater than a preset first change amplitude threshold, the window length of the sliding window is increased, and the sliding step length is adjusted to 0 to obtain the adaptive sliding window of the current step; If the predicted change amplitude value is less than a preset second change amplitude threshold, the window length of the sliding window is reduced, and the sliding step length is adjusted to 0, to obtain the adaptive sliding window of the current step, and the first change amplitude threshold is greater than the second change amplitude threshold; If the change amplitude prediction value is greater than the second change amplitude threshold and less than the first change amplitude threshold, then based on the periodic prediction value, determine the sliding step size of the sliding window for adaptively adjusting the sliding window to obtain the adaptive sliding window.

7. The ball counting method based on motion sensor according to claim 6, characterized in that: The step of adaptively adjusting the sliding step of the sliding window based on the periodic prediction value to obtain the adaptive sliding window includes: If the periodic prediction value is true, predict the periodic interval of the data segment of the current step, adjust the sliding step length based on the periodic interval, and obtain the adaptive sliding window of the next step, the larger the periodic interval, the larger the sliding step length; If the periodic prediction value is false, the sliding step length of the previous step is obtained, and the sliding step length of the previous step is used as the sliding step length of the next step to obtain the adaptive sliding window of the next step. The larger the periodic interval, the larger the sliding step length.

8. The ball bouncing counting method based on a motion sensor according to any one of claims 1 to 7, characterized in that: The determining the number of valid ball-bouncing features based on the confidence of the ball-bouncing features comprises: If the confidence of the ball-bouncing feature is greater than a preset confidence threshold, determining that the ball-bouncing feature is a valid ball-bouncing feature; The number of the effective ball-bouncing features is counted.

9. A ball counting system based on motion sensor, characterized in that: The motion sensor-based ball-bouncing counting system comprises: a server, and a motion sensor disposed in a hand wearable device, wherein the processor is communicatively connected to the motion sensor; The motion sensor is arranged in the hand wearable device, and the motion sensor is used to collect hand motion data corresponding to the hand wearable device, and transmit the collected motion data to the server; The server executes the steps of the motion sensor-based ball counting method as described in any one of claims 1 to 8.

10. A ball counting device based on a motion sensor, characterized in that: The motion sensor-based ball-bouncing counting device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the motion sensor-based ball-bouncing counting method as described in any one of claims 1 to 8 are implemented.