Method for displaying motion data based on virtual characters
By acquiring motion data resources of virtual characters and real-time motion status data of users, the problem of venue limitations during fitness is solved, realizing an efficient virtual reality fitness method and improving users' fitness efficiency and movement accuracy.
Patent Information
- Application Number
- CN202210523613.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-05-13
AI Technical Summary
In existing technologies, users are limited by factors such as venue, time, and weather during fitness training, making it difficult to conduct effective and scientific exercise training, and watching video coaches is not very effective.
By acquiring the motion data resources of virtual characters, the system can obtain users' motion status data in real time and load and display status similarity comparison data on the client to assist users in exercising synchronously online and offline.
It enables an efficient and realistic virtual reality fitness method without location restrictions, improving users' fitness efficiency and motivation, and providing scientific movement guidance.
Smart Images

Figure CN117115901B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a method for displaying motion data based on virtual characters. Background Technology
[0002] In related technologies, public health has become a trend. A healthy body can guarantee the physical and mental health of users, enabling them to achieve healthy and efficient work performance.
[0003] However, due to limitations such as venue, time, and weather, fitness activities can usually only be carried out in gyms or limited outdoor spaces. If a coach is needed, additional fees will be required. If training is simply done by watching videos, the desired results may not be achieved due to the lack of scientific methods, ultimately leading to unsatisfactory outcomes.
[0004] There are currently no effective solutions to the aforementioned problems in the relevant technologies. Summary of the Invention
[0005] This invention provides a method for displaying motion data based on virtual characters.
[0006] According to an embodiment of the present invention, a method for displaying motion data based on a virtual character is provided, comprising: acquiring motion data resources of a first virtual character, wherein the motion data resources include at least one of the following of the first virtual character: first body model data, first motion state data; acquiring second motion state data of a first target object in real time; comparing the first motion state data with the second motion state data to generate first comparison data, wherein the first comparison data is used to characterize the similarity of the states of the first target object and the first virtual character during motion; and loading and displaying the first comparison data on a client.
[0007] Optionally, after acquiring the second motion state data of the first target object in real time, the method further includes: acquiring the third motion state data of the second target object in real time; comparing the second motion state data and the third motion state data to generate second comparison data, wherein the second comparison data is used to characterize the state similarity between the first target object and the second target object during the motion process; and loading and displaying the second comparison data on the client.
[0008] Optionally, comparing the second motion state data and the third motion state data includes: using the first motion state data as reference data, calculating a first similarity between the second motion state data and the first motion state data, and calculating a second similarity between the third motion state data and the first motion state data; and comparing the first similarity and the second similarity.
[0009] Optionally, when loading and displaying the first comparison data on the client, the method further includes: dynamically loading a second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object; and / or, dynamically loading the first virtual character on the client using the motion data resources.
[0010] Optionally, acquiring the motion data resources of the first virtual character includes: performing a 3D scan or 3D modeling of a specific object to generate the first body model data; and collecting the first motion state data of the specific object in real time during the motion process, wherein the first motion state data includes the specific object's: vital sign data of body organs, motion action images, and body deformation parameters.
[0011] Optionally, before acquiring the second motion state data of the first target object in real time, the method further includes: determining the exercise to be performed by the first target object; finding a first body part related to the exercise; finding the target model data of the first body part, wherein the target model data is the model data of the first body part after it has been exercised; adjusting the first body part of the second virtual character using the target model data, and updating the body model data of the second virtual character, wherein the first target object corresponds to the second virtual character; and preloading and displaying the updated second virtual character on the client.
[0012] Optionally, comparing the first motion state data with the second motion state data to generate the first comparison data includes: performing collision detection on the first virtual character and the second virtual character corresponding to the first target object using the first motion state data and the second motion state data; obtaining the collision position and / or collision area obtained by the collision detection; and generating the first comparison data based on the collision position and / or the collision area.
[0013] Optionally, obtaining the motion data resources of the first virtual character includes: obtaining the body data of the first target object and the target sports to be selected, and selecting motion data resources that match the body data and the target sports from a preset exercise database.
[0014] Optionally, acquiring the second motion state data of the first target object in real time includes: acquiring real-scene images of the first target object in real time using an image acquisition device, and acquiring motion capture data of the first target object in real time using a motion capture device; parsing the motion parameters of the first target object from the motion capture data, and correcting the motion parameters using the real-scene images; mapping the corrected motion parameters to the skeletal model of the target object to generate the second motion state data.
[0015] Optionally, loading and displaying the first comparison data on the client includes: determining whether the first action currently performed by the first virtual character matches the second action currently performed by the second virtual character corresponding to the first target object based on the first comparison data; if the first action does not match the second action, outputting a first prompt message and highlighting a specified part of the second virtual character, wherein the specified part is the force-bearing part or movement part of the first action, and the first prompt message is used to indicate that the second action is not standard or inaccurate.
[0016] According to another embodiment of the present invention, a motion data display device based on a virtual character is provided, comprising: a first acquisition module, configured to acquire motion data resources of a first virtual character, wherein the motion data resources include at least one of the following of the first virtual character: first body model data, first motion state data; a second acquisition module, configured to acquire second motion state data of a first target object in real time; a generation module, configured to compare the first motion state data with the second motion state data to generate first comparison data, wherein the first comparison data is used to characterize the similarity of the states of the first target object and the first virtual character during motion; and a display module, configured to load and display the first comparison data on a client.
[0017] According to yet another embodiment of the present invention, a storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0018] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0019] This invention acquires motion data resources of a first virtual character, including at least one of the following: first body model data and first motion state data; it also acquires second motion state data of a first target object in real time, compares the first motion state data with the second motion state data, and generates first comparison data, which characterizes the similarity of the states of the first target object and the first virtual character during the motion process. The first comparison data is then loaded and displayed on the client. By acquiring the motion data resources of the first virtual character and the second motion state data of the first target object, and loading and displaying the first comparison data of the second motion state data of the first target object on the client, this invention solves the technical problem of related technologies that cannot display comparison data during synchronized online and offline exercise. By loading and displaying comparison data, it can assist users in online exercise, realizing an efficient, realistic, and virtual-real combined exercise and fitness method, improving users' fitness efficiency and enthusiasm, and eliminating location restrictions. Attached Figure Description
[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0021] Figure 1 This is a hardware structure block diagram of a mobile phone that displays motion data based on virtual characters, according to an embodiment of the present invention.
[0022] Figure 2 This is a flowchart illustrating a motion data display method based on a virtual character according to an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram showing the first virtual character and the second virtual angle in an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram showing multiple virtual characters in an embodiment of the present invention;
[0025] Figure 5 This is a structural block diagram of a motion data display device based on a virtual character according to an embodiment of the present invention;
[0026] Figure 6 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] Example 1
[0030] The method embodiment provided in Embodiment 1 of this application can be executed in mobile phones, televisions, virtual reality devices, tablets, servers, computers, or similar electronic terminals. Taking running on a mobile phone as an example, Figure 1 This is a hardware structure block diagram of a mobile phone that displays motion data based on a virtual character, according to an embodiment of the present invention. Figure 1 As shown, a mobile phone may include one or more ( Figure 1 Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the mobile phone may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile phone described above. For example, the mobile phone may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0031] The memory 104 can be used to store mobile phone programs, such as application software programs and modules, like the mobile phone program corresponding to a virtual character-based motion data display method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the mobile phone program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile phone via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. In this embodiment, the processor 104 is used to respond to human-computer interaction instructions and game strategies, controlling the target virtual character to perform specified operations to complete game tasks. The memory 104 is used to store program scripts, configuration information, virtual character attribute information, etc.
[0032] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile phone's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0033] Optionally, the input / output device 108 also includes a human-computer interaction screen for obtaining human-computer interaction instructions through a human-computer interaction interface, and for presenting streaming media images;
[0034] This embodiment provides a method for displaying motion data based on virtual characters. Figure 2 This is a flowchart illustrating a motion data display method based on a virtual character according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process includes the following steps:
[0035] Step S202: Obtain motion data resources of the first virtual character, wherein the motion data resources include at least one of the following of the first virtual character: first body model data, first motion state data;
[0036] In this embodiment, the first virtual character is an online virtual fitness coach used to guide online users in exercising. The first body model data is used to render and generate the dynamic image of the first virtual character on the display terminal. The first motion state data includes motion animation data, motion state data, etc. The first motion state data is used to render and display the posture of the first virtual character during the exercise, as well as the parameters of the posture, such as frequency, angle, opening, stride length, etc.
[0037] This embodiment can be applied to scenarios such as rope skipping, weightlifting, aerobics, fat loss training, aerobic exercise, running, yoga, martial arts, etc., for exercise, fitness, and competition.
[0038] Step S204: Acquire the second motion state data of the first target object in real time;
[0039] The exercise scenario in this embodiment includes multiple target objects, which are users exercising in offline scenarios, such as the first target object, the second target object, etc. The second exercise state data is the real-time data corresponding to the first target object during the exercise process.
[0040] Step S206: Compare the first motion state data with the second motion state data to generate first comparison data, wherein the first comparison data is used to characterize the similarity of the states of the first target object and the first virtual character during the motion process;
[0041] Optionally, the first comparison data can be displayed using styles such as images, text, and comparison charts.
[0042] Step S208: Load and display the first comparison data on the client.
[0043] By displaying the first set of comparison data, the target individual can promptly understand whether their movements during fitness, exercise, and other activities are standard and in accordance with regulations, thus enabling them to identify and adjust their movements in a timely manner.
[0044] Optionally, the client in this embodiment can be a multimedia playback terminal, such as a mobile terminal, television, conference terminal, game terminal, outdoor advertising terminal, wall display terminal, instant messaging terminal, etc.
[0045] Through the above steps, motion data resources of the first virtual character are obtained, wherein the motion data resources include at least one of the following of the first virtual character: first body model data, first motion state data; second motion state data of the first target object are obtained in real time, the first motion state data and the second motion state data are compared to generate first comparison data, wherein the first comparison data is used to characterize the similarity of the states of the first target object and the first virtual character during the motion process, and the first comparison data is loaded and displayed on the client. By obtaining the motion data resources of the first virtual character and the second motion state data of the first target object, and loading and displaying the first comparison data of the second motion state data of the first target object on the client, the technical problem that the comparison data cannot be displayed when the related technology synchronizes online and offline exercise is solved. By loading and displaying the comparison data, it can assist users in online exercise, realize an efficient, realistic, and virtual-real combined exercise and fitness method, improve users' fitness efficiency and enthusiasm, and has no location restrictions.
[0046] In one embodiment of this example, after acquiring the second motion state data of the first target object in real time, the method further includes:
[0047] S11, real-time acquisition of the third motion state data of the second target object;
[0048] S12, compare the second motion state data and the third motion state data to generate second comparison data, wherein the second comparison data is used to characterize the state similarity between the first target object and the second target object during the motion process;
[0049] By acquiring motion state data from multiple target objects, it is possible to achieve synchronized movement among multiple people or to conduct competitive matches.
[0050] In some examples, comparing the second motion state data and the third motion state data includes: using the first motion state data as the reference data, calculating a first similarity between the second motion state data and the first motion state data, and calculating a second similarity between the third motion state data and the first motion state data; and comparing the first similarity and the second similarity.
[0051] If the first similarity is greater than the second similarity, then the movement posture of the first target object is more standard; if the second similarity is greater than the first similarity, then the movement posture of the second target object is more standard.
[0052] Of course, in other instances, the second motion state data can be directly compared with the third motion state data. For example, the motion result parameters (e.g., number of errors, number of completions, number of consecutive completions, action completion rate, etc.) of the second and third target objects during the motion process can be compared by comparing the second and third motion state data. The result parameters can be obtained by analyzing the second and third motion state data to obtain the corresponding first result parameter (corresponding to the first target object) and the second result parameter (corresponding to the second target object).
[0053] S13, load and display the second comparison data on the client.
[0054] In this embodiment, the motion data resources of the first virtual character can be obtained through multiple channels, either in real time or in a pre-set manner.
[0055] In one example, obtaining the exercise data resources of the first virtual character includes: obtaining the exercise data resources of the first virtual character from a preset exercise database, wherein the first virtual character corresponds to a professional athlete or sports coach.
[0056] The first virtual character's sports data resources can be the sports data of a specific athlete; or, the standards for achieving the goals in national compulsory education, such as the number of rope skips per minute, standard rope skipping movements, and other related sports data resources.
[0057] The preset training database is configured with data resources from multiple coaches, which can be divided according to level (such as beginner, intermediate, professional, etc.), gender, scenario, etc. Users can select the matching coach and corresponding exercise data resources according to their own conditions.
[0058] In one example, acquiring motion data resources for the first virtual character includes: performing 3D scanning or 3D modeling on a specific object to generate first body model data; and real-time acquisition of first motion state data of the specific object during movement. This first motion state data includes: vital sign data of body organs, motion animation, and body deformation parameters of the specific object. The specific object in this example could be a real coach, athlete, fitness enthusiast, etc.
[0059] Optionally, acquiring the motion data resources of the first virtual character includes: acquiring the body data of the first target object and the target sports to be selected, and selecting motion data resources that match the body data and the target sports from a preset exercise database.
[0060] The preset exercise database in this embodiment stores multiple sports programs and exercise data resources suitable for users with various body types and body shapes. Users can choose the appropriate exercise data resources according to their actual needs and favorite sports programs. Of course, matching running programs and exercise data resources can also be pushed according to the user's body data. Alternatively, the exercise data resources may include multiple sub-data resources, each of which corresponds to a sports program or a sports level. When the user completes the entire set of exercises, the overall exercise task or exercise course is completed.
[0061] First, motion capture equipment is used to collect standard movement sequences from a live instructor, along with the instructor's physical data during exercise, such as heart rate, blood pressure, body temperature, sweat volume, blood lactate levels, oxygen levels, and fat consumption. Based on the standard movement sequences and physical data, a three-dimensional dynamic virtual avatar can be generated, including the instructor's gender, weight, height, and body fat percentage. When displayed, this motion data resource shows a 3D dynamic image of the movement in chronological order, highlighting the parts being exercised, such as muscle groups, ligaments, and organs. Simultaneously, the current standard physical data (such as heart rate, blood pressure, body temperature, sweat volume, blood lactate levels, oxygen levels, and fat consumption) is displayed in the monitoring area.
[0062] In some implementation scenarios of this embodiment, before acquiring the second motion state data of the first target object in real time, the method further includes: determining the exercise to be performed by the first target object; finding the first body part related to the exercise; finding the target model data of the first body part, wherein the target model data is the model data of the first body part after it has been exercised; adjusting the first body part of the second virtual character using the target model data, and updating the body model data of the second virtual character, wherein the first target object corresponds to the second virtual character; and preloading and displaying the updated second virtual character on the client.
[0063] Pre-calculation of specific actions and body parts is performed on the motion data resources of the target object. Users can see the effect of exercise in advance before exercising, and the effect preview technology can improve users' motivation to exercise.
[0064] The solution in this embodiment can be applied to scenarios of imitation motion (also called follow-up synchronous motion) and duel motion. Comparing the first motion state data with the second motion state data to generate the first comparison data includes: using the first motion state data and the second motion state data to perform collision detection on the first virtual character and the second virtual character corresponding to the first target object; obtaining the collision position and / or collision area obtained from the collision detection; and generating the first comparison data based on the collision position and / or collision area.
[0065] In combat and imitation training scenarios, the motion data resources of the first virtual character are used, and physical calculations such as collision detection are performed with the second motion state data of the corresponding virtual character of the target object to determine whether the first target object has completed the prescribed action, or the degree of completion of the prescribed action. The object of the collision detection can be a nested model (skinned model or skeleton model) nested outside the second virtual character of the first target object. The nested model includes multiple fixed pose points for the second virtual character to complete a certain movement. If the second virtual character completes a certain action, it must come into contact with multiple fixed pose points in the scene at the same time, so that the collision detection system detects that a collision has occurred.
[0066] In one implementation scenario of this embodiment, when the first comparison data is loaded and displayed on the client, the first virtual angle and the second virtual angle corresponding to the first target object are also displayed simultaneously. The method further includes: dynamically loading the second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object; and / or, dynamically loading the first virtual character on the client using motion data resources.
[0067] Figure 3 This is a schematic diagram showing the first virtual character and the second virtual angle in an embodiment of the present invention. Except for the right hand movement which is incomplete or non-standard, the first target object has completed all other movements. The first comparison data shown is: movement completion rate 80%.
[0068] For example, the virtual characters can be loaded and displayed through a screen, or through a VR or AR terminal. Large screens also include large-screen display terminals such as projectors and televisions.
[0069] In one example, after dynamically loading a second virtual character corresponding to the first target object on the client using second motion state data and second body model data of the first target object; and / or dynamically loading a first virtual character on the client using motion data resources, the method further includes: adjusting the size parameters of the first and second virtual characters according to a preset ratio, adjusting the standing positions of the first and second virtual characters according to a preset display perspective; and displaying the first and second virtual characters in a preset background scene according to the size parameters and standing positions.
[0070] In one example, when loading and displaying the second comparison data on the client, it further includes: dynamically loading, on the client, a second virtual character corresponding to the first target object by using the second motion state data and the second body model data of the first target object; and / or, dynamically loading, on the client, a third virtual character corresponding to the second target object by using the third motion state data and the third body model data of the second target object; adjusting the display parameters of the second virtual character and the third virtual character on the client based on the second comparison data.
[0071] In this example, on the client used by the first target object and the second target object, virtual characters corresponding to themselves and virtual characters corresponding to social objects are displayed. It is also possible to display the first virtual character simultaneously to achieve multi-person synchronization and realize multi-person synchronization of a coach and multiple trainees.
[0072] In the solution of this embodiment, social elements can also be added to determine multiple users currently in synchronous training, and perform multi-person online synchronous display of the virtual characters corresponding to these multiple users in a certain array. During the fitness process, calculate the action matching degree between the virtual character of each target object and the first virtual character of the coach, highlight the virtual character of the target object with the highest matching degree, move the virtual character of the target object with the highest matching degree to the scene position flush with the first virtual character as a reward, or enlarge it and set it as the "leading dancer" virtual character. It is also possible to delete the virtual character of the target object with the lowest matching degree in the picture to achieve multi-user remote simultaneous competition at multiple locations and display competition data on the same screen.
[0073] Figure 4 It is a schematic diagram showing multiple virtual characters in an embodiment of the present invention, including Character 1, Character 2, Character 3, and Character 4. Among them, Character 1 is the first virtual character corresponding to the virtual coach, and Character 2, Character 3, and Character 4 all correspond to offline target objects and are loaded and displayed in a "one" character array. Among them, the completion degree of Character 2 is the highest, and the display end enlarges it for display, with the same size as Character 1. The completion degrees of Character 3 and Character 4 are lower, and they are displayed according to the original size.
[0074] Based on the solution of this implementation scenario, virtual-real synchronization can be achieved. Through the display screen of the client, the user can see the first virtual character acting as an online coach and his own second virtual character, and by comparing elements such as actions and rhythms during the movement process between the two, it can play an auxiliary role in the movement.
[0075] In some implementations, dynamically loading a second virtual character corresponding to the first target object on the client using second motion state data and second body model data of the first target object includes: parsing the second motion state data to determine the target exercise action currently being performed by the first target object; searching the second body model data for several sets of model sub-data related to the target exercise action, wherein each set of model sub-data corresponds to a body part of the second virtual character; and dynamically loading the corresponding body parts of the second virtual character on the client using the second motion state data and several sets of model sub-data respectively.
[0076] In one example, after dynamically loading a second virtual character corresponding to the first target object on the client using second motion state data and second body model data of the first target object, and after dynamically loading the first virtual character on the client using motion data resources, the method further includes: adding virtual props to the virtual scene where the first and second virtual characters are located; monitoring whether the first or second virtual character performs a first action; and if the first action is detected, driving the virtual props to move in the virtual scene according to a preset trajectory.
[0077] In the virtual scene of this embodiment, the interaction between the first virtual character and the user's virtual character (such as the second virtual character) is increased to realize specific sports exercise actions. For example, random or specific time interval bumper balls will be generated in the virtual scene. When the user exercises the kicking action, they can collide and bounce back and forth between virtual characters, such as collide and bounce back and forth between the first virtual character or the second virtual character.
[0078] In another example, after dynamically loading a second virtual character corresponding to the first target object on the client using second motion state data and second body model data of the first target object, and after dynamically loading the first virtual character on the client using motion data resources, the method further includes: adding a non-player character NPC to the virtual scene where the first and second virtual characters are located; monitoring whether the first or second virtual character performs a second action; and if the second action is detected, driving the NPC to perform a predetermined interactive action with the first or second virtual character in the virtual scene.
[0079] In this example, an AI-driven NPC is further added to the virtual scene. This NPC can interact with the first virtual character and the second virtual character to achieve specific physical exercise actions and effects.
[0080] In one embodiment of this example, dynamically loading a first virtual character on a client using motion data resources includes: reading a sequence of action instructions and vital sign data from the motion data resources; controlling the skeletal model of the first virtual character sequentially using the sequence of action instructions based on a timeline to display the dynamic motion of the first virtual character on the client, and displaying the vital sign data at a designated position in the dynamic motion.
[0081] In this embodiment, the skeletal model of the first virtual character is an object model driven by motion commands. Based on the same principle as driving a player character in a game scene, it can achieve agile driving in a moving scene, controlling the first virtual character to complete various actions. The first motion state data includes vital sign data.
[0082] In another embodiment of this example, dynamically loading the first virtual character on the client using motion data resources includes: reading a sequence of motion action frames and vital sign data from the motion data resources; rendering the sequence of motion action frames in sequence based on a timeline to display the dynamic motion of the first virtual character on the client, and displaying the vital sign data at a specified position in the dynamic motion frame.
[0083] In this embodiment, the first virtual character is displayed through three-dimensional screen frames, and dynamic effects can be achieved through a continuous frame sequence. The first motion state data includes vital sign data.
[0084] Optionally, acquiring the second motion state data of the first target object in real time includes: acquiring real-scene images of the first target object in real time using an image acquisition device, and acquiring motion capture data of the first target object in real time using a motion capture device; parsing the motion parameters of the first target object from the motion capture data, and correcting the motion parameters using the real-scene images; mapping the corrected motion parameters to the skeletal model of the target object to generate the second motion state data.
[0085] After a user selects a fitness program and a virtual fitness coach (first virtual character) from the interface, or after the user selects a fitness program from the interface, the system recommends a virtual coach (first virtual character) that matches their body parameters, and then loads and displays it on the user's terminal interface. Offline, the system collects the user's movements and status data during offline fitness through monitoring devices such as cameras, fitness trackers, and watches, maps the user's fitness movements onto a 3D model to form a virtual character corresponding to the user, and loads it in real time in the same 3D scene as the virtual coach, and displays it according to the same or preset size ratio and the same perspective (or a relative perspective).
[0086] In one embodiment of this example, loading and displaying the first comparison data on the client includes:
[0087] S21, based on the first comparison data, determine whether the first action currently being performed by the first virtual character matches the second action currently being performed by the second virtual character corresponding to the first target object;
[0088] Optionally, determining whether the first action currently performed by the first virtual character matches the second action currently performed by the second virtual character corresponding to the first target object based on the first comparison data includes: identifying the first model curve when the first virtual character performs the first action, and identifying the second model curve when the second virtual character performs the second action; calculating the similarity between the first model curve and the second model curve; if the similarity is greater than a first threshold, determining that the first action and the second action match; if the similarity is less than a second threshold but greater than a third threshold, determining that the second action of the target object is not standard; if the similarity is less than a third threshold, determining that the second action of the target object is inaccurate.
[0089] S22, if the first action and the second action do not match, output the first prompt message and highlight the specified part of the second virtual character, wherein the specified part is the force-bearing part or the moving part of the first action, and the first prompt message is used to indicate that the second action is not standard or inaccurate.
[0090] In some examples, after highlighting a specific part of the second virtual character, the process includes: cyclically displaying a simulated animation of the specified part performing the first action on the first virtual character, and pausing the first virtual character until the current action of the second virtual character matches the first action.
[0091] In another implementation scenario of this embodiment, if the first action and the second action do not match, the method further includes: determining whether the third action previously executed by the first virtual character matches the second action currently executed by the second virtual character; if the third action matches the second action, outputting a second prompt message, wherein the second prompt message is used to indicate that the movement rhythm of the first target object is slower than the movement rhythm of the virtual sports coach.
[0092] During the exercise, the virtual coach (first virtual role) and the virtual student (second virtual role) are compared in real time, and errors are corrected and guidance is provided. In one example, the error correction method includes: determining whether the current movements of the virtual coach and the virtual student are the same; if they do not match, a prompt message is output, and a specified part of the virtual student's body is highlighted, where the specified part is the force-bearing or exercised part of the current movement. The simulated movements of the current movement performed by the specified part are displayed in a loop, while the virtual coach is paused until the virtual student's movements are synchronized with the virtual coach's movements.
[0093] In one implementation, determining whether the current movements of the virtual coach and the virtual student are the same includes: acquiring a first model curve related to the current movement of the virtual coach (such as the leg curve when doing a split), and acquiring a second model curve of the current movement of the virtual student; calculating the similarity between the first and second model curves; if the similarity is greater than a first threshold, it indicates that the user's movement is standard; if it is less than a second threshold but greater than a third threshold, it indicates that the user is performing the current movement, but the movement is not standard; if it is less than a third threshold, it indicates that the user's movement is inaccurate. In the case of non-standard movement, a first prompt message is output, and a simulation of the standard movement is displayed on the virtual student; in the case of inaccurate movement, a second prompt message is output, and the virtual coach is paused to determine whether the user is in a resting state. If the user is in a resting state, encouraging voice messages are output to encourage the user to start moving again, and the virtual student is controlled to cycle through the starting movements of the recovery exercise until the user starts moving offline. If the user's movement is slow (the second model curve is the same as the historical model curve of the virtual coach), a prompt is output to encourage the user to speed up and keep up with the rhythm.
[0094] During exercise, the system tracks the virtual trainee's fitness status, such as the number of errors, the number of times they took breaks, and the number of times their movements were not performed correctly. This data provides feedback on the user's motivation and the quality of their workout, which is then delivered via voice and text prompts. Furthermore, by collecting secondary exercise data from the primary target user, the system can push personalized dietary plans, related or supplementary exercise plans, and sleep plans tailored to the user's fitness level.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0096] Example 2
[0097] This embodiment also provides a motion data display device based on a virtual character, used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0098] Figure 5 This is a structural block diagram of a motion data display device based on a virtual character according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes: a first acquisition module 50, a second acquisition module 52, a generation module 54, and a display module 56, wherein...
[0099] The first acquisition module 50 is used to acquire motion data resources of the first virtual character, wherein the motion data resources include at least one of the following of the first virtual character: first body model data, first motion state data;
[0100] The second acquisition module 52 is used to acquire the second motion state data of the first target object in real time.
[0101] The generation module 54 is used to compare the first motion state data with the second motion state data to generate first comparison data, wherein the first comparison data is used to characterize the similarity of the states of the first target object and the first virtual character during the motion process;
[0102] Display module 56 is used to load and display the first comparison data on the client.
[0103] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0104] Example 3
[0105] This application also provides an electronic device. Figure 6 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 6 As shown, it includes a processor 61, a communication interface 62, a memory 63, and a communication bus 64. The processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64. The memory 63 is used to store computer programs.
[0106] When the processor 61 executes the program stored in the memory 63, it performs the following steps: acquiring motion data resources of a first virtual character, wherein the motion data resources include at least one of the following of the first virtual character: first body model data, first motion state data; acquiring second motion state data of a first target object in real time; comparing the first motion state data with the second motion state data to generate first comparison data, wherein the first comparison data is used to characterize the similarity of the states of the first target object and the first virtual character during the motion process; and loading and displaying the first comparison data on the client.
[0107] Optionally, after acquiring the second motion state data of the first target object in real time, the method further includes: acquiring the third motion state data of the second target object in real time; comparing the second motion state data and the third motion state data to generate second comparison data, wherein the second comparison data is used to characterize the state similarity between the first target object and the second target object during the motion process; and loading and displaying the second comparison data on the client.
[0108] Optionally, comparing the second motion state data and the third motion state data includes: using the first motion state data as reference data, calculating a first similarity between the second motion state data and the first motion state data, and calculating a second similarity between the third motion state data and the first motion state data; and comparing the first similarity and the second similarity.
[0109] Optionally, when loading and displaying the first comparison data on the client, the method further includes: dynamically loading a second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object; and / or, dynamically loading the first virtual character on the client using the motion data resources.
[0110] Optionally, dynamically loading a second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object includes: parsing the second motion state data to determine the target exercise action currently being performed by the first target object; searching the second body model data for several sets of model sub-data related to the target exercise action, wherein each set of model sub-data corresponds to a body part of the second virtual character; and dynamically loading the corresponding body parts of the second virtual character on the client using the second motion state data and the several sets of model sub-data respectively.
[0111] Optionally, obtaining the exercise data resources of the first virtual character includes: obtaining the exercise data resources of the first virtual character from a preset exercise database, wherein the first virtual character corresponds to a professional athlete or sports coach.
[0112] Optionally, acquiring the motion data resources of the first virtual character includes: performing a 3D scan or 3D modeling of a specific object to generate the first body model data; and collecting the first motion state data of the specific object in real time during the motion process, wherein the first motion state data includes the specific object's: vital sign data of body organs, motion action images, and body deformation parameters.
[0113] Optionally, before acquiring the second motion state data of the first target object in real time, the method further includes: determining the exercise to be performed by the first target object; finding a first body part related to the exercise; finding the target model data of the first body part, wherein the target model data is the model data of the first body part after it has been exercised; adjusting the first body part of the second virtual character using the target model data, and updating the body model data of the second virtual character, wherein the first target object corresponds to the second virtual character; and preloading and displaying the updated second virtual character on the client.
[0114] Optionally, comparing the first motion state data with the second motion state data to generate the first comparison data includes: performing collision detection on the first virtual character and the second virtual character corresponding to the first target object using the first motion state data and the second motion state data; obtaining the collision position and / or collision area obtained by the collision detection; and generating the first comparison data based on the collision position and / or the collision area.
[0115] Optionally, after dynamically loading a second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object; and after dynamically loading the first virtual character on the client using the motion data resources, the method further includes: adding virtual props in the virtual scene where the first virtual character and the second virtual character are located; monitoring whether the first virtual character or the second virtual character performs a first action; and if the first action is detected, driving the virtual props to move in the virtual scene according to a preset trajectory.
[0116] Optionally, after dynamically loading a second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object; and after dynamically loading the first virtual character on the client using the motion data resources, the method further includes: adding a non-player character NPC in the virtual scene where the first virtual character and the second virtual character are located; monitoring whether the first virtual character or the second virtual character performs a second action; and if the second action is detected, driving the NPC to perform a predetermined interactive action with the first virtual character or the second virtual character in the virtual scene.
[0117] Optionally, obtaining the motion data resources of the first virtual character includes: obtaining the body data of the first target object and the target sports to be selected, and selecting motion data resources that match the body data and the target sports from a preset exercise database.
[0118] Optionally, dynamically loading the first virtual character on the client using the motion data resource includes: reading a sequence of motion instructions and vital sign data from the motion data resource; controlling the skeletal model of the first virtual character sequentially using the sequence of motion instructions based on a timeline to display the dynamic motion image of the first virtual character on the client, and displaying the vital sign data at a designated position in the dynamic motion image.
[0119] Optionally, dynamically loading the first virtual character on the client using the motion data resource includes: reading a sequence of motion action frames and vital sign data from the motion data resource; rendering the sequence of motion action frames sequentially based on a timeline to display the dynamic motion of the first virtual character on the client, and displaying the vital sign data at a designated position in the dynamic motion frame.
[0120] Optionally, acquiring the second motion state data of the first target object in real time includes: acquiring real-scene images of the first target object in real time using an image acquisition device, and acquiring motion capture data of the first target object in real time using a motion capture device; parsing the motion parameters of the first target object from the motion capture data, and correcting the motion parameters using the real-scene images; mapping the corrected motion parameters to the skeletal model of the target object to generate the second motion state data.
[0121] Optionally, loading and displaying the first comparison data on the client includes: determining whether the first action currently performed by the first virtual character matches the second action currently performed by the second virtual character corresponding to the first target object based on the first comparison data; if the first action does not match the second action, outputting a first prompt message and highlighting a specified part of the second virtual character, wherein the specified part is the force-bearing part or movement part of the first action, and the first prompt message is used to indicate that the second action is not standard or inaccurate.
[0122] Optionally, after highlighting a designated part of the second virtual character, the method further includes: cyclically displaying a simulated animation of the designated part performing the first action on the first virtual character, and pausing the first virtual character until the current action of the second virtual character matches the first action.
[0123] Optionally, determining whether the first action currently performed by the first virtual character matches the second action currently performed by the second virtual character corresponding to the first target object based on the first comparison data includes: identifying a first model curve when the first virtual character performs the first action, and identifying a second model curve when the second virtual character performs the second action; calculating the similarity between the first model curve and the second model curve; if the similarity is greater than a first threshold, determining that the first action and the second action match; if the similarity is less than a second threshold but greater than a third threshold, determining that the second action of the target object is not standard; if the similarity is less than a third threshold, determining that the second action of the target object is inaccurate.
[0124] Optionally, if the first action and the second action do not match, the method further includes: determining whether a third action previously executed by the first virtual character matches the second action currently executed by the second virtual character; if the third action matches the second action, outputting a second prompt message, wherein the second prompt message is used to indicate that the movement rhythm of the first target object is slower than the movement rhythm of the virtual sports coach.
[0125] Optionally, after dynamically loading a second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object; and / or, after dynamically loading the first virtual character on the client using the motion data resources, the method further includes: adjusting the size parameters of the first virtual character and the second virtual character according to a preset ratio, adjusting the standing positions of the first virtual character and the second virtual character according to a preset display perspective; and displaying the first virtual character and the second virtual character in a preset background scene according to the size parameters and the standing positions.
[0126] Optionally, when loading and displaying the second comparison data on the client, the method further includes: dynamically loading a second virtual character corresponding to the first target object on the client using the second motion state data and the second body model data of the first target object; and / or, dynamically loading a third virtual character corresponding to the second target object on the client using the third motion state data and the third body model data of the second target object; and adjusting the display parameters of the second virtual character and the third virtual character on the client based on the second comparison data.
[0127] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0128] The communication interface is used for communication between the aforementioned terminal and other devices.
[0129] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0130] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0131] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the motion data display methods based on virtual characters described in the above embodiments.
[0132] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the motion data display methods based on virtual characters described in the above embodiments.
[0133] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0134] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0135] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0136] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0137] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0138] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0139] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0140] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for displaying motion data based on virtual characters, characterized in that, include: Acquire motion data resources of a first virtual character, wherein the motion data resources include at least one of the following of the first virtual character: first body model data, first motion state data; Real-time acquisition of the second motion state data of the first target object; The first motion state data is compared with the second motion state data to generate first comparison data, wherein the first comparison data is used to characterize the similarity of the states of the first target object and the first virtual character during the motion process; Load and display the first comparison data on the client; Before acquiring the second motion state data of the first target object in real time, the method further includes: determining the exercise to be performed by the first target object; finding a first body part related to the exercise; finding the target model data of the first body part, wherein the target model data is the model data of the first body part after it has been exercised; adjusting the first body part of the second virtual character using the target model data, and updating the body model data of the second virtual character, wherein the first target object corresponds to the second virtual character; and preloading and displaying the updated second virtual character on the client. The process of comparing the first motion state data with the second motion state data to generate the first comparison data includes: performing collision detection on the first virtual character and the second virtual character corresponding to the first target object using the first motion state data and the second motion state data; taking the nested model outside the second virtual character of the first target object as the object of collision detection, obtaining the collision position and / or collision area obtained by the collision detection, wherein the nested model includes multiple fixed pose points of multiple second virtual characters completing a certain movement action; and generating the first comparison data based on the collision position and / or the collision area.
2. The method according to claim 1, characterized in that, After acquiring the second motion state data of the first target object in real time, the method further includes: Real-time acquisition of the third motion state data of the second target object; The second motion state data and the third motion state data are compared to generate second comparison data, wherein the second comparison data is used to characterize the similarity of the states of the first target object and the second target object during the motion process; The second comparison data is loaded and displayed on the client.
3. The method according to claim 2, characterized in that, Comparing the second motion state data and the third motion state data includes: Using the first motion state data as the reference data, calculate the first similarity between the second motion state data and the first motion state data, and calculate the second similarity between the third motion state data and the first motion state data. Compare the first similarity and the second similarity.
4. The method according to claim 1, characterized in that, When loading and displaying the first comparison data on the client, the method further includes: The second virtual character corresponding to the first target object is dynamically loaded on the client using the second motion state data and the second body model data of the first target object; and / or, the first virtual character is dynamically loaded on the client using the motion data resources.
5. The method according to claim 1, characterized in that, The resources for obtaining the motion data of the first virtual character include: Perform 3D scanning or 3D modeling on a specific object to generate the first body model data; The first motion state data of the specific object during the movement process is collected in real time, wherein the first motion state data includes the specific object's: vital sign data of body organs, motion action images, and body deformation parameters.
6. The method according to claim 1, characterized in that, The resources for obtaining the motion data of the first virtual character include: Obtain the body data of the first target object and the target sports to be selected, and select sports data resources that match the body data and the target sports from a preset exercise database.
7. The method according to claim 1, characterized in that, Real-time acquisition of the second motion state data of the first target object includes: The image acquisition device is used to acquire real-scene images of the first target object in real time, and the motion capture device is used to acquire motion capture data of the first target object in real time; The motion parameters of the first target object are parsed from the motion capture data, and the motion parameters are corrected using the real-scene image; The corrected motion parameters are mapped onto the skeletal model of the target object to generate the second motion state data.
8. The method according to claim 1, characterized in that, Loading and displaying the first comparison data on the client includes: Based on the first comparison data, it is determined whether the first action currently being performed by the first virtual character matches the second action currently being performed by the second virtual character corresponding to the first target object; If the first action and the second action do not match, a first prompt message is output, and a specified part of the second virtual character is highlighted. The specified part is the part of the first action that is subjected to force or moves. The first prompt message is used to indicate that the second action is not standard or inaccurate.
Citation Information
Patent Citations
Sport data analysis comparison method and device
CN106295616A
Exercise training method and device based on virtual reality
CN106422207A
Method and system for motion comparison
US20140073383A1