A motion-sensing skiing game method based on function fitting

By fitting the skiing motion function to motion-sensing data, the accuracy and generalization problems of skiing motion recognition in existing motion-sensing game solutions are solved, achieving high-precision and efficient skiing motion recognition that is adaptable to different users and scenarios.

CN116650952BActive Publication Date: 2026-05-26SHENZHEN HULE TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HULE TECHNOLOGY CO LTD
Filing Date
2023-06-05
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing motion-sensing game solutions suffer from limited generalization performance and low recognition accuracy in skiing motion recognition. In particular, solutions based on the Kinetic architecture have poor adaptability to differences in different body structures, while solutions based on machine learning models suffer from gyroscope linear drift problems.

Method used

Skiing motion functions are obtained by fitting motion data. Acceleration and gyroscope data are used to fit skiing flip and jump motion functions respectively. Multinomial and linear functions are combined for motion recognition to improve the accuracy and generalization of motion recognition.

Benefits of technology

It achieves accurate recognition and generalization of skiing movements, improves game efficiency, and has high adaptability and flexibility, adapting to different types of skiing movements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116650952B_ABST
    Figure CN116650952B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and computer-readable storage medium for a motion-sensing skiing game based on function fitting. The method includes: after the motion-sensing skiing game is started, acquiring motion data from a bound motion-sensing device; fitting the motion data to obtain a skiing action function representing the user's current sliding action; identifying the skiing action performed by the user based on the skiing action function; and controlling the game character to perform skiing operations based on the user's skiing action. The motion-sensing skiing game method based on function fitting of this invention has advantages such as high action recognition accuracy, strong generalization, high flexibility, and simplicity and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motion-sensing game technology, and in particular to a method, apparatus, device, and computer-readable storage medium for a motion-sensing skiing game based on function fitting. Background Technology

[0002] Motion-sensing games are a type of game that uses the user's body movements to control the behavior of game characters and the progress of the game.

[0003] Currently, there are two main motion-sensing game solutions on the market:

[0004] 1. Based on the Kinetic architecture, it utilizes time-slot depth images and the human skeleton to determine the amplitude and direction of motion through a trajectory point model. 2. Based on machine learning models, it uses gyroscope data to train support vector machines and other models, and identifies user actions through an action recognition model.

[0005] Both of these approaches have drawbacks:

[0006] 1. Kinetic-based solutions have limited generalization performance due to significant differences in human anatomy. 2. Machine learning-based solutions have low recognition accuracy because gyroscopes suffer from linear drift, and different gyroscopes exhibit varying degrees of drift. Summary of the Invention

[0007] This application provides a motion-sensing skiing game method based on function fitting, aiming to improve the accuracy and generalization of skiing action recognition in motion-sensing skiing games.

[0008] After the motion-sensing skiing game is started, motion data is obtained from the bound motion-sensing device;

[0009] The motion data is fitted to obtain a skiing motion function representing the user's current gliding motion;

[0010] The user's skiing action is identified based on the sliding action function;

[0011] The game character performs skiing actions based on the skiing movements completed by the user.

[0012] In one embodiment, the somatosensory data includes acceleration data and angular velocity data;

[0013] Fitting the motion data yields a skiing motion function representing the user's current gliding motion, including:

[0014] Compare the acceleration data with a first preset threshold;

[0015] If the acceleration data is less than a first preset threshold, then a skiing flip motion function is fitted based on the gyroscope data;

[0016] If the acceleration data is greater than a first preset threshold, then a ski jump motion function is fitted based on the acceleration data.

[0017] In one embodiment, fitting a ski flip motion function based on the gyroscope data includes:

[0018] The trajectory data of the motion sensing device moving in space is generated based on the gyroscope data;

[0019] The trajectory data is fitted into a preset polynomial function to obtain the skiing flip action function.

[0020] In one embodiment, generating trajectory data of the motion-sensing device moving in space based on the gyroscope data includes:

[0021] A grid map composed of multiple grid cells and a virtual rigid body matching the motion-sensing device are generated on the game terminal where the motion-sensing game is played.

[0022] The position of the virtual rigid body in the grid map is updated based on the gyroscope data;

[0023] The coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid map are recorded as the trajectory data.

[0024] In one embodiment, fitting a ski jump motion function based on the acceleration data includes:

[0025] Based on the acceleration data, generate velocity change data of the motion sensing device over time;

[0026] The speed change data is imported into a preset linear function for fitting to obtain the ski jump action function.

[0027] In one embodiment, generating velocity change data of the motion sensing device over time based on the acceleration data includes:

[0028] A grid coordinate system consisting of multiple grid cells and a virtual rigid body matching the motion-sensing device are generated on the game terminal executing the motion-sensing game.

[0029] The position of the virtual rigid body in the mesh coordinate system is updated according to the acceleration.

[0030] The coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid coordinate system are recorded as the velocity change data.

[0031] In one embodiment, identifying the skiing action performed by the user based on the sliding action function includes:

[0032] Calculate the first similarity between the ski flip action function and the preset ski flip action function;

[0033] Calculate the second similarity between the current ski jump action function and the preset ski jump action function;

[0034] If the first similarity is greater than the second preset threshold, it is determined that the user has completed the ski flip action;

[0035] If the second similarity is greater than the third preset threshold, it is determined that the user has added a ski jump action.

[0036] To achieve the above objectives, this application also proposes a motion-sensing skiing game device based on function fitting, comprising:

