Online and offline linkage intelligent calorie exchange system
By employing change point detection, conditional random field models, and Bayesian inference algorithms, the problem of inaccurate calorie calculation in group sports has been solved, achieving accurate calorie integration and transaction fairness, thereby enhancing the credibility of the overall transaction ecosystem.
Patent Information
- Application Number
- CN202511792773.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2025-12-30
AI Technical Summary
In team sports, the accumulation of calculation errors when individual devices switch sports modes leads to inaccurate calorie scores. Furthermore, the asynchronous switching times of different members cause data chaos in the group, affecting the fairness and credibility of transactions.
By identifying the moment of motion mode switching through the change point detection algorithm, fusing individual and group information by combining the conditional random field model, identifying high-influence nodes by applying the network centrality algorithm, and integrating data from members with different trust levels using the Bayesian inference method, an accurate calorie score is generated.
It accurately identifies the moment when exercise modes switch, eliminates data confusion, accurately calculates calorie consumption, improves the credibility and fairness of the transaction ecosystem, incentivizes users to choose high-quality exercise methods, and protects the rights and interests of offline merchants.
Smart Images

Figure CN121235754A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of health management and digital asset interaction technology, and more specifically, to an intelligent calorie exchange system that integrates online and offline operations. Background Technology
[0002] In online-offline integrated calorie trading systems, users accumulate calorie points by participating in online group activities (such as group fitness classes, group runs, and sports club activities), and then redeem these points for offline goods. However, existing technologies suffer from the following technical problems: accumulating calculation errors when individual devices switch exercise modes during group activities, and asynchronous switching among different members leading to data inconsistencies that affect the accuracy of calorie points and the fairness of transactions; lack of mechanisms for cross-validation of data using group synchronization and social relationships, making it impossible to identify abnormal data, resulting in false online calorie accumulation impacting the rights of offline merchants; and the failure to effectively leverage social influence to improve transaction data quality, with high-quality exercise data from key influencers failing to verify the calorie calculation results of other members, thus reducing the overall credibility of the trading ecosystem. Summary of the Invention
[0003] This invention provides an intelligent calorie exchange system that integrates online and offline operations, solving the problem of error accumulation when individual devices switch exercise modes in related technologies. It also addresses the inaccuracy of calorie calculation in group exercises and eliminates the technical problem of data chaos caused by asynchronous switching times among different members.
[0004] This invention provides a smart calorie transaction method that integrates online and offline channels, comprising: Acquire multi-source sensor data streams from participants in group sports and generate a spatiotemporal data matrix; The change point detection algorithm is used to identify the motion mode switching time of each participant and output the individual switching point sequence. By fusing individual pattern recognition results using a conditional random field model, a corrected motion pattern label sequence is output. The calorie consumption of each participant is calculated based on the corrected exercise pattern label sequence, and the calorie integral result is generated. Obtain the social relationship graph of participants in group sports and generate a social network topology graph; The network centrality algorithm is applied to identify high-influence nodes in social networks and generate trust weight vectors. Based on Bayesian inference, member data of different trust levels are integrated, and calorie calculation parameters are dynamically adjusted. The change point detection algorithm adopts a cumulative sum algorithm based on likelihood ratio. It detects abrupt changes in the distribution of sensor data by calculating the cumulative sum statistic. When the cumulative sum statistic exceeds a preset threshold, it is determined to be the moment of motion mode switching. The conditional random field model defines an energy function, which includes a node potential function and a edge potential function. The node potential function calculates the matching degree between individual features and labels, and the edge potential function calculates the consistency of labels of adjacent participants and introduces a group synchronization weight based on a dynamic time warping algorithm. The optimal motion pattern label sequence is solved by maximizing the conditional probability. The network centrality algorithm adopts the eigenvector centrality algorithm, which iteratively calculates the centrality score of each node and normalizes it to generate a trust weight vector. The Bayesian inference method uses a trust weight vector to weight and fuse the calorie calculation results of each participant, updates the posterior distribution of the exercise mode parameters through the Bayesian formula, and adjusts the calorie calculation parameters of each exercise mode according to the posterior distribution.
[0005] The generated spatiotemporal data matrix includes: Accelerometer data, gyroscope data, and heart rate sensor data are obtained from the sports equipment worn by participants in team sports. Z-score standardization was performed on data from various sensors to eliminate differences in the units and numerical ranges of data from different sensors. The multidimensional sensor data of each participant are arranged in time series to generate an N×T×D spatiotemporal data matrix, where N is the number of participants, T is the time length, and D is the sensor dimension.
[0006] Furthermore, the cumulative sum statistic of the change point detection algorithm is calculated as follows: The logarithm of the likelihood ratio of the data distribution before and after the change point is calculated for the sensor data at the current moment. This logarithm is added to the cumulative sum statistic at the previous moment. If the sum is negative, it is taken as zero; if it is positive, the value is retained. The data distribution before and after the change point is determined by the statistical characteristics of the sensor data of each movement mode in the historical group movement data. The initial value of the cumulative sum statistic is set to zero.
[0007] Furthermore, the preset threshold is determined based on the expected average running length, which represents the average number of time steps before the algorithm triggers a false alarm in the absence of change points. The preset threshold is proportional to the expected average running length, and the expected average running length is determined by statistical analysis of the movement mode switching frequency of historical group movement data.
[0008] Furthermore, the energy function of the conditional random field model includes two summations. The first summation is made over all time points and all participants' node potential functions, which is equal to the inner product of the node weight vector and the node feature function. The node feature function extracts the sensor statistical features of the participants under the current label. The second summation is made over all time points and all participant pairs' edge potential functions, which is equal to the inner product of the edge weight vector and the edge feature function. The edge feature function extracts the association features between adjacent participants. The group synchronization weight is calculated by using a dynamic time warping algorithm to determine the time alignment of the movement patterns of adjacent participants. The synchronization weight is generated based on the minimum alignment distance. The synchronization weight is equal to the value of an exponential function with a base of the natural constant, a negative decay parameter, and the minimum alignment distance as the exponent.
[0009] Furthermore, the optimal motion pattern label sequence is solved using the Viterbi algorithm. The Viterbi algorithm employs a dynamic programming strategy to search for the path that maximizes the conditional probability in the label sequence space. For each time step and each possible label, the maximum probability of reaching that state and the corresponding optimal predecessor state are calculated. The maximum probability of each state is calculated recursively from the start time to the end time, and then the complete optimal label sequence is obtained by backtracking from the end time.
[0010] Furthermore, the calculation of each participant's calorie expenditure based on the corrected exercise pattern label sequence includes: Apply the calorie calculation formula corresponding to the exercise mode to the sensor data for each time period; For aerobic exercise, the calorie calculation formula is the product of the participant's weight, the heart rate zone coefficient, and the length of the time period. The heart rate zone coefficient is determined based on the heart rate reserve percentage range in which the participant's average heart rate falls during that time period. The heart rate reserve percentage is calculated by subtracting the resting heart rate from the current heart rate and then dividing by the difference between the maximum heart rate and the resting heart rate. For anaerobic exercise, the calorie calculation formula is the product of the participant's body weight, metabolic equivalent, and acceleration integral value. The acceleration integral value is the integral of the magnitude of the acceleration vector over time during that time period. The total calorie score is obtained by summing up the calorie consumption over all time periods.
[0011] Furthermore, generating a social network topology graph includes: Data on participants' friendship relationships, interaction frequency, and exercise record sharing can be obtained from social platform interfaces. Interaction frequency and activity recording sharing were respectively normalized to mean based on range; The relationship strength weight is obtained by weighted summation. The relationship strength weight is equal to the product of the first weighted coefficient and the normalized interaction frequency plus the product of the second weighted coefficient and the normalized motion record sharing frequency. The sum of the first weighted coefficient and the second weighted coefficient is 1. Construct a social network topology graph that includes a set of participant nodes, a set of social relationship edges, and a relationship strength weight matrix.
[0012] Furthermore, the observational data for the Bayesian inference method includes calorie consumption values calculated for each participant, exercise pattern label sequences, and sensor data sequences; The prior distribution adopts a Gaussian distribution form, and the mean of the prior distribution is set as the typical value of the motion pattern parameter obtained based on the statistics of historical group sports data. The likelihood function is constructed based on the difference between the observed data and the model predictions. For each participant's observed data, the likelihood contribution is weighted according to the trust weight. The posterior distribution is obtained by multiplying the prior distribution with the likelihood function and then normalizing it. The adjusted calorie calculation parameters are taken as the mean of the posterior distribution as the final parameter values.
[0013] This invention provides an intelligent calorie trading system that integrates online and offline channels, comprising: The data acquisition module is used to acquire accelerometer data, gyroscope data and heart rate sensor data from the sports equipment worn by participants in team sports. It performs Z-score standardization on the data of each type of sensor and arranges the multi-dimensional sensor data of each participant in a time series to generate a spatiotemporal data matrix. The pattern recognition module is used to identify the motion mode switching time of each participant by applying a cumulative sum algorithm based on likelihood ratio. It detects abrupt changes in the distribution of sensor data by calculating the cumulative sum statistic. When the cumulative sum statistic exceeds a preset threshold, it is determined to be the motion mode switching time and outputs the individual switching point sequence. The group fusion module is used to fuse individual pattern recognition results using a conditional random field model. It defines an energy function including node potential function and edge potential function, introduces a group synchronization weight based on dynamic time warping algorithm, and solves for the optimal motion pattern label sequence through Viterbi algorithm. The calorie calculation module is used to apply the calorie calculation formula of the corresponding exercise mode to the sensor data in each time period based on the corrected exercise mode label sequence. For aerobic exercise mode, the calorie consumption is calculated by multiplying the weight and heart rate interval coefficient and the time period length. For anaerobic exercise mode, the calorie consumption is calculated by multiplying the weight and metabolic equivalent and the acceleration integral value. The calorie consumption of all time periods is added together to obtain the total calorie integral. The social analysis module is used to obtain the friend relationships, interaction frequency and exercise record sharing between participants from the social platform interface, normalize the interaction frequency and exercise record sharing and obtain the relationship strength weight by weighted summation, construct the social network topology graph, apply the feature vector centrality algorithm to identify high-influence nodes in the social network and generate trust weight vectors. The trust adjustment module integrates data from members with different trust levels using Bayesian inference methods. It weights and fuses the calorie calculation results for each participant using a trust weight vector, updates the posterior distribution of exercise mode parameters using a Bayesian formula, adjusts the calorie calculation parameters for each exercise mode based on the posterior distribution, and generates the final calorie integral result. The beneficial effects of this invention are as follows: This invention overcomes the error accumulation problem of individual devices during motion mode switching by utilizing a change point detection algorithm to identify the moment of motion mode switching and combining it with a conditional random field model to fuse group information. Therefore, it solves the technical problem of inaccurate calorie calculation in group sports. Specifically, the change point detection algorithm accurately identifies the moment of motion mode switching, avoiding data confusion during the switching process; by fusing group information through a conditional random field model, the inherent consistency constraints of group sports are used to correct individual identification results, eliminating group data chaos caused by asynchronous switching times among different members.
[0014] This invention, by introducing a sports scene recognition mechanism and differentiated scene coefficients, can accurately distinguish the differences in exercise quality across different scenarios such as home workouts, gym workouts, group classes, and personal training. Therefore, it solves the technical problem in existing technologies where neglecting the exercise environment and guidance factors leads to a mismatch between calorie points and actual exercise quality. Specifically, the 0.8 coefficient for home workouts reflects the discount on exercise quality due to the lack of professional equipment and supervision; the 1.0 baseline coefficient for gym workouts corresponds to a standard exercise environment; the 1.2 coefficient for group classes quantifies the beneficial effects of group motivation and coaching guidance; and the 1.5 coefficient for personal training reflects the improvement in exercise quality under professional one-on-one guidance. This differentiated setting of scene coefficients ensures that calorie points truly reflect the actual value of exercise effort, incentivizing users to choose high-quality exercise methods while preventing low-quality exercise data from artificially inflating points and harming the rights of offline merchants.
[0015] Furthermore, by identifying high-influence nodes in social networks through the eigenvector centrality algorithm and integrating data from members of different trust levels using Bayesian inference methods, the credibility of the overall transaction ecosystem is enhanced by using the credible data of high-influence nodes to verify and correct the calculation results of other members, thus providing high-quality value certificates for offline commodity redemption. Attached Figure Description
[0016] Figure 1 This is a flowchart of an intelligent calorie transaction method that integrates online and offline channels according to the present invention; Figure 2 This is a line graph comparing the heart rate time series of participants in group sports according to the present invention; Figure 3 This is a scatter plot showing the distribution of motion mode switching times according to the present invention; Figure 4 This is a stacked bar chart showing the calorie consumption of each participant in the present invention at different stages; Figure 5 This is the social network relationship topology diagram of the present invention; Figure 6 This is a heatmap of the motion mode label correction effect of the present invention; Figure 7 This is a bar chart comparing the adjustment effects of the Bayesian inference calorie calculation of the present invention. Detailed Implementation
[0017] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.
[0018] At least one embodiment of the present invention discloses an intelligent calorie transaction method that integrates online and offline channels, such as... Figure 1 As shown, it includes the following steps: Step 100: Acquire multi-source sensor data streams and motion scene information of team sports participants to generate a spatiotemporal data matrix.
[0019] Accelerometer, gyroscope, and heart rate sensor data were acquired from the sports equipment worn by participants in the team sport. Z-score standardization was applied to each type of sensor data to eliminate differences in the dimensions and numerical ranges of the data. The multidimensional sensor data for each participant were then arranged in a time series to generate… 3D spatiotemporal data matrix ,in For the number of participants, For the length of time, From the sensor dimension, it simultaneously acquires the exercise scene identification information of each participant, including home exercise scene, gym exercise scene, group class exercise scene, and personal training scene.
[0020] Furthermore, the length of time The time steps representing the sampling during group movement are determined by dividing the duration of the group movement by the sensor sampling interval. The sensor sampling interval is selected based on the type of movement; shorter sampling intervals are used for rapidly changing movements to capture movement details, while longer sampling intervals are used for steady movements to reduce data volume. (Sensor dimension) It equals the sum of the three-axis data from the accelerometer, the three-axis data from the gyroscope, and the one-dimensional data from the heart rate sensor.
[0021] Furthermore, exercise scene identification information is obtained through GPS location information, user-manual annotation, course booking information, or device connection information. When the location information shows that the participant is within the range of their registered home address, it is identified as a home exercise scene. When the location information shows that the participant is at a gym address and has not booked a group class or personal training session, it is identified as a gym exercise scene. When the participant's course booking system shows that there is a group class scheduled for the current time, it is identified as a group class exercise scene. When the participant's course booking system shows that there is a personal trainer scheduled for the current time, it is identified as a personal training exercise scene. The exercise scene identification information is stored in alignment with the sensor data timestamp, providing a scene coefficient basis for subsequent calorie calculation.
[0022] In a group spinning class at a gym, five participants wore smart bracelets for a 45-minute workout. The system continuously collected sensor data from each participant at 1-second sampling intervals, generating... A 3D spatiotemporal data matrix. The system identifies this as a group exercise scenario through the course reservation system, with a scenario coefficient of 1.2. Table 1 shows the basic information of the 5 participants, the type of exercise scenario, and the raw sensor data sample at time 600.
[0023] Table 1 Participant Information and Sensor Data Sample:
[0024] Figure 2 The chart shows the heart rate trends of five participants during the 600-700 second time period. The chart uses multiple lines to display the heart rate data of different participants, reflecting the synchronicity among members in team sports.
[0025] Step 200: Use the change point detection algorithm to identify the motion mode switching time of each member and output the individual switching point sequence.
[0026] For each participant Sensor data sequence The change point detection algorithm is applied to detect abrupt changes in the data distribution and generate a time sequence of motion mode switching for the participant. ,in , , Each represents a participant The 1st, the 2nd, the 3rd The next time the sports mode is switched. For participants Number of switching times.
[0027] It should be noted that the change point detection algorithm uses the likelihood ratio-based CUSUM algorithm, and the input of the likelihood ratio-based CUSUM algorithm is the participants. Sensor data sequence The output is a time sequence of motion mode switching. By calculating the cumulative sum statistic To detect abrupt changes in the data distribution, among which For time step index, and These represent the data distributions before and after the change point, respectively, and the initial values of the cumulative sum and statistic are set as follows: .
[0028] Furthermore, distribution and By analyzing the statistical characteristics of sensor data for each movement pattern in historical group sports data, for each movement pattern, sensor data samples are extracted from historical data, and the mean and covariance matrix of the samples are calculated. A multivariate Gaussian distribution is then used to fit the data distribution corresponding to the movement pattern. This process is applied when detecting change points. Set as the distribution corresponding to the current motion mode. The distribution corresponding to the candidate switching target motion modes is set, and the most likely switching target mode is selected by comparing the cumulative sum statistics corresponding to different candidate modes.
[0029] Furthermore, when cumulative sum statistics Exceeding the preset threshold Time determination For variable points, a preset threshold is used. Determined based on the expected average runtime, which represents the average number of time steps before the algorithm triggers a false alarm in the case of no changing points, with a preset threshold. The expected average running length is proportional to the expected average running length. The expected average running length is determined by statistical analysis of the frequency of movement mode switching in historical group sports data. This ensures that the preset threshold can detect real movement mode switching in a timely manner while avoiding misjudging normal data fluctuations as turning points.
[0030] The training course included multiple phases such as warm-up, high-intensity interval training, recovery, and sprint. The system applied the CUSUM algorithm to the sensor data of five participants and set preset thresholds. The participants detected the timing of their respective movement mode transitions. Table 2 shows the sequence of movement mode transition timings detected by each participant.
[0031] Table 2: Movement mode switching times (in seconds) for each participant:
[0032] Figure 3 The display shows the distribution of movement mode switching times for 5 participants throughout the 45-minute training course, visually demonstrating the differences in the timing of switching among different members in group sports, and showcasing the ability of the change point detection algorithm to capture individual movement mode transitions.
[0033] Step 300: Use a conditional random field model to fuse individual pattern recognition results and output the corrected motion pattern label sequence.
[0034] Using the switching sequence of each participant as observations, a conditional random field model is constructed, and an energy function is defined. , in For time index, Indexing participants, Indexing neighboring nodes, Let be the nodal potential function. Let be the boundary potential function. Indicates participants At any moment The sports mode label, Indicates participants In a social network, the set of neighbor nodes is determined by maximizing conditional probability. Solving for the optimal motion pattern label sequence .
[0035] Furthermore, the first term in the energy function sums the node potential functions over all times and all participants, reflecting the cumulative effect of the degree of matching between each participant's individual characteristics and their labels at each time point over time. The second term sums the edge potential functions over all times and all participant pairs, reflecting the cumulative effect of the consistency constraint of movement patterns among group members over time. The summation of the two terms together ensures that the model achieves globally optimal label allocation over the entire time span of the movement process.
[0036] Furthermore, the optimal motion pattern label sequence is solved using the Viterbi algorithm. The Viterbi algorithm employs a dynamic programming strategy to search for the path that maximizes the conditional probability in the label sequence space. For each time step and each possible label, the maximum probability of reaching that state and the corresponding optimal predecessor state are calculated. The maximum probability of each state is calculated recursively from the start time to the end time, and then the complete optimal label sequence is obtained by backtracking from the end time.
[0037] The aforementioned conditional random field model takes as input the switching point sequence of each participant and a sensor data matrix, and outputs a corrected motion pattern label sequence. (Nodal potential function) Calculate the matching degree between individual features and labels, and the edge potential function. Calculate the consistency of labels among adjacent participants, where T represents the transpose, and the node feature function is... Sensor statistical features of participants under the current label are extracted, including mean acceleration, variance, and heart rate variability. The calculation method involves extracting statistics from sensor data within a time window, and then performing mean normalization based on the range of each extracted statistical feature to eliminate the influence of different statistical feature units. These are then concatenated into a feature vector. (The last part, "side feature function," appears to be an unrelated fragment and is omitted from the translation.) The model extracts association features between adjacent participants, including consistency indicators of motion pattern labels and correlation coefficients of sensor data. The consistency indicator is set to 1 when the labels are the same and 0 otherwise. The model is trained using maximum likelihood estimation, with a loss function of negative log-likelihood. ,in As a normalization factor, the gradient descent optimization algorithm is used to update the parameters. and .
[0038] Furthermore, the training data for the Conditional Random Field model comes from historical group sports data. The historical data includes the sensor data sequences of participants and the manually labeled motion pattern label sequences. The manual labeling is obtained by having participants manually record the moment of motion pattern switching and the corresponding motion type during the exercise, or by combining video recordings with expert annotations. The sensor data sequences in the historical data are used as input, and the manually labeled motion pattern label sequences are used as supervision signals. The model parameters are learned by maximizing the conditional probability on the training data.
[0039] In this embodiment, to improve the accuracy of pattern recognition, a group synchronization constraint is introduced into the boundary potential function of the conditional random field. A dynamic time warping algorithm is applied to calculate the temporal alignment of the motion patterns of adjacent participants. The input to the dynamic time warping algorithm is the participants... and participants Sensor data sequence and The output is the minimum alignment distance between the two sequences. , Synchronization weights are generated based on the minimum alignment distance. Where exp represents the exponential function, This is the attenuation parameter.
[0040] Furthermore, attenuation parameters The value range is positive real numbers. The attenuation parameter controls the degree of influence of the dynamic time warping distance on the synchronization weight. When the attenuation parameter... When the value is small, the difference in alignment distance has a weak impact on the synchronization weight; when the attenuation parameter... When the value is large, even a small difference in alignment distance can lead to a significant decrease in synchronization weight. The attenuation parameter is determined by using the typical alignment distance range among participants in group motion data. The specific values ensure that the synchronization weights are distributed within a reasonable range within the typical alignment distance range, effectively distinguishing between participants with high and low synchronization.
[0041] The system constructs a conditional random field model and sets the decay parameters. The system integrates individual detection results from each participant with group synchronization constraints. Since participant P4's switch detection at 630 seconds significantly lagged behind other members, the system used group consistency to correct for this. Table 3 shows a comparison of participant P3's motion pattern labels before and after correction during the time period 1200-1210 seconds.
[0042] Table 3 Comparison of motion pattern labels for participants P3 during the 1200-1210 second period:
[0043] Figure 6 The demonstration shows the correction process of the motion pattern label of participant P3 during the time period of 1200-1210 seconds, as well as the corresponding node potential function value and edge potential function value, intuitively demonstrating how the CRF model corrects individual identification error through group consistency constraints.
[0044] Step 400: Calculate the calorie consumption value of each participant based on the corrected motion pattern label sequence and motion scenario coefficient, and generate calorie score results.
[0045] Based on the corrected motion pattern label sequence , Apply the calorie calculation formula corresponding to the corresponding exercise pattern to the sensor data for each time period to calculate the participants' calorie intake. In time period Basal calorie consumption ,in Calorie calculation function indexed by time period According to the sports mode Different types of exercise use different calorie calculation formulas. For aerobic exercise, the calorie calculation formula is the product of body weight, heart rate zone coefficient, and duration. The product of heart rate zone coefficient and duration represents the combined effect of exercise intensity and duration. The heart rate zone coefficient already includes a conversion factor to convert different units of measurement into calorie units. For anaerobic exercise, the calorie calculation formula is the product of body weight, the integral of acceleration, and the metabolic equivalent. The product of metabolic equivalent and the integral of acceleration represents the combined effect of exercise work and metabolic level. The calorie calculation formula already includes a conversion factor to convert different units to calorie units. Then, the basic calorie expenditure is adjusted according to the type of exercise and the application scenario coefficient. The adjusted calorie expenditure is... ,in The scenario coefficient is 0.8 for home workouts, 1.0 for gym workouts, 1.2 for group classes, and 1.5 for personal training. The total calorie score is obtained by summing up the calorie consumption of all time periods after adjusting for the scenario coefficient.
[0046] Furthermore, the formula for calculating calories in aerobic exercise is as follows: ,in For participants weight, This is the heart rate zone coefficient. The formula for calculating calories during anaerobic exercise is: (where the duration is specified in the original text). ,in Metabolic equivalents For a moment acceleration vector, The term represents the magnitude of acceleration, and the integral term represents the cumulative acceleration over that time period.
[0047] Furthermore, the heart rate zone coefficient is determined based on the heart rate reserve percentage range in which the participant's average heart rate falls during that time period. The heart rate reserve percentage is calculated by subtracting the resting heart rate from the current heart rate and then dividing by the difference between the maximum heart rate and the resting heart rate. Different heart rate reserve percentage ranges correspond to different heart rate zone coefficients. The heart rate zone coefficient reflects the relationship between aerobic exercise intensity and energy metabolism. When the heart rate reserve percentage is low, it corresponds to a smaller heart rate zone coefficient value, and when the heart rate reserve percentage is high, it corresponds to a larger heart rate zone coefficient value.
[0048] Furthermore, resting heart rate was obtained by continuously measuring heart rate while the participant was at rest. Heart rate values measured before the participant got out of bed in the morning or while sitting still were selected, and the average of multiple measurements was taken as the participant's resting heart rate. Maximum heart rate was obtained by age prediction formula or exercise test. The age prediction formula is 220 minus the participant's age. The exercise test method involves having the participant perform progressively stronger exercise until exhaustion, at which point the peak heart rate is recorded. The measured maximum heart rate obtained by the exercise test method is preferred. When exercise test is not possible, the theoretical maximum heart rate calculated by the age prediction formula is used.
[0049] Furthermore, the metabolic equivalent is determined based on the specific type of anaerobic exercise. Different types of anaerobic exercise correspond to different metabolic equivalent values. The metabolic equivalent value represents the multiple of the anaerobic exercise type relative to the resting metabolic rate. The initial value is determined by the standard metabolic equivalent values of anaerobic exercise types in the exercise physiology database. Then, the standard metabolic equivalent value is adjusted according to the exercise intensity reflected by the acceleration integral value. The larger the acceleration integral value, the higher the exercise intensity, and the larger the adjusted metabolic equivalent.
[0050] Furthermore, scene coefficient This system is used to differentiate the quality of exercise in different exercise scenarios. Home workouts, due to the lack of professional equipment and a supervised environment, have relatively low intensity and duration, so the scenario coefficient is set at 0.8. Gym workouts have standard facilities and a good atmosphere, and the quality of exercise meets the assumptions of the standard calculation model, so the scenario coefficient is set at a baseline value of 1.0. Group workouts, through the group motivation effect and unified guidance from coaches, can significantly improve exercise intensity and participant persistence, so the scenario coefficient is set at 1.2. Personal training, under the one-on-one guidance of professional coaches, can achieve optimal exercise posture, precise intensity control, and continuous high-quality output, so the scenario coefficient is set at 1.5. The scenario coefficients are based on the statistical analysis results of actual energy consumption in different scenarios from a large amount of historical exercise data.
[0051] Based on the corrected exercise pattern label sequence, the system applies corresponding calorie calculation formulas to each participant at different exercise stages. For the warm-up and recovery phases, participants' average heart rate is in the 50%-60% heart rate reserve range, with a heart rate zone coefficient of 0.45; for the high-intensity interval training phase, the average heart rate is in the 80%-90% heart rate reserve range, with a heart rate zone coefficient of 0.75; for the sprint phase, the metabolic equivalent... Since this is a group exercise session, the baseline calorie expenditure for all participants needs to be multiplied by a scenario factor of 1.2. Table 4 shows the calculated calorie expenditure for each participant throughout the 45-minute session.
[0052] Table 4 shows the calorie consumption calculation results for each participant:
[0053] It should be noted that the introduction of the scenario coefficient allows the calorie score to more accurately reflect the actual quality of exercise. Taking participant P2 as an example, their basal calorie expenditure is 422.9 kcal. If the exercise is performed at home, the final calorie score is 422.9 × 0.8 = 338.3 kcal; if performed in a gym, the final calorie score is 422.9 × 1.0 = 422.9 kcal; if performed in a group class (i.e., in this example), the final calorie score is 422.9 × 1.2 = 507.5 kcal; and if performed in a personal training session, the final calorie score is 422.9 × 1.5 = 634.4 kcal. The differentiated setting of the scenario coefficient incentivizes users to choose high-quality exercise methods, while ensuring that the rights and interests of offline merchants are not affected by low-quality exercise data.
[0054] To more clearly demonstrate the impact of different exercise scenarios on calorie points, Table 5 compares the differences in calorie points obtained by five participants when performing the same exercise intensity and duration in four different exercise scenarios.
[0055] Table 5 Comparison of calorie integrals under different sports scenarios:
[0056] Figure 4 The display shows the calorie consumption distribution of 5 participants in four exercise phases: warm-up, high-intensity interval training, recovery, and sprint. It visually demonstrates the total consumption of each participant and the percentage of each phase, reflecting the accuracy of exercise pattern recognition and calorie calculation.
[0057] In this embodiment of the application, in order to further improve the reliability of calorie calculation, the following steps are included in addition to step 200: Step 201: Obtain the social relationship graph of the participants in the group sport and generate a social network topology graph.
[0058] The system obtains information on friend relationships, interaction frequency, and activity record sharing among participants from social platform interfaces. Interaction frequency and activity record sharing are normalized to the mean based on their ranges. Then, a weighted summation is used to obtain relationship strength weights, and a social network topology graph is constructed. ,in For the set of participant nodes, For social relationship edge collection, This is the relation strength weight matrix.
[0059] Furthermore, the formula for calculating the relation strength weight is as follows: ,in The normalized interaction frequency, The normalized frequency of motion record sharing. The weighting coefficients range from 0 to 1, reflecting the relative importance of interaction frequency and the frequency of sharing sports records. These coefficients are determined based on the correlation between the two social behaviors and the quality of group sports data in historical data. The specific value to be taken.
[0060] The system retrieves social data from five participants on a fitness social platform, calculating their interactions and exercise record sharing frequency over the past 30 days. A weighting factor is then set. The strength weights of the relationships between each participant pair were calculated, and a social network topology graph was constructed. Table 6 shows the social relationship strength weight matrix among the participants.
[0061] Table 6: Social Relationship Strength Weight Matrix
[0062] Figure 5 The presentation showcases the social relationship network topology among the five participants, visually demonstrating the social relationship structure of members in a group sport and highlighting the core position of high-influence nodes (P2, P3) in the social network.
[0063] Step 202: Apply the network centrality algorithm to identify high-influence nodes in the social network and generate a trust weight vector.
[0064] The eigenvector centrality algorithm is used to calculate the influence of each node in a social network. The input to the eigenvector centrality algorithm is the social network topology graph. The output is the centrality score vector of each node.
[0065] The eigenvector centrality of each node is calculated iteratively. ,in Indexing neighboring nodes, The largest eigenvalue, For nodes The neighbor set is used to generate a trust weight vector after normalizing the centrality score. ,in , , They represent participant 1, participant 2, and participant 3 respectively. Trust weight.
[0066] Furthermore, the iterative calculation of eigenvector centrality starts from the initial centrality vector. Initially, in each iteration, the centrality score of each node is updated according to the formula and the vector is normalized so that its magnitude is 1. The iteration terminates when the change in the centrality vector between two adjacent iterations is less than a preset convergence threshold. The preset convergence threshold is determined according to the required computational accuracy, or when the number of iterations reaches the preset maximum number of iterations.
[0067] The system applies the eigenvector centrality algorithm based on the social network topology graph, setting a preset convergence threshold. The algorithm converged after 15 iterations. The results show that participants P2 and P3 have high influence in the social network, consistent with their activity and interaction breadth within the group. Table 7 shows the centrality scores and normalized trust weights for each participant.
[0068] Table 7. Eigenvector centrality and trust weights of participants:
[0069] Step 401: Integrate member data of different trust levels based on Bayesian inference and dynamically adjust calorie calculation parameters.
[0070] The motion data of members with different trust levels are integrated using the Bayesian inference method. The input of the Bayesian inference method is the trust weight vector. The calorie calculation results for each participant are used as the output, which is the adjusted calorie calculation parameter. This is achieved using a trust weight vector. The calorie calculations for each participant are weighted and fused, and the posterior distribution of the exercise pattern parameters is updated using Bayes' theorem. ,in For observation data, The model parameters are adjusted according to the posterior distribution for each exercise mode to generate enhanced calorie calculation results.
[0071] Further observation data The form is ,in Indexing participants, For participants Based on the calorie consumption value calculated in step 400, The sequence of movement patterns labeled for participants. The data consists of a sequence of sensor data from the participants, with each data sample corresponding to a participant's complete motion data. A likelihood function is constructed using the dataset to quantify the model's fit to the observed calorie data under different parameter values.
[0072] Furthermore, prior distribution A Gaussian distribution is adopted, and the mean of the prior distribution is set as the typical value of the motion pattern parameter obtained from the statistics of historical group sports data. The variance of the prior distribution reflects the degree of uncertainty of the motion pattern parameter. A smaller variance is used for motion patterns with sufficient data accumulation, and a larger variance is used for motion patterns with insufficient data accumulation to allow for greater adjustment space of the motion pattern parameter.
[0073] Furthermore, the likelihood function Based on the difference between observed data and model predictions, a framework was constructed for participants. The observational data, and its likelihood contribution according to the trust weight. Weighted likelihood functions are applied, with data from participants holding higher trust weights contributing more to the likelihood function. The likelihood function is then expressed as a weighted Gaussian, where the observed data and parameters... The difference between the calculated predicted values is used as the input of a Gaussian distribution, and the data of high-influence nodes are fitted by maximizing the weighted likelihood function.
[0074] Furthermore, the posterior distribution is calculated by multiplying the prior distribution by the likelihood function and then normalizing it. Since both the prior distribution and the likelihood function are Gaussian, the posterior distribution is also Gaussian. The mean of the posterior distribution is a weighted combination of the prior mean and the observed data. The weights are determined by the relative magnitudes of the prior variance and the observed noise variance. The variance of the posterior distribution is smaller than the prior variance, reflecting the role of the observed data in reducing uncertainty. The adjusted calorie calculation parameters are taken as the mean of the posterior distribution as the final parameter value.
[0075] The system dynamically adjusts the calorie calculation parameters for other participants using data from high-influence nodes P2 and P3. Using Bayesian inference, high-quality exercise data from P2 and P3 are used as key observations to update the posterior distribution of heart rate interval coefficients. For participant P5, whose original calculation results deviate from those of the high-influence nodes, the system adjusts the parameters based on trust weights. Table 8 shows a comparison of the calorie calculation results before and after the Bayesian inference adjustment.
[0076] Table 8 Adjustments to Calorie Calculation Results Based on Bayesian Inference:
[0077] Figure 7 The comparison of calorie calculation results before and after Bayesian inference for 5 participants is presented, intuitively demonstrating how the data from high-influence nodes (P2, P3) helps correct the calculation results of other participants, reflecting the role of social networks in improving data quality.
[0078] This embodiment provides an online-offline integrated calorie trading system, which includes a data acquisition module, an exercise mode switching detection module, an exercise mode recognition module, a calorie calculation module, a social network analysis module, and a Bayesian inference adjustment module.
[0079] The data acquisition module is used to acquire accelerometer, gyroscope, and heart rate sensor data from the sports equipment worn by participants in team sports. It performs Z-score standardization on each type of sensor data to eliminate differences in the dimensions and numerical ranges of the data from different sensors. The multidimensional sensor data of each participant is then arranged in a time series to generate... 3D spatiotemporal data matrix ,in For the number of participants, For the length of time, From the sensor dimension, it simultaneously acquires sports scene identification information, including home workout scenes, gym workout scenes, group class workout scenes, and personal training workout scenes.
[0080] Furthermore, the data acquisition module includes a sensor interface unit, a data preprocessing unit, a scene recognition unit, and a data organization unit. The sensor interface unit establishes a connection with the sports equipment via Bluetooth or Wi-Fi wireless communication protocols, receiving raw data streams from various sensors in real time. The sensor interface unit uses corresponding data parsing protocols for different brands and models of sports equipment, converting the equipment-specific data format into a unified data format. The data preprocessing unit performs Z-score standardization on the received raw sensor data, calculating the mean and standard deviation of various sensor data, subtracting the mean from each data point and dividing by the standard deviation to obtain standardized data. The scene recognition unit uses GPS positioning information, user-manual annotations, course reservation information, or... The device connection information identifies the current exercise scenario type. When the location information shows that the participant is within the range of their registered home address, it is identified as a home exercise scenario. When the location information shows that the participant is at a gym address and has not booked a group class or personal training session, it is identified as a gym exercise scenario. When the participant's class booking system shows that there is a group class scheduled for the current time, it is identified as a group class exercise scenario. When the participant's class booking system shows that there is a personal trainer scheduled for the current time, it is identified as a personal training exercise scenario. The data organization unit arranges the standardized multidimensional sensor data and scenario identification information according to the participant dimension, time dimension, and sensor dimension to generate a three-dimensional spatiotemporal data matrix and scenario identification vector, and stores the data matrix in the system database for subsequent modules to call.
[0081] The motion mode switching detection module is used to apply a change point detection algorithm to the sensor data sequence of each participant to detect abrupt changes in the data distribution and generate a motion mode switching time sequence for that participant. The change point detection algorithm adopts the CUSUM algorithm based on likelihood ratio, which detects abrupt changes in the data distribution by calculating the cumulative sum statistic. When the cumulative sum statistic exceeds a preset threshold, it is determined to be a motion mode switching time.
[0082] Furthermore, the motion mode switching detection module includes an accumulation and calculation unit, a threshold judgment unit, and a switching point recording unit; the accumulation and calculation unit acquires the participant's sensor data sequence from the data acquisition module and calculates the cumulative sum statistic point by point in chronological order. ,in For time step index, and The data distributions before and after the change point are represented respectively. The cumulative sum calculation unit loads the data distribution parameters corresponding to each motion mode from the historical motion database and calculates the likelihood ratio based on the current motion mode and candidate switching modes. The threshold judgment unit monitors the value of the cumulative sum statistic in real time and compares it with a preset threshold. The comparison is performed, and when the cumulative and statistical values exceed the preset threshold, a change point detection signal is triggered. The threshold judgment unit adaptively adjusts the preset threshold according to the expected average running length to balance the detection sensitivity and false alarm rate. The switching point recording unit receives the change point detection signal issued by the threshold judgment unit, records the time index of the change point and the corresponding switching target mode, generates the motion mode switching time sequence of the participant, and transmits it to the motion mode recognition module.
[0083] The motion pattern recognition module is used to construct a conditional random field model by using the switching point sequence of each participant as observations. It solves for the optimal motion pattern label sequence by maximizing the conditional probability and outputs the corrected motion pattern label sequence. The conditional random field model defines an energy function that includes a node potential function and a edge potential function. The node potential function calculates the matching degree between individual features and labels, and the edge potential function calculates the consistency of labels of adjacent participants. The optimal label sequence is solved by the Viterbi algorithm.
[0084] Furthermore, the motion pattern recognition module includes a Conditional Random Field (CRF) construction unit, a feature extraction unit, a synchronization analysis unit, and a label optimization unit. The CRF construction unit receives the switching point sequence of each participant from the motion pattern switching detection module and obtains the social relationship topology graph between participants from the social network analysis module. Based on this information, it constructs the graph structure of the CRF model, where each participant corresponds to a node at each time step, and social relationships determine the edge connections between nodes. The feature extraction unit extracts node feature functions and edge feature functions from the spatiotemporal data matrix. Node feature functions include the participant's mean acceleration, variance, and heart rate change rate within the current time window. Edge feature functions include the motion pattern label consistency indicator between adjacent participants and the correlation coefficient of sensor data. The feature extraction unit normalizes the extracted features. The synchronization analysis unit applies a dynamic time warping algorithm to calculate the time alignment of motion patterns between adjacent participants, generates synchronization weights, and integrates them into the edge potential function to enhance group consistency constraints. The label optimization unit applies the Viterbi algorithm to search for the path with the highest conditional probability in the label sequence space. It uses a dynamic programming strategy to recursively calculate the maximum probability of each state from the start time to the end time, and then backtracks from the end time to obtain the complete optimal motion pattern label sequence.
[0085] The calorie calculation module applies the corresponding calorie calculation formula for each exercise mode to the sensor data within each time period based on the corrected exercise mode label sequence. It calculates the calorie consumption of each participant in different time periods and sums up the calorie consumption of all time periods to obtain the total calorie score. For aerobic exercise, a calorie calculation formula based on heart rate is used, while for anaerobic exercise, a calorie calculation formula based on acceleration is used. The calculation results are adjusted according to the type of exercise scenario using a scenario coefficient: 0.8 for home workout scenarios, 1.0 for gym workout scenarios, 1.2 for group class workout scenarios, and 1.5 for personal training workout scenarios.
[0086] Furthermore, the calorie calculation module includes an exercise mode classification unit, an aerobic exercise calculation unit, an anaerobic exercise calculation unit, a scene coefficient adjustment unit, and an integral accumulation unit. The exercise mode classification unit receives the corrected exercise mode label sequence from the exercise mode recognition module, divides the entire exercise process into multiple time periods based on the label sequence, and each time period corresponds to a specific exercise mode. The exercise mode classification unit distributes the sensor data and exercise mode labels for each time period to the corresponding calculation unit. The aerobic exercise calculation unit processes the time periods marked as aerobic exercise, obtains the participant's weight, resting heart rate, and maximum heart rate parameters from the participant profile database, calculates the average heart rate and its corresponding heart rate reserve percentage within the time period, and determines the heart rate interval coefficient based on the heart rate reserve percentage interval. , apply formula The calorie expenditure for that time period is calculated; the anaerobic exercise calculation unit processes the time periods marked as anaerobic exercise and retrieves the corresponding metabolic equivalents from the metabolic equivalent database based on the specific type of anaerobic exercise. The cumulative acceleration value is obtained by integrating the acceleration vector over the time period, and then applying the formula... Calculate calorie consumption during this time period; the scene coefficient adjustment unit obtains the exercise scene identification information from the data acquisition module and determines the corresponding scene coefficient according to the scene type. The adjusted calorie consumption is obtained by multiplying the base calorie consumption values output by the aerobic exercise calculation unit and the anaerobic exercise calculation unit by the scenario coefficient. Among them, the home workout scenario has a relatively low intensity and duration of exercise due to the lack of professional equipment and supervision environment, so the scenario coefficient is set to 0.8. The gym workout scenario has standard sports facilities and a good exercise atmosphere, so the scenario coefficient is set to the baseline value of 1.0. The group class workout scenario can improve the intensity of exercise through group motivation and coach guidance, so the scenario coefficient is set to 1.2. The personal training scenario has the highest quality and intensity of exercise under the one-on-one guidance of professional coaches, so the scenario coefficient is set to 1.5. The points accumulation unit collects the calorie consumption results of each time period after adjusting for the scenario coefficient, adds up the calorie consumption of all time periods to obtain the total calorie points of the participants, generates calorie points results and stores them in the user's points account for use in offline product redemption.
[0087] The social network analysis module is used to obtain the friend relationships, interaction frequency, and activity record sharing between participants from the social platform interface. It constructs a social network topology graph by obtaining the relationship strength weights through weighted summation, calculates the influence of each node in the social network by applying the eigenvector centrality algorithm, and generates a trust weight vector after normalizing the centrality score to identify high-influence nodes in the social network.
[0088] Furthermore, the social network analysis module includes a social data acquisition unit, a relationship strength calculation unit, a network topology construction unit, and a centrality calculation unit. The social data acquisition unit connects to the social platform via an API interface to query friend relationships between participants, the number of interactions (including likes, comments, private messages, etc.) over a certain period, and the number of times activity records are shared. The social data acquisition unit cleans and deduplicates the acquired data, removing outliers and duplicate records. The relationship strength calculation unit performs mean normalization based on the range for both interaction frequency and activity record sharing frequency to eliminate the influence of orders of magnitude differences, and then calculates the value according to the formula... Calculate the relationship strength weights between participant pairs, where the weighting coefficients are... The network topology was determined based on the correlation between two types of social behaviors and the quality of group sports data in historical data; the network topology construction unit was based on the participant set, the social relationship edge set, and the relationship strength weight matrix to construct the social network topology graph. The network structure is stored in adjacency matrix form for easy processing by subsequent algorithms; the centrality calculation unit uses the eigenvector centrality algorithm to iteratively calculate the influence score of each node, starting from the initial centrality vector and applying the formula... Update the centrality value of each node. Terminate the iteration when the change between two adjacent iterations is less than the preset convergence threshold or the maximum number of iterations is reached. Normalize the final centrality score to obtain the trust weight vector.
[0089] The Bayesian inference adjustment module is used to integrate the exercise data of members with different trust levels by applying the Bayesian inference method. It uses the trust weight vector to weight and fuse the calorie calculation results of each participant, updates the posterior distribution of the exercise mode parameters through the Bayesian formula, and adjusts the calorie calculation parameters of each exercise mode according to the posterior distribution to generate enhanced calorie calculation results.
[0090] Furthermore, the Bayesian inference adjustment module includes an observation data organization unit, a prior distribution setting unit, a likelihood function construction unit, and a posterior distribution calculation unit; The observation data organization unit obtains the calorie consumption values calculated by each participant based on initial parameters from the calorie calculation module, the motion pattern label sequence from the motion pattern recognition module, and the sensor data sequence from the data acquisition module, and organizes these data into an observation data set. The prior distribution setting unit extracts the statistical characteristics of parameters for each exercise mode from the historical exercise database, uses the typical values obtained from the statistics as the mean of the prior distribution, and sets the variance of the prior distribution according to the degree of data accumulation. Exercise modes with sufficient data accumulation adopt a smaller variance, while those with insufficient data accumulation adopt a larger variance. The likelihood function construction unit constructs a weighted Gaussian likelihood function based on the difference between the observed data and the model's predicted values. It obtains the trust weight vector from the social network analysis module and weights the likelihood contributions of participants according to the trust weight, so that the data of high-influence nodes have a greater impact on parameter estimation. The posterior distribution calculation unit multiplies the prior distribution with the likelihood function and then normalizes it to obtain the posterior distribution. Since both the prior distribution and the likelihood function are in Gaussian form, the posterior distribution is also a Gaussian distribution. The posterior distribution calculation unit extracts the mean of the posterior distribution as the adjusted calorie calculation parameter and feeds the adjusted parameter back to the calorie calculation module to recalculate the calorie integrals of each participant.
[0091] Furthermore, the system also includes a user profile management module, an offline merchant interface module, and a points transaction management module. The user profile management module stores participants' personal information, including parameters such as weight, resting heart rate, maximum heart rate, age, and exercise history, providing necessary individualized parameters for the calorie calculation module. The offline merchant interface module connects with the offline merchant's merchandise management system to obtain information on redeemable goods and their inventory status, sends users' points redemption requests to the merchant system, and receives redemption confirmations and order generation information from the merchant system. The points transaction management module manages users' calorie points accounts, records the acquisition, use, and balance of points, verifies whether the user's points balance is sufficient when processing points redemption requests, performs points deduction operations and generates transaction records, and provides functions for querying points history and transaction details.
[0092] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. An online-offline linked intelligent card calorie transaction method, characterized in that, The method comprises the following steps: Obtaining multi-source sensor data streams of group exercise participants to generate a spatio-temporal data matrix; Identifying the switching moments of each participant's exercise mode by using a change point detection algorithm, and outputting an individual switching point sequence; Fusing individual mode recognition results by using a conditional random field model to output a corrected exercise mode label sequence; Calculating the calorie consumption values of each participant based on the corrected exercise mode label sequence to generate calorie integration results; Obtaining the social relationship graph of group exercise participants to generate a social network topology graph; Identifying high-influence nodes in the social network by applying a network centrality algorithm to generate a trust weight vector; Integrating member data of different trust levels based on Bayesian inference to dynamically adjust calorie calculation parameters; The change point detection algorithm uses a cumulative sum algorithm based on likelihood ratio to detect the mutation points of sensor data distribution by calculating cumulative sum statistics, and determines the exercise mode switching moment when the cumulative sum statistics exceeds a preset threshold value; The conditional random field model defines an energy function, which includes a node potential function and an edge potential function. The node potential function calculates the matching degree of individual features and labels, the edge potential function calculates the consistency of adjacent participant labels and introduces a group synchronization weight based on a dynamic time warping algorithm, and the optimal exercise mode label sequence is solved by maximizing the conditional probability; The network centrality algorithm uses an eigenvector centrality algorithm to calculate the centrality score of each node by iteration and normalization to generate a trust weight vector; The Bayesian inference method uses the trust weight vector to weight and fuse the calorie calculation results of each participant, updates the posterior distribution of exercise mode parameters through the Bayesian formula, and adjusts the calorie calculation parameters in each exercise mode according to the posterior distribution.
2. The online-offline linked intelligent card calorie transaction method according to claim 1, characterized in that, The generation of the spatio-temporal data matrix comprises: Obtaining acceleration sensor data, gyroscope data and heart rate sensor data from the exercise equipment worn by group exercise participants; Respectively performing Z-score standardization processing on various types of sensor data to eliminate differences in the dimensions and numerical ranges of different sensor data; Arranging the multi-dimensional sensor data of each participant in time sequence to generate an N×T×D-dimensional spatio-temporal data matrix, where N is the number of participants, T is the time length, and D is the sensor dimension.
3. The method of claim 1, wherein the method further comprises: The calculation method of the cumulative sum statistics of the change point detection algorithm is as follows: Calculating the logarithm value of the likelihood ratio of the data distribution before and after the change point for the current time point, adding the logarithm value to the cumulative sum statistics of the previous time point, if the addition result is negative, taking zero, if it is positive, retaining the value, wherein the data distribution before and after the change point is determined by the statistical characteristics of the sensor data of each exercise mode in the historical group exercise data, and the initial value of the cumulative sum statistics is set to zero.
4. The online and offline linked intelligent card calorie transaction method according to claim 1, characterized in that, The preset threshold value is determined according to the expected average run length, which represents the average time step number before the algorithm triggers a false alarm in the absence of change points. The preset threshold value is proportional to the expected average run length, and the expected average run length is determined by the exercise mode switching frequency statistics of the historical group exercise data.
5. The method of claim 1, wherein the method further comprises: The energy function of the conditional random field model comprises two summations, the first summation is the summation of node potential functions of all time points and all participants, the node potential function is equal to the inner product of a node weight vector and a node feature function, the node feature function extracts sensor statistical features of the participant under the current label, the second summation is the summation of edge potential functions of all time points and all participant pairs, the edge potential function is equal to the inner product of an edge weight vector and an edge feature function, the edge feature function extracts correlation features between adjacent participants; The group synchrony weight is calculated by a dynamic time warping algorithm to obtain time alignment of motion patterns of adjacent participants, and a synchrony weight is generated based on a minimum alignment distance, the synchrony weight is equal to an exponential function value with a natural constant as a base, a negative decay parameter and a product of the minimum alignment distance as an exponent.
6. The online and offline linked intelligent card calorie transaction method according to claim 1, characterized in that, The optimal motion pattern label sequence is solved by a Viterbi algorithm, the Viterbi algorithm adopts a dynamic programming strategy to search for a path with maximum conditional probability in a label sequence space, for each time point and each possible label, a maximum probability of reaching the state and a corresponding optimal predecessor state are calculated, and the maximum probability of each state is recursively calculated from a start time point to an end time point, and then a complete optimal label sequence is obtained by backtracking from the end time point.
7. The online and offline linked intelligent card calorie transaction method according to claim 1, characterized in that, The calculation of the calorie consumption value of each participant based on the corrected motion pattern label sequence comprises: applying a calorie calculation formula of a corresponding motion pattern to sensor data in each time period; for an aerobic motion pattern, the calorie calculation formula is a product of a body weight of the participant and a heart rate interval coefficient and a time period length, the heart rate interval coefficient is determined according to a heart rate reserve percentage interval in which an average heart rate of the participant in the time period is located, and the heart rate reserve percentage is calculated in a manner that a current heart rate is divided by a difference between a maximum heart rate and a resting heart rate after the resting heart rate is subtracted; for an anaerobic motion pattern, the calorie calculation formula is a product of the body weight of the participant and a metabolic equivalent and an acceleration integral value, the acceleration integral value is an integral of a modulus of an acceleration vector with respect to time in the time period; all calorie consumptions in all time periods are accumulated to obtain a total calorie integral.
8. The online and offline linked intelligent card calorie transaction method according to claim 1, characterized in that, The generation of the social network topology graph comprises: obtaining friend relationships, interaction frequencies and exercise record sharing conditions between the participants from a social platform interface; respectively performing range-based mean normalization processing on the interaction frequencies and the exercise record sharing conditions; obtaining a relationship strength weight by weighted summation, the relationship strength weight is equal to a product of a first weighting coefficient and the normalized interaction frequency plus a product of a second weighting coefficient and the normalized exercise record sharing frequency, and a sum of the first weighting coefficient and the second weighting coefficient is 1; constructing a social network topology graph comprising a participant node set, a social relationship edge set and a relationship strength weight matrix.
9. The online and offline linked intelligent card calorie transaction method according to claim 1, characterized in that, The observation data of the Bayesian inference method comprises calorie consumption values, motion pattern label sequences and sensor data sequences calculated by the participants; the prior distribution adopts a Gaussian distribution form, and a mean value of the prior distribution is set as a typical value of a motion pattern parameter based on historical group exercise data statistics; The likelihood function is constructed according to the difference between the observation data and the model prediction value, and the likelihood contribution of the observation data of each participant is weighted according to the trust weight; The posterior distribution is obtained by multiplying the prior distribution by the likelihood function and then normalizing, and the adjusted calorie calculation parameter takes the mean value of the posterior distribution as the final parameter value.
10. An online-offline linked smart card calorie transaction system for performing the online-offline linked smart card calorie transaction method according to any one of claims 1 to 9, characterized by, Comprise: The data acquisition module is used for acquiring acceleration sensor data, gyroscope data and heart rate sensor data from the sports equipment worn by the group sports participants, respectively performing Z-score standardization processing on various sensor data, arranging the multi-dimensional sensor data of each participant in time sequence to generate a space-time data matrix; The pattern recognition module is used for applying a likelihood ratio based cumulative sum algorithm to identify the motion mode switching time of each participant, detecting the mutation point of the sensor data distribution by calculating the cumulative sum statistic, determining the motion mode switching time when the cumulative sum statistic exceeds the preset threshold, and outputting an individual switching point sequence; The group fusion module is used for applying a conditional random field model to fuse individual pattern recognition results, defining an energy function including a node potential function and an edge potential function, introducing a group synchronicity weight based on a dynamic time warping algorithm, and solving an optimal motion mode label sequence through a Viterbi algorithm; The calorie calculation module is used for applying a corresponding motion mode calorie calculation formula to the sensor data in each time period based on the corrected motion mode label sequence, calculating the calorie consumption for the aerobic exercise mode by multiplying the body weight and the heart rate interval coefficient and the time period length, calculating the calorie consumption for the anaerobic exercise mode by multiplying the body weight and the metabolic equivalent and the acceleration integral value, and accumulating the calorie consumptions of all time periods to obtain a total calorie integral; The social analysis module is used for obtaining the friend relationship, interaction frequency and exercise record sharing situation between the participants from a social platform interface, normalizing the interaction frequency and exercise record sharing situation and obtaining a relationship strength weight through weighted summation, constructing a social network topology graph, applying a feature vector centrality algorithm to identify high influence nodes in the social network and generating a trust weight vector; The trust adjustment module is used for applying a Bayesian inference method to integrate the data of members with different trust levels, weighting and fusing the calorie calculation results of each participant by using the trust weight vector, updating the posterior distribution of the motion mode parameters through a Bayesian formula, adjusting the calorie calculation parameters in each motion mode according to the posterior distribution, and generating a final calorie integral result.