[0037] The acquisition module is used to acquire motion data from the bound motion-sensing device after the motion-sensing skiing game is launched;

[0038] The fitting module is used to fit the motion data to obtain a skiing motion function representing the user's current sliding motion;

[0039] The recognition module is used to recognize the skiing action performed by the user based on the sliding action function;

[0040] The execution module is used to control the game character to perform skiing operations based on the skiing actions performed by the user.

[0041] To achieve the above objectives, this application also proposes a motion-sensing skiing game device based on function fitting, including a memory, a processor, and a motion-sensing skiing game program based on function fitting stored in the memory and executable on the processor. When the processor executes the motion-sensing skiing game program based on function fitting, it implements the motion-sensing skiing game method based on function fitting as described in any of the above claims.

[0042] To achieve the above objectives, embodiments of this application also propose a computer-readable storage medium storing a motion-sensing skiing game program based on function fitting. When the motion-sensing skiing game program based on function fitting is executed by a processor, it implements the motion-sensing skiing game method based on function fitting as described in any of the preceding claims.

[0043] It is understood that the motion-sensing skiing game method based on function fitting in this application obtains a skiing action function by fitting the motion trajectory data. Finally, based on this function, the user's skiing action type is identified, and the game character is controlled to perform corresponding skiing actions. Thus, on the one hand, the function fitting method can model and describe the user's skiing actions based on actual skiing trajectory data. By fitting the function, the details and features of skiing actions can be accurately captured, thus more accurately reflecting the real characteristics of skiing actions and improving the accuracy of action recognition. On the other hand, function fitting can learn universally applicable action patterns and rules from sample data, enabling the recognition of new skiing actions and improving the generalization of skiing action type recognition. Furthermore, the function fitting method can select different function forms to model skiing actions according to actual needs. This flexibility allows the function fitting method to adapt to different types of skiing actions, possessing high adaptability and scalability. Moreover, the calculation and classification of the skiing action function can be completed in a short time, improving game efficiency. Therefore, compared with traditional motion-sensing game solutions, the motion-sensing skiing game method of this application has advantages such as high action recognition accuracy, strong generalization, high flexibility, and simplicity and efficiency. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0045] Figure 1 This is a block diagram of an embodiment of the motion-sensing skiing game device based on function fitting according to the present invention;

[0046] Figure 2 This is a flowchart illustrating an embodiment of the motion-sensing skiing game method based on function fitting according to the present invention.

[0047] Figure 3 This is a block diagram of an embodiment of the motion-sensing skiing game device based on function fitting according to the present invention.

[0048] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0049] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0050] To better understand the above technical solutions, exemplary embodiments of this disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art.

[0051] It should be noted that any reference signs placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The quantifier "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of "first," "second," and "third," etc., does not indicate any order and can be interpreted as names.

[0052] like Figure 1 As shown, Figure 1 This is a schematic diagram of the hardware operating environment server 1 (also called a motion-sensing skiing game device based on function fitting) involved in the embodiment of the present invention.

[0053] The server in this embodiment of the invention includes devices with display functions such as "Internet of Things devices", smart air conditioners, smart lights, smart power supplies with network connectivity, AR / VR devices with network connectivity, smart speakers, autonomous vehicles, PCs, smartphones, tablets, e-book readers, and portable computers.

[0054] like Figure 1 As shown, the server 1 includes: a memory 11, a processor 12, and a network interface 13.

[0055] The memory 11 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the server 1, such as the hard disk of the server 1. In other embodiments, the memory 11 can also be an external storage device of the server 1, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the server 1.

[0056] Furthermore, the memory 11 may include both internal storage units of the server 1 and external storage devices. The memory 11 can be used not only to store application software and various types of data installed on the server 1, such as the code of the motion-sensing skiing game program 10 implemented based on function fitting, but also to temporarily store data that has been output or will be output.

[0057] In some embodiments, processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 11 or process data, such as executing a motion-sensing skiing game program 10 based on function fitting.

[0058] The network interface 13 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface), which is typically used to establish communication connections between the server 1 and other electronic devices.

[0059] The network can be the Internet, a cloud network, a Wi-Fi network, a Personal Area Network (PAN), a Local Area Network (LAN), and / or a Metropolitan Area Network (MAN). Various devices in the network environment can be configured to connect to the communication network according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of the following: Transmission Control Protocol and Internet Protocol (TCP / IP), User Datagram Protocol (UDP), Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, Li-Fi, 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communication, wireless access points (APs), device-to-device communication, cellular communication protocols, and / or Bluetooth communication protocols, or combinations thereof.

[0060] Optionally, the server may also include a user interface, which may include a display, an input unit such as a keyboard, and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be referred to as a screen or display unit, used to display information processed in server 1 and to display a visual user interface.

[0061] Figure 1Only a server 1 with components 11-13 and a motion-sensing skiing game program 10 implemented based on function fitting is shown. Those skilled in the art will understand that... Figure 1 The structure shown does not constitute a limitation on server 1 and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0062] In this embodiment, the processor 12 can be used to call the motion-sensing skiing game program based on function fitting stored in the memory 11, and perform the following operations:

[0063] After the motion-sensing skiing game is started, motion data is obtained from the bound motion-sensing device;

[0064] The motion data is fitted to obtain a skiing motion function representing the user's current gliding motion;

[0065] The user's skiing action is identified based on the sliding action function;

[0066] The game character performs skiing actions based on the skiing movements completed by the user.

[0067] In one embodiment, the processor 12 can be used to invoke a motion-sensing skiing game program based on function fitting stored in the memory 11, and perform the following operations:

[0068] Compare the acceleration data with a first preset threshold;

[0069] If the acceleration data is less than a first preset threshold, then a skiing flip motion function is fitted based on the gyroscope data;

[0070] If the acceleration data is greater than a first preset threshold, then a ski jump motion function is fitted based on the acceleration data.

[0071] In one embodiment, the processor 12 can be used to invoke a motion-sensing skiing game program based on function fitting stored in the memory 11, and perform the following operations:

[0072] The trajectory data of the motion sensing device moving in space is generated based on the gyroscope data;

[0073] The trajectory data is fitted into a preset polynomial function to obtain the skiing flip action function.

[0074] In one embodiment, the processor 12 can be used to invoke a motion-sensing skiing game program based on function fitting stored in the memory 11, and perform the following operations:

[0075] A grid map composed of multiple grid cells and a virtual rigid body matching the motion-sensing device are generated on the game terminal where the motion-sensing game is played.

[0076] The position of the virtual rigid body in the grid map is updated based on the gyroscope data;

[0077] The coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid map are recorded as the trajectory data.

[0078] In one embodiment, the processor 12 can be used to invoke a motion-sensing skiing game program based on function fitting stored in the memory 11, and perform the following operations:

[0079] Based on the acceleration data, generate velocity change data of the motion sensing device over time;

[0080] The speed change data is imported into a preset linear function for fitting to obtain the ski jump action function.

[0081] In one embodiment, the processor 12 can be used to invoke a motion-sensing skiing game program based on function fitting stored in the memory 11, and perform the following operations:

[0082] A grid coordinate system consisting of multiple grid cells and a virtual rigid body matching the motion-sensing device are generated on the game terminal executing the motion-sensing game.

[0083] The position of the virtual rigid body in the mesh coordinate system is updated according to the acceleration.

[0084] The coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid coordinate system are recorded as the velocity change data.

[0085] In one embodiment, the processor 12 can be used to invoke a motion-sensing skiing game program based on function fitting stored in the memory 11, and perform the following operations:

[0086] Calculate the first similarity between the ski flip action function and the preset ski flip action function;

[0087] Calculate the second similarity between the current ski jump action function and the preset ski jump action function;

[0088] If the first similarity is greater than the second preset threshold, it is determined that the user has completed the ski flip action;

[0089] If the second similarity is greater than the third preset threshold, it is determined that the user has added a ski jump action.

[0090] Based on the hardware architecture of the motion-sensing skiing game device implemented using function fitting described above, an embodiment of the motion-sensing skiing game method based on function fitting of the present invention is proposed. The motion-sensing skiing game method based on function fitting of the present invention aims to improve the accuracy and generalization of skiing motion recognition in motion-sensing skiing games.

[0091] Reference Figure 2 , Figure 2 This is an embodiment of the motion-sensing skiing game method based on function fitting of the present invention. The motion-sensing skiing game method based on function fitting includes the following steps:

[0092] S10. After the motion-sensing skiing game is started, motion-sensing data is obtained from the bound motion-sensing device.

[0093] Among these, the motion-sensing game is a motion-sensing skiing game. This type of virtual reality game uses motion-sensing technology and special sensors and equipment to allow players to participate in a realistic skiing experience. Compared to traditional game controllers or keyboards, motion-sensing skiing games capture the player's real movements and postures and translate them into skiing actions within the game.

[0094] Alternatively, the motion-sensing skiing game can be a web-based web game, an HTML5-based mini-program, or a standalone app.

[0095] Motion-sensing devices are a type of device used to capture, recognize, and translate a player's body movements. They typically include sensors, controllers, and related hardware components, and are designed for use in conjunction with interactive experience technologies such as video games, virtual reality, and augmented reality. In the technical solution of this application, the motion-sensing device collects the user's motion data, which includes three-axis angular velocity data and three-axis acceleration data.

[0096] Alternatively, the motion-sensing devices used in the technical solutions of this application may include, but are not limited to, mobile phones, wristbands, watches, rings, game controllers, wrist straps, etc., equipped with gyroscopes.

[0097] Furthermore, motion sensing data refers to information about human movement and posture collected through motion sensing devices (such as accelerometers, gyroscopes, and posture sensors). This data can reflect the user's body movements, acceleration, rotation, and other motion characteristics.

[0098] For example, motion-sensing data includes acceleration data, angular velocity data, posture data, and position data. Acceleration data, collected by an accelerometer, represents changes in the user's acceleration and can be used to detect acceleration, deceleration, and direction of movement. Angular velocity data, collected by a gyroscope or rotation sensor, represents changes in the user's angular velocity and can be used to detect rotation, turning, and other movements. Posture data, collected by a posture sensor or other sensors, represents the user's body posture information and can be used to detect changes in posture and movement of body parts. Position data is the user's location coordinates obtained using a Global Positioning System (GPS).

[0099] Optionally, the motion-sensing device can be connected to the game terminal via USB, Bluetooth, or 2.4G. The game terminal refers to the terminal that runs motion-sensing games, which can be a mobile terminal such as a mobile phone, tablet, laptop, or handheld console, or a fixed terminal such as a desktop computer or home console.

[0100] After the motion-sensing skiing game is launched, the game terminal can obtain data from the gyroscope of the motion-sensing device based on the connection protocol with the motion-sensing device.

[0101] S20. Fit the motion data to obtain a skiing motion function representing the user's current sliding motion.

[0102] The swipe action function is a mathematical function used to represent the user's current swipe action. By fitting the motion data to this function, a function model that accurately describes the user's swipe action can be obtained. The swipe action function can output a single value or a set of values ​​based on the user's motion data input, representing the characteristics of the user's swipe action. This function can be linear, nonlinear, or other types of functions, depending on the function fitting algorithm used and the required representation accuracy.

[0103] Furthermore, function fitting involves comparing the somatosensory data with a function model and selecting the most suitable function parameters to minimize the error between the function model and the actual data. Common function fitting algorithms include least squares, curve fitting, and polynomial fitting.

[0104] The selection and fitting of the sliding motion function can be designed according to the specific needs of the motion-sensing skiing game. For example, a function can be fitted based on the user's acceleration and angular velocity data to represent the user's sliding speed and direction; or a function can be fitted based on the user's body posture data to represent the user's body tilt angle and posture changes.

[0105] It's understandable that by using a sliding motion function, the user's sliding motion can be accurately identified and mapped to the game character to perform corresponding skiing actions. This function fitting method enables precise capture and feedback of the user's actual skiing movements, enhancing the game's immersion and interactivity.

[0106] S30. Identify the skiing action performed by the user based on the sliding action function.

[0107] In this context, skiing actions refer to the various movements and sequences of movements performed by the user during the simulated skiing process in motion-sensing skiing games. These actions can simulate various elements of real skiing, such as turning, accelerating, decelerating, and jumping.

[0108] For example, in the technical solution of this application, the motion-sensing skiing game may include at least one of the following skiing actions: turning action, acceleration action, deceleration action, flipping action, and jumping action.

[0109] Specifically, to identify the skiing actions performed by a user based on skiing action functions, thresholds or ranges can be set according to the specific needs of the skiing game to determine the user's skiing actions. Alternatively, a motion classifier or rules can be designed based on different skiing action functions and game requirements to determine the specific type of skiing action performed by the user. For example, changes in acceleration and angular velocity can be used to determine whether the user is turning, decelerating, or jumping.

[0110] It's understandable that function fitting is used to identify skiing motion types. On one hand, function fitting methods can model and describe a user's skiing movements based on actual ski trajectory data. By fitting a function, the details and features of skiing movements can be accurately captured, including the starting point, ending point, trajectory shape, and speed changes. Compared to other sensor-based or rule-based methods, function fitting more accurately reflects the characteristics of real skiing movements, improving the accuracy of motion recognition.

[0111] On the other hand, function fitting methods can derive a general skiing function model based on multiple sets of collected sample data. This model can be used to identify skiing actions of different users in different scenarios, exhibiting a certain degree of generalization ability. Through function fitting, universally applicable action patterns and rules can be learned from sample data, enabling the recognition of new skiing actions. This generalization makes function fitting methods highly adaptable and practical.

[0112] Furthermore, function fitting methods can select different function forms to model skiing movements based on actual needs. Depending on the specific situation, polynomial functions, trigonometric functions, Gaussian functions, etc., can be selected to fit ski trajectory data. This flexibility allows function fitting methods to adapt to different types of skiing movements, possessing high adaptability and scalability. Moreover, function fitting methods can perform calculations and inferences quickly, enabling action recognition to be applied in real-time scenarios. The calculation and classification of skiing functions can be completed in a short time, improving game performance.

[0113] S40: Control the game character to perform skiing operations based on the skiing actions completed by the user.

[0114] Specifically, in motion-sensing skiing games, there are corresponding game operation instructions for each type of skiing action. For example, for the turning skiing action, you can control the game character to tilt according to the recognized direction; for the accelerating and decelerating skiing actions, you can increase or decrease the speed of the game character accordingly; for the jumping skiing action, you can control the game character to jump; and for the flip skiing action, you can control the game character to jump and flip in the air.

[0115] The specific control methods and operational details can be adjusted and implemented according to the characteristics of the game design and development platform.

[0116] Based on the above, after determining the type of skiing action performed by the user, the corresponding game operation instructions can be passed to the game character for execution. This can be achieved through interaction with the game engine or controller, such as through programming interfaces or controller input, to pass instructions to the game system. In this way, the user's skiing actions can be reproduced.

[0117] It is understood that the motion-sensing skiing game method based on function fitting in this application obtains a skiing action function by fitting the motion trajectory data. Finally, based on this function, the user's skiing action type is identified, and the game character is controlled to perform corresponding skiing actions. Thus, on the one hand, the function fitting method can model and describe the user's skiing actions based on actual skiing trajectory data. By fitting the function, the details and features of skiing actions can be accurately captured, thus more accurately reflecting the real characteristics of skiing actions and improving the accuracy of action recognition. On the other hand, function fitting can learn universally applicable action patterns and rules from sample data, enabling the recognition of new skiing actions and improving the generalization of skiing action type recognition. Furthermore, the function fitting method can select different function forms to model skiing actions according to actual needs. This flexibility allows the function fitting method to adapt to different types of skiing actions, possessing high adaptability and scalability. Moreover, the calculation and classification of the skiing action function can be completed in a short time, improving game efficiency. Therefore, compared with traditional motion-sensing game solutions, the motion-sensing skiing game method of this application has advantages such as high action recognition accuracy, strong generalization, high flexibility, and simplicity and efficiency.

[0118] In some embodiments, fitting the motion data to obtain a skiing motion function representing the user's current gliding motion includes:

[0119] S21. Compare the acceleration data with a first preset threshold.

[0120] Specifically, before fitting the skiing motion function, the collected acceleration data is compared with a first preset threshold. If the acceleration data is less than the first preset threshold, step S22 is executed; if the acceleration data is greater than the first preset threshold, step S23 is executed.

[0121] S22. If the acceleration data is less than the first preset threshold, then fit a skiing flip motion function based on the gyroscope data.

[0122] Specifically, if the acceleration data is less than a first preset threshold, it indicates that the user's skiing action may be a flip. In this case, gyroscope data can be used to fit a skiing flip action function. Gyroscope data can provide information about the user's rotation. By inputting the gyroscope data into the fitting algorithm, a skiing flip action function can be obtained to represent the characteristics of the user's current flip action.

[0123] S23. If the acceleration data is greater than the first preset threshold, then fit a ski jump motion function based on the acceleration data.

[0124] Specifically, if the acceleration data is greater than or equal to a first preset threshold, it indicates that the user's skiing action is likely a jump. In this case, the acceleration data can be used to fit a ski jump action function. The acceleration data provides information about changes in the user's acceleration. By inputting the acceleration data into the fitting algorithm, a ski jump action function can be obtained to represent the characteristics of the user's current jump action.

[0125] Based on the above steps, by comparing acceleration data with a first preset threshold, the user's skiing actions are divided into two different types: flips and jumps. This allows for more accurate classification of the user's actions and provides more refined action recognition.

[0126] Furthermore, for flipping motions, gyroscope data can better capture the user's rotational information; for jumping motions, acceleration data can more accurately reflect changes in the user's acceleration. This allows for fitting different data sources based on different motion types, thus helping to improve the accuracy and reliability of skiing motion functions.

[0127] It's worth noting that by setting thresholds and using different fitting algorithms, this method can flexibly adapt to different skiing maneuvers and user needs. It can be extended to more types of skiing maneuvers and adjusted and optimized based on actual conditions.

[0128] In some embodiments, fitting a ski flip motion function based on the gyroscope data includes:

[0129] S221. Generate trajectory data of the motion sensing device moving in space based on the gyroscope data.

[0130] Among these, trajectory data is used to record the motion trajectory of the motion sensing device in space, in order to represent the user's skiing motion trajectory.

[0131] Specifically, gyroscope data can be converted into spatial coordinate values ​​using methods such as rotation matrices and quaternion algorithms. These spatial coordinate values ​​can then be mapped to time series data to generate trajectory data of the motion sensing device in space.

[0132] It is worth noting that when converting gyroscope data, we can preprocess the data, such as filtering, interpolation, and normalization, to improve the quality and usability of the data.

[0133] S222. Substitute the trajectory data into a preset polynomial function for fitting to obtain the skiing flip action function.

[0134] Specifically, the preset polynomial function is a cubic polynomial function. This preset cubic polynomial function is a mathematical function model selected based on the specific needs and design of the motion-sensing skiing game; its essence is the mathematical expression of skiing movements. In other words, the skiing function obtained by fitting the trajectory data from the motion-sensing device is the mathematical expression of the user's current skiing movement.

[0135] Understandably, cubic polynomial functions possess a smoothing property, which helps reduce the influence of noise and oscillations in swing data, thereby minimizing the impact of gyroscope drift on motion recognition accuracy. Thus, although the degree of drift may vary among different gyroscopes, fitting with a cubic polynomial function can approximately capture the overall trend of the gyroscope data, resulting in a better fit for data variations within a smaller range. Therefore, fitting with a cubic polynomial function can, to some extent, balance the influence of different gyroscope drift levels, improving recognition accuracy.

[0136] Meanwhile, cubic polynomial functions can adapt to different types of swing motions and flexibly fit various shapes and curves. This allows it to handle variations in different swing motions, such as swings with different speeds, angles, or forces. By adjusting the coefficients and parameters of the function, it can adapt to different types of swing motions, thereby improving the generalization and accuracy of recognition.

[0137] Furthermore, compared to more complex nonlinear functions or machine learning models, cubic polynomial function fitting is computationally simple and efficient. It does not require large amounts of training data or complex training processes, nor does it require complex parameter tuning. This makes cubic polynomial function fitting easier to implement and apply, reducing the complexity of processing gyroscope data.

[0138] In some embodiments, generating trajectory data of the motion sensing device moving in space based on the gyroscope data includes:

[0139] S110. Generate a grid map composed of multiple grid cells and a virtual rigid body that matches the motion-sensing device on the game terminal executing the motion-sensing game.

[0140] Among these, a grid map is an image representation method that divides space into regular grid units. It divides the entire space into discrete small regions, each region called a grid unit, which can be square, rectangular, or other shapes. Each grid unit has a unique identifier and coordinates to represent its position within the entire map. In the technical solution of this application, the grid map is used to represent the layout of a game scene. Each grid unit can correspond to a fixed-size region or grid, used to record the position of a virtual rigid body in the game.

[0141] Specifically, after the motion-sensing skiing game starts, a grid map can be constructed based on preset initialization parameters. This grid map can be a two-dimensional map (such as a planar map) or a three-dimensional map (such as a stereoscopic scene). It is worth noting that, according to the preset initialization parameters, the size of each grid cell and the coordinate values ​​of each grid cell are determined at the same time as the grid map is generated.

[0142] Furthermore, a rigid body refers to an object in the physical world that has a fixed shape and mass and does not deform or bend. A virtual rigid body is a virtual model with corresponding physical properties. In the technical solution of this application, the virtual rigid body is used to record the movement trajectory of the motion sensing device in a grid map.

[0143] S120. Update the position of the virtual rigid body in the grid map according to the gyroscope data.

[0144] Specifically, gyroscope data can be converted into coordinate values ​​of a grid map using methods such as equations of motion and integration methods (e.g., Euler's method or Runge-Kutta's method), thereby updating the position of the virtual rigid body in the grid map.

[0145] S130. Record the coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid map as the trajectory data.

[0146] Specifically, a data structure can be created to store the coordinate data of the mesh cells traversed by the virtual rigid body. Data structures such as arrays, lists, and matrices can be used to represent the trajectory data. During gameplay, the coordinate values ​​of the mesh cells where the virtual rigid body is located can be recorded into the trajectory data structure based on the time sequence, serving as the trajectory data of the motion-sensing device in space.

[0147] It is understandable that the above scheme, by representing the trajectory data of the motion-sensing device as processed grid coordinates, can convert a continuous sequence of coordinates into a discrete sequence of grid cells. This removes minute variations between adjacent coordinates, reducing data redundancy and duplication, thereby optimizing data representation and storage, and improving the efficiency of motion trajectory calculation.

[0148] In some embodiments, the expression for the preset cubic polynomial function is as follows:

[0149] y = ax 3 +bx 2 +cx+d;

[0150] In the formula, a, b, c, and d are the fitting parameters to be obtained for the fitting function.

[0151] Specifically, x represents the x-axis coordinate of a grid cell in the grid map, y represents the y-axis coordinate of a grid cell in the grid map, and a, b, c, and d are the corresponding coefficients and constants.

[0152] It is worth noting that the design of this application is not limited to this. In other embodiments, the cubic polynomial function can also be set as y=a(xh)^3+k, y=a(xh)^3+b(xh)^2+c(xh)+d, y=a(xh)(xp)(xq), etc.

[0153] In some embodiments, fitting the trajectory data into a preset cubic polynomial function yields a swing function, including:

[0154] S210. Construct a two-dimensional matrix X based on the x-axis coordinates and the degree of the polynomial function in the coordinate data.

[0155] Specifically, assuming there are n coordinate data points, the size of matrix X is n × (degree + 1). Each row corresponds to an x-axis coordinate, and each column corresponds to the power of a polynomial function.

[0156] For example, for a cubic polynomial function, if there are 3 coordinate data points (x1, x2, x3), then matrix X can be represented as:

[0157] X = [

[0158] [x1^3,x1^2,x1,1],

[0159] [x2^3,x2^2,x2,1],

[0160] [x3^3,x3^2,x3,1]

[0161] ].

[0162] S220. Construct a one-dimensional matrix Y based on the y-axis coordinates in the coordinate data.

[0163] Specifically, the size of matrix Y is n×1, where each row corresponds to a y-axis coordinate.

[0164] For example, corresponding to the y-axis coordinates (y1, y2, y3) of the three coordinate data points mentioned above, the matrix Y can be represented as:

[0165] Y = [

[0166] [y1],

[0167] [y2],

[0168] [y3]

[0169] ].

[0170] S230. Calculate the transpose matrix XT of matrix X.

[0171] Specifically, the size of XT is (number of times + 1) × n.

[0172] S240, Calculate the product matrix XTX of matrix XT and matrix X.

[0173] Specifically, XTX = XT × X.

[0174] S250. Solve the linear equation XTX×C=XTY to obtain a one-dimensional matrix C, where the one-dimensional matrix C represents the coefficients of the polynomial function, i.e. the fitting parameters to be found.

[0175] Specifically, C = inv(XTX) × XT × Y, where inv(XTX) represents the inverse matrix of XTX.

[0176] S260. Output the swing function based on matrix C.

[0177] Specifically, the swing function can be expressed as: y=C[0]*x^3+C[1]*x^2+C[2]*x+C[3]. Where C[0], C[1], C[2], and C[3] are elements in matrix C.

[0178] It is understandable that by using the steps S210-S260 above, the least squares method can be used to fit a cubic polynomial function.

[0179] In some embodiments, fitting a ski jump motion function based on the acceleration data includes:

[0180] S310. Generate speed change data of the motion sensing device over time based on the acceleration data.

[0181] Specifically, the speed of the motion-sensing device can be calculated over time by integrating the acceleration, which will generate a time series of speed data representing the speed change of the motion-sensing device.

[0182] In some embodiments, generating velocity change data of the motion sensing device over time based on the acceleration data includes:

[0183] S311. Generate a grid coordinate system consisting of multiple grid cells and a virtual rigid body that matches the motion-sensing device on the game terminal executing the motion-sensing game.

[0184] Specifically, on the game terminal executing the motion-sensing game, a grid coordinate system consisting of multiple grid cells is created. Simultaneously, a virtual rigid body matching the motion-sensing device is created; this rigid body will be used to simulate the movement of the motion-sensing device within the game space.

[0185] S312. Update the position of the virtual rigid body in the grid coordinate system according to the acceleration.

[0186] Specifically, acceleration data provides information on the acceleration changes of the motion-sensing device in various directions. Through integration or other numerical methods, acceleration data can be converted into velocity data and used to update the position of the virtual rigid body in the mesh coordinate system.

[0187] S313. Record the coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid coordinate system as the velocity change data.

[0188] Specifically, during the movement of the virtual rigid body, the coordinate data of the mesh cells it passes through are recorded. Whenever the virtual rigid body crosses the boundary of a mesh cell, the coordinates of the current mesh cell are recorded. This coordinate data will be used as velocity change data, representing information about how the motion sensing device's velocity changes over time.

[0189] It is understandable that the above scheme, by representing the speed change data of the motion sensing device as processed grid coordinates, can convert a continuous coordinate sequence into a discrete grid cell sequence. This removes small changes between adjacent coordinates, reducing data redundancy and duplication, thereby optimizing data representation and storage, and improving the efficiency of motion trajectory calculation.

[0190] S320. The speed change data is imported into a preset linear function for fitting to obtain the ski jump action function.

[0191] For example, the expression of the preset linear function is: y = ax + b; where y is the coordinate value of the y-axis in the grid coordinate system; x is the coordinate value of the x-axis in the grid coordinate system; and a and b are the fitting parameters to be determined.

[0192] Specifically, a and b represent the slope and intercept of the linear function mentioned above, respectively.

[0193] Specifically, the generated speed change data is imported into a preset linear function, and a fitting algorithm is used to fit the data. The fitting algorithm can find the optimal linear relationship based on the distribution of data points and generate a ski jump action function.

[0194] Understandably, the linear function y = ax + b is a simple and intuitive expression for a linear function, easy to understand and implement. Its simplicity also allows for rapid calculation in practical applications, improving fitting efficiency. Furthermore, the slope parameter 'a' reflects the inclination of the fitted line, and the intercept parameter 'b' represents the intersection of the fitted line with the coordinate axes. The values ​​of these parameters can be used to interpret the fitting results, thus providing a visual representation of the current ski jump action.

[0195] Of course, the design of this application is not limited to this. In other embodiments, other linear functions may be used as the preset linear function, such as y = mx; y = a o +a1x1+a2x2+...+a n x n ; y = a0 + a1x1 + a2x1 2 +...+a n x1 n wait.

[0196] Alternatively, a preset linear function can be fitted using the least squares method, and the desired fitting parameters a and b can be obtained by minimizing the fit.

[0197] Specifically, the steps for fitting a pre-defined linear function and calculating the fitting parameters a and b using the least squares method are as follows:

[0198] (1) Calculate the mean values ​​of the independent variable x and the dependent variable y in the velocity change data, expressed as follows: and

[0199]

[0200]

[0201] (2) Calculate the deviation between each data sample point and the mean, expressed as follows: and

[0202] (3) Calculate the slope:

[0203] (4) Calculate the intercept:

[0204] It is understandable that linear functions typically possess relatively stable properties within a certain range. Thus, although acceleration data provided by different motion-sensing devices may contain some degree of error or drift, fitting a linear function can approximately capture the overall trend of the acceleration data, resulting in a better fit even with data variations within a relatively small range. Therefore, fitting a linear function can, to some extent, balance the influence of drift from different motion-sensing devices and improve recognition accuracy.

[0205] Furthermore, compared to more complex nonlinear functions or machine learning models, linear function fitting methods are computationally simple and efficient. They do not require large amounts of training data or complex training processes, nor do they require complex parameter tuning. This makes linear function fitting easier to implement and apply, reducing the complexity of processing gyroscope data.

[0206] Furthermore, by adjusting the preset linear function, it can quickly adapt to different datasets and action types, thereby improving the adaptability of the motion-sensing skiing game to different users, and the action recognition scheme has stronger generalization.

[0207] It is worth noting that the design of this application is not limited to this. In other embodiments, the preset linear function can also be fitted by methods such as gradient descent and maximum likelihood.

[0208] It is also worth noting that in other embodiments, other more complex functions or nonlinear regression methods can be tried to better fit the characteristics and patterns of the swing motion.

[0209] In some embodiments, identifying the skiing action performed by the user based on the sliding action function includes:

[0210] S31. Calculate the first similarity between the ski flip action function and the preset ski flip action function.

[0211] S32. Calculate the second similarity between the current ski jump action function and the preset ski jump action function;

[0212] S33. If the first similarity is greater than the second preset threshold, it is determined that the user has completed the skiing flip action;

[0213] S34. If the second similarity is greater than the third preset threshold, it is determined that the user has added a ski jump action.

[0214] Specifically, the degree of similarity between a user's ski flip action function and a preset ski flip action function can be obtained by calculating the cosine similarity or Euclidean distance between them. Similarly, the degree of similarity between a user's ski jump action function and a preset ski jump action function can be obtained by calculating the cosine similarity or Euclidean distance between them.

[0215] For example, to calculate the Euclidean distance between a user's skiing flip action function and a preset skiing flip action function, the following steps can be taken:

[0216] Step 1: Obtain the user's ski flip action function and the preset ski flip action function.

[0217] Step 2: Ensure the two functions have the same dimensions. If the functions are represented as vectors, ensure the two vectors have the same dimensions. If the functions are represented in other forms (such as curves, polynomials, etc.), they need to be converted to a representation with the same dimensions.

[0218] Step 3: Subtract corresponding components: Subtract each component in the preset ski flip action function from the corresponding component in the user's ski flip action function to obtain a difference vector.

[0219] Step 4: Squaring each component of the difference vector: Squaring each component of the difference vector.

[0220] Step 5: Sum the squared results: Sum the squared results from Step 4 to obtain a total.

[0221] Step 6: Take the square root of the sum: Perform a square root operation on the sum in Step 5 to obtain the final Euclidean distance.

[0222] In this way, the similarity between a user's skiing flip action function and a preset skiing flip action function can be measured by calculating the Euclidean distance. The smaller the Euclidean distance, the smaller the difference between the two functions, and the higher the similarity.

[0223] It's understandable that setting a second and third preset threshold to determine whether a user has completed a ski flip or a ski jump, respectively, allows for targeted setting of different preset thresholds based on the type of skiing action, thereby improving the accuracy of action recognition. Furthermore, setting different thresholds for different actions allows for adjustment of the action judgment conditions according to specific needs and application scenarios, adapting to different users.

[0224] In addition, refer to Figure 3This invention also proposes a motion-sensing skiing game device based on function fitting, the motion-sensing skiing game device based on function fitting includes:

[0225] The acquisition module 110 is used to acquire motion data from the bound motion-sensing device after the motion-sensing skiing game is started;

[0226] Fitting module 120 is used to fit the somatosensory data to obtain a skiing motion function representing the user's current sliding motion;

[0227] The recognition module 130 is used to recognize the skiing action performed by the user based on the sliding action function;

[0228] The execution module 140 is used to control the game character to perform skiing operations based on the skiing actions performed by the user.

[0229] The steps for implementing each functional module of the motion-sensing skiing game device based on function fitting can be referred to in the various embodiments of the motion-sensing skiing game method based on function fitting of the present invention, and will not be repeated here.

[0230] Furthermore, this invention also proposes a computer-readable storage medium, which can be any one or any combination of several of the following: hard disk, multimedia card, SD card, flash memory card, SMC, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, etc. The computer-readable storage medium includes a motion-sensing skiing game program 10 implemented based on function fitting. The specific implementation of the computer-readable storage medium of this invention is largely the same as the above-described motion-sensing skiing game method based on function fitting and the specific implementation of the server 1, and will not be repeated here.

[0231] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0232] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0233] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0234] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0235] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0236] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for creating a motion-sensing skiing game based on function fitting, characterized in that, include: After the motion-sensing skiing game is started, motion-sensing data is obtained from the bound motion-sensing device, including acceleration data and gyroscope data; The motion data is fitted to obtain a skiing motion function representing the user's current gliding motion; The user's skiing action is identified based on the sliding action function; The game character performs skiing actions based on the skiing movements performed by the user; among them, Fitting the motion data yields a skiing motion function representing the user's current gliding motion, including: Compare the acceleration data with a first preset threshold; If the acceleration data is less than a first preset threshold, then the trajectory data of the motion sensing device moving in space is generated based on the gyroscope data, and the trajectory data is substituted into a preset polynomial function for fitting to obtain the skiing flip motion function; If the acceleration data is greater than a first preset threshold, then the speed change data of the motion sensing device over time is generated based on the acceleration data, and the speed change data is imported into a preset linear function for fitting to obtain a ski jump motion function.

2. The motion-sensing skiing game method based on function fitting as described in claim 1, characterized in that, Based on the gyroscope data, trajectory data of the motion-sensing device's movement in space is generated, including: A grid map composed of multiple grid cells and a virtual rigid body matching the motion-sensing device are generated on the game terminal where the motion-sensing game is played. The position of the virtual rigid body in the grid map is updated based on the gyroscope data; The coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid map are recorded as the trajectory data.

3. The motion-sensing skiing game method based on function fitting as described in claim 1, characterized in that, Based on the acceleration data, velocity change data of the motion sensing device over time is generated, including: A grid coordinate system consisting of multiple grid cells and a virtual rigid body matching the motion-sensing device are generated on the game terminal executing the motion-sensing game. The position of the virtual rigid body in the mesh coordinate system is updated according to the acceleration. The coordinate data of the grid cells that the virtual rigid body passes through during its movement in the grid coordinate system are recorded as the velocity change data.

4. The motion-sensing skiing game method based on function fitting as described in claim 1, characterized in that, The skiing motion function identifies the user's skiing actions, including: Calculate the first similarity between the ski flip action function and the preset ski flip action function; Calculate the second similarity between the current ski jump action function and the preset ski jump action function; If the first similarity is greater than the second preset threshold, it is determined that the user has completed the ski flip action; If the second similarity is greater than the third preset threshold, it is determined that the user has added a ski jump action.

5. A motion-sensing skiing game device based on function fitting, used to implement the motion-sensing skiing game method as described in any one of claims 1 to 4, characterized in that, The motion-sensing skiing game device includes: The acquisition module is used to acquire motion data from the bound motion-sensing device after the motion-sensing skiing game is launched; The fitting module is used to fit the motion data to obtain a skiing motion function representing the user's current sliding motion; The recognition module is used to recognize the skiing action performed by the user based on the sliding action function; The execution module is used to control the game character to perform skiing operations based on the skiing actions performed by the user.

6. A motion-sensing skiing game device based on function fitting, characterized in that, The system includes a memory, a processor, and a motion-sensing skiing game program based on function fitting stored in the memory and executable on the processor. When the processor executes the motion-sensing skiing game program based on function fitting, it implements the motion-sensing skiing game method based on function fitting as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a motion-sensing skiing game program based on function fitting, which, when executed by a processor, implements the motion-sensing skiing game method based on function fitting as described in any one of claims 1-4.