A method, system, device and storage medium for mobile phone to control role interaction

By collecting hand movement data through the phone's gyroscope and gravity sensor, and combining it with a simplified algorithm to determine the user's intention, this method solves the problem of insufficient interactivity and entertainment value in traditional mobile phone-controlled virtual character interaction methods. It achieves fast and accurate virtual character interaction, improving the fun and smoothness of mobile games.

CN116954350BActive Publication Date: 2026-08-04BEIJING MOMO INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING MOMO INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-04-17
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing mobile phone control methods for virtual character interaction lack interactivity and entertainment value, failing to meet the needs of the new generation of young people. The traditional fingertip touch directional key control mode fails to arouse users' desire for control and sense of immersion. Furthermore, existing technologies consume too many resources in motion recognition, making it difficult to achieve smooth operation on mobile phone systems.

Method used

By collecting user hand motion data through the phone's gyroscope and gravity sensor, a simplified data processing algorithm is used to determine the user's intention, and the virtual character's dance moves are determined by pre-set rules. It supports multiple interaction modes and social scenarios, reduces data processing complexity, and adapts to the computing power limitations of mobile phone systems.

Benefits of technology

It achieves highly realistic, fast recognition, and highly interactive mobile phone-controlled virtual character interaction, enhancing the fun and smoothness of the game, meeting users' social needs and entertainment challenges, and is suitable for the operating requirements of current mobile phone systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116954350B_ABST
    Figure CN116954350B_ABST
Patent Text Reader

Abstract

The application discloses a kind of mobile phone control role interaction method, comprising: generating virtual person;Mobile phone completes arbitrary action;Collect mobile action data;Action data is handled according to preset processing rule;The result after processing is adapted according to preset judging rule and is judged, determine what kind of prescribed action is completed by mobile phone;According to the adaptation result of prescribed action, the preset interactive action of virtual person is output.The application innovates mobile phone control interaction mode, identifies hand dance action type and action amplitude by various mobile phone inherent sensors such as gyroscope and gravity sensor, and uses it as the basis for interacting with virtual person in mobile game.At the same time, the data processing method for identifying user hand action is low in power consumption, and the mobile action interaction experience is excellent, which realizes the fusion and promotion of playability and interactivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of virtual interactive games, and specifically relates to a method, system, device and storage medium for controlling character interaction via mobile phone, and in particular a method for realizing interactive dance movements between users and virtual characters by recognizing mobile phone movements. Background Technology

[0002] With the development of internet technology, new models such as online shopping, online games, online interactive entertainment, and online dating are becoming increasingly popular. As people's entertainment needs increase, the trend of integration between different online behaviors is becoming more and more obvious, especially online games and online interactive entertainment, which are showing a trend of convergence due to their own characteristics and highly overlapping target audiences.

[0003] Currently, the mainstream mobile music and dance entertainment tools are "XX Dance", "XXX Dance Crew", and "All People XX", etc. The interaction method is the same as the mode of controlling the virtual puppet to complete the dance moves by touching the up, down and left and right keys of the mobile phone. Although this mode is basically the same as the operation method of the popular interactive entertainment game "X Dance Crew" more than ten years ago, it is difficult to return to the era of popularity of "X Dance Crew" between 2005 and 2008.

[0004] The main reason for this is that this simple, easy-to-use game mode, which requires no deep thought, fails to continuously stimulate users' desire to control the game character, and they cannot immerse themselves in the character. Game actions are limited to clicking designated areas on the phone screen; this simple, repetitive operation is not engaging, challenging, or fun for players. Overall, this primitive "X-Dance Crew" style human-computer interaction mode fails to meet the gaming needs of gamers, nor does it adequately satisfy the social needs of social users. In response to the needs of the new generation, some games and apps have emerged that explore new forms of interaction.

[0005] For example, existing technology 1 discloses an interconnected fitness competition system based on multi-body motion recognition, including a four-in-one motion recognition unit, a smartphone client, a display device, and an internet server. The four-in-one motion recognition unit is used to collect three-axis acceleration component data, three-axis angular velocity data, and three-axis magnetic field component data of the limbs worn on the body. It includes four independently wearable smart units worn on the human body. Each wearable smart unit includes an interconnected power module, a digital processor, an accelerometer, a gyroscope, a magnetic sensor, and a Bluetooth module. The smartphone client is connected to the four-in-one motion recognition unit via Bluetooth and is used to receive motion posture data from each limb, generate motion commands, and achieve data interaction. It includes interconnected motion analysis modules, a virtual competition module, an interconnected communication module, a fitness data analysis module, and an image processing module. The display device is connected to the smartphone client and is used to receive data sent by the smartphone client and display images and related motion data. The internet server is connected to the smartphone client and is used to enable users in different regions to compete online in the same virtual environment and generate an intelligent fitness big data database. It includes interconnected interconnected communication modules, a fitness big data module, and a client management module. This solution uses smart wearable devices to collect movements of various parts of the human body, aiming to realistically recreate the user's actions. By comparing the recreated action parameters with those in a standard database, it analyzes the body's movements and then expands these movements based on the analysis results, such as determining whether the movements are precise. However, this solution doesn't actually address the need for interaction with the phone using hand gestures, lacking interactivity and entertainment value. Furthermore, it only proposes a functional concept without mentioning specific implementation methods, such as how to ensure accuracy and real-time performance. In addition, the solution uses a resource-intensive comparison method for action recognition, requiring the pre-storage of a large number of action evaluation standards and data. Given the significant differences in movement speed and amplitude among individuals, the number of standard actions that need to be stored is enormous, which is unsuitable for the smooth operation requirements of current mobile phone systems.

[0006] Currently, in the field of mobile phone gesture-based interaction, there are no products with good interactivity and playability. Existing interactive methods are generally concentrated in simple applications like WeChat's "Shake" feature, failing to provide an entertaining and competitive interactive connection between hand gestures and the content displayed on the phone. Furthermore, the types of gestures and presentation methods are limited, making it difficult to meet the high demands of young users for interactive experiences. Therefore, how to develop suitable interactive entertainment modes tailored to the needs of the new generation of young people and organically combine them with human physiological characteristics and the functional features of mobile phones has become an urgent problem to be solved. Summary of the Invention

[0007] To cater to the evolving entertainment and social needs of the new generation of young people, a new interactive method is needed in the music and dance entertainment and social field, breaking away from the simple mobile game mode of controlling dance movements with fingertip touch directional keys. To achieve this objective, the present invention provides a method for controlling character interaction via a mobile phone, the method comprising:

[0008] 1) Generate virtual character roles;

[0009] 2) Move your phone to perform any action;

[0010] 3) Collect mobile phone motion data;

[0011] 4) Process the motion data according to the preset processing rules;

[0012] 5) The processed results are adapted and judged according to the preset judgment rules to determine what prescribed action the mobile phone has completed;

[0013] 6) Output the preset interactive actions of the virtual character based on the adaptation results of the prescribed actions.

[0014] Furthermore, in step 5), the prescribed actions include at least the following groups: (1) left, right, up, down, forward, and backward; (2) leaning forward and backward; or (3) rotating around the z-axis.

[0015] Furthermore, when determining the action of group (1), the acceleration of the three coordinate systems x, y and z is obtained by the sensor to determine the user's movement direction. Specifically, an array queue is used to record the acceleration data along the three coordinate axes x, y and z in the entire motion state. Then, the last third of the data is extracted, and the absolute value of the acceleration data in the three directions x, y and z is determined respectively. The component with the largest absolute value represents the current motion along that coordinate axis. Then, the direction of motion is determined according to the positive or negative sign of the value.

[0016] Furthermore, when determining the action of group (1), the acceleration of the three coordinate systems of x, y and z is obtained by the sensor. An array queue is used to record the acceleration data along the three coordinate axes of x, y and z in the entire motion state. Then, the average value of the absolute value of all data is calculated. The average value is compared with the preset acceleration threshold range. Based on the comparison result, the motion amplitude of the mobile phone is divided into small amplitude, medium amplitude and large amplitude.

[0017] Furthermore, when judging the action of group (1), if it is confirmed that the user has selected a female virtual character, the female-specific action judgment mode can be selected. Specifically, the acceleration of the three coordinate systems x, y and z is obtained by the sensor, and an array queue is used to record the acceleration data along the three coordinate axes x, y and z in the entire motion state. Then, the data between the last half and five-sixths is extracted, and the absolute value of the acceleration data in the three directions x, y and z is determined respectively. The component with the largest absolute value represents the current motion along the coordinate axis, and then the direction of motion is determined according to the positive or negative sign of the value.

[0018] Furthermore, when determining the (2) group of actions, the gravitational acceleration parameters of the three coordinate systems x, y and z are obtained through the built-in sensor, and the offset angle zTheta of the mobile phone relative to the horizontal direction is calculated, thereby obtaining the parameters of the virtual character's forward or backward tilt. In order to distinguish the forward and backward tilt from other directions, the mobile phone offset angle is limited to within 30 degrees to determine the (1) group of actions, and only when it exceeds 30 degrees is the (2) group of actions determined.

[0019] Furthermore, the method for calculating the offset angle is as follows:

[0020] let gravityX:CGFloat=gravity.x;

[0021] let gravityY:CGFloat=gravity.y;

[0022] let gravityZ:CGFloat=gravity.z;

[0023] let temp: CGFloat=CGFloat(sqrtf(Float(gravityX*gravityX+gravityY*gravityY)));

[0024] let zTheta=atan2(gravityZ,temp) / Double.pi*180.0;

[0025] Here, gravity represents the gravitational acceleration value provided by the phone's system interface, and the data values ​​for the three axes are gravityX, gravityY, and gravityZ, respectively. The temporary variable temp represents the hypotenuse of the triangle corresponding to x and y, and the sqrtf function returns x. 2 +y 2 The square root of the sum, zTheta represents the offset angle of the phone relative to the xy plane in the z-axis direction, and Double.pi represents the mathematical symbol π (value 3.1415926).

[0026] Furthermore, when determining the action of group (3), the heading parameters of the mobile phone are obtained through the sensor, and then the angle of the user rotating the mobile phone around the z-axis is determined, and finally the number of rotations of the virtual character is determined. Specifically, the heading parameters at the beginning and end of the action are recorded. If the difference is greater than 140, it is determined to be two rotations. If it is greater than 100 and less than 140, it is determined to be one rotation. If it is greater than 35 and less than 100, it is determined to be half a rotation.

[0027] Furthermore, in step 2), the prescribed actions also include group (4), which is a sequential combination of phone shaking action and finger tapping or finger swiping action. Specifically, after determining that the phone has completed a certain prescribed action, the system continues to detect whether the user's finger has tapped the phone screen or swiped the screen within a preset time period, and further detects the area and number of taps, or the length and time of swiping. Based on preset rules, the system determines the special actions corresponding to the tapping and swiping actions, and triggers the special actions of the virtual character.

[0028] Furthermore, the prescribed actions also include a group (5), which is a continuous action formed by any combination of the individual prescribed actions in groups (1) to (3). After selecting this mode, after a single prescribed action is completed, the mobile phone needs to stay in the final position for a preset time period, and then the mobile phone returns to near the original state before starting the next prescribed action. The action of the mobile phone returning to the original state is not counted as the action of the virtual character. After the continuous input of actions is completed, the system generates a combination of dance actions in sequence.

[0029] Furthermore, it also includes the form of completing mobile phone actions according to preset complete dance movements, specifically: (1) obtaining a complete continuous dance screen as preset dance movements; (2) dividing the dance into movements according to the beat; (3) analyzing the movements on each beat and determining the dance movements to be completed within the beat based on the analysis results; (4) wherein the analysis method is determined based on the image changes of the start frame, end frame and several intermediate frames of the screen within the beat; (5) wherein the analysis of the movements is implemented using a neural network model; (6) determining the dance movements for each beat based on the results of the neural network output and matching them with the preset movements of the system; (7) outputting the matching results as the prescribed movements that the user needs to complete in sequence when imitating the dance and prompting the user; (8) when imitating the dance, the user can use the beat-by-beat imitation mode or the continuous movement imitation mode.

[0030] Furthermore, the present invention also provides a system for implementing a method of mobile phone-controlled character interaction, comprising:

[0031] 1) Character Generation Module: Used to generate virtual character roles;

[0032] 2) Motion capture module: Used to collect corresponding mobile phone motion data after the user moves the mobile phone to complete any action;

[0033] 3) Motion data processing module: used to process motion data according to preset processing rules;

[0034] 4) Action Judgment Module: Adapts and judges the processed results according to preset judgment rules to determine what prescribed action the mobile phone has completed;

[0035] 5) Motion Output Module: Outputs preset interactive actions for the virtual character based on the adaptation results of the specified actions.

[0036] A computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the steps described above.

[0037] An electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements any of the steps described above.

[0038] The beneficial effects of this invention are:

[0039] 1. High Realism of Motion Recognition. Traditional interactive entertainment projects prioritize accurately capturing human movements, as described in existing technology. However, for an interactive entertainment game, motion accuracy isn't the most crucial factor. Unlike existing motion capture technologies, this invention doesn't solely pursue accuracy and real-time performance in motion recognition; instead, it prioritizes reproducing the user's true intentions. In other words, the user's hand gesture of shaking their phone indicates a specific action they intend to perform, and our data analysis should closely approximate this intended action. To this end, we optimized the data processing and analysis process based on the characteristics of human movement, even designing targeted algorithms for the distinct characteristics of male and female arm movements, resulting in more "realistic" data analysis results. This provides a solid foundation for the game's battle and competitive modes, making the game more entertaining rather than rigidly adhering to a set of finger movements.

[0040] 2. High Recognition Speed. Existing technologies heavily emphasize acquiring motion trajectories in motion capture, resulting in high-frequency collection and analysis of motion data. This data is vast in variety and quantity, often requiring complex conversion calculations for initial processing. Subsequently, the accuracy of the motion is determined by comparing this trajectory data with pre-stored data in a database, sometimes even comparing data from extremely short time periods. This necessitates significant storage space and system computing power for both initial processing and final comparison. While this level of computing power is generally manageable for PC games, it can lead to lag and overheating issues on mobile devices. The motion determination method of this invention fully considers the computing power limitations of mobile systems. It collects only the conventional data available from the phone's internal sensors. Furthermore, the data processing selectively uses data based on the characteristics of human hand movements, employing only a defined subset for initial processing. The result is a simple signed numerical value. Subsequent comparison with the corresponding numerical value for the defined motion requires no computing power; it involves comparing only a few single-point data values, greatly reducing the complexity of later comparisons. The optimization of these two steps makes the data acquisition and processing process of this invention fast and less prone to errors, which is very suitable for the basic concept of current mobile games.

[0041] 3. High interactivity. This invention innovates the human-computer interaction mode by using the phone's gyroscope and gravity sensor to collect motion data. The phone itself simulates a standing character, and users control the character's dance by adjusting parameters such as the phone's direction, gravitational acceleration, and angle. This solves the problem of a single game interaction mode and enhances the interactivity between players. The shaking interaction method is similar to cell division, possessing high transmissibility, and it breaks through the limitations of traditional GUIs on interaction methods, making it easier for users to associate shaking actions with dance moves. Furthermore, this invention provides an improved solution for social needs, creating solo dance, duet dance, dance floor, and IM systems, offering a sufficient number of interactive dance modes and scenes for users to use in social situations.

[0042] 4. Highly Engaging. Users can start by shaking their phones up and down, left and right, rotating them, adjusting the angle, and varying the shaking speed. These actions all have a learning curve, and each user's hand dexterity differs. For example, a bartender might have an advantage and a sense of superiority in performing various hand movements. This difference in dexterity motivates users to take on the challenge, increasing the fun and competitiveness. Furthermore, this invention supports creating custom dance moves, free from pre-programmed choreography. Even a single person can use different phone shaking combinations to create a virtual character performing a variety of dances. It also supports dance breakdown, allowing users to create dances by shaking the phone in sections, making it simpler and easier to learn. Users don't need to pursue precise positioning and range of motion; they only need to roughly complete the specified movements. This reduces the difficulty, increases the game's smoothness and the success rate of actions, and gives users confidence and interest to continue engaging in the dance challenge.

[0043] In summary, we have revolutionized the way mobile phone control and interaction works. By utilizing various inherent sensors in the phone, such as the gyroscope and gravity sensor, we identify the type and amplitude of dance movements, using this as the basis for interaction with virtual characters in mobile games. Simultaneously, we provide a data processing method that can quickly and accurately recognize user hand movements, with computational requirements far less than the computing power limit of the terminal device. This achieves an excellent user experience for action interactions controlled via mobile phone, effectively merging and enhancing playability and interactivity. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application 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 recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a flowchart illustrating the interactive method of the present invention.

[0046] Figure 2 This is a schematic diagram of data acquisition in one embodiment;

[0047] Figure 3 This is a schematic diagram of a mobile phone character interaction screen according to one embodiment;

[0048] Figure 4 This is a schematic diagram of a mobile phone character interaction screen according to one embodiment;

[0049] Figure 5 This is a schematic diagram of a mobile phone character interaction screen according to one embodiment;

[0050] Figure 6This is a schematic diagram of the system of the present invention. Detailed Implementation

[0051] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be practiced without some of these specific details.

[0052] It should also be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not all of them. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be performed in parallel, concurrently, or simultaneously. The process can be terminated when its operations are completed, but it may also have additional steps not included in the drawings. The process may correspond to a method, function, procedure, subroutine, subroutine, etc.

[0053] like Figure 1 As shown, the present invention provides a method for controlling a virtual character interaction via a mobile phone. The method includes: 1) generating a virtual character; 2) moving the mobile phone to perform any action; 3) collecting motion data from the mobile phone; 4) processing the motion data according to preset processing rules; 5) adapting the processed result according to preset judgment rules to determine what kind of prescribed action the mobile phone has performed; 6) outputting the preset interactive action of the virtual character based on the adaptation result of the prescribed action.

[0054] This invention relates to a novel interactive method for controlling game character actions via mobile phone gestures. With the development of internet technology, people's entertainment needs are increasing. Currently, mainstream mobile dance and rhythm games include titles like "XX Dance," "XXX Dance Crew," and "All People XX." The main game mode involves mobile users rapidly moving their fingertips to touch up, down, left, and right arrows displayed in a designated area of ​​the phone according to a specified sequence and time interval, controlling a virtual character to perform corresponding dance moves. However, this mode can no longer recapture the popularity of games like "X Dance Crew" from 2005-2008. The main reason is that this simple and unchanging finger-gesture interaction method fails to continuously stimulate users' desire to control the game character, resulting in a lack of immersion and the inability to experience the enjoyment of action games. For players, these simple, repetitive finger movements are not vivid, interesting, or varied enough. Furthermore, this mode is not conducive to expanding and supporting the social needs between users, reducing the desire for social interaction to a very low level.

[0055] To address this, we introduced a hand gesture + phone gesture pattern in dance-related interactions. Hand movements drive the phone to complete a specific trajectory, thereby controlling a virtual character to perform a series of actions. This interaction mode typically utilizes the phone's sensor hardware to collect motion data, which is then analyzed and processed to obtain the results needed by the developers. However, our practical experience has shown that due to the significant uncertainty of human hand movements, the trajectory and speed of the phone's movement are not very predictable, making it difficult to achieve refined motion capture, collection, and comparison. For example, the well-known WeChat shake function is essentially a simple capture and judgment of a person's hand shaking the phone. Because this action has relatively clear triggering conditions and lacks interference from factors like direction and amplitude, it is relatively simple and accurate to judge. However, if the hand is used to drive the phone to complete more complex and precise movements, significant difficulties arise during recognition. For instance, the same upward wave motion will result in very different trajectories for male and female users, with even greater differences in duration, amplitude, and force. Accurately acquiring hand motion data has always been a goal pursued in this field. For example, a motion-sensing game console that claims to have rendered decades of accumulated human-computer interaction experience from various manufacturers obsolete has employed various methods to improve the accuracy of trajectory and force tracking in order to obtain precise controller motion data. Of course, this comes at the cost of equipping the console with powerful data acquisition and processing capabilities. In contrast, mobile phones have relatively limited computing power for gaming and do not require precise reproduction of motion trajectories. Furthermore, limitations in size, cost, and compatibility with other system functions prevent the use of more specialized and numerous sensors. Therefore, the main problem our invention aims to solve is how to better reproduce the user's intentions under limited conditions, creating a better gaming effect and experience, and avoiding significant deviations in game results due to physiological differences.

[0056] First, similar to most interactive games, upon entering the game, users are required to select various data points for their virtual character, including a gender selection interface; a user avatar information collection module; a user-specific virtual avatar creation module; and a user virtual avatar customization module. To address the issue of immersion in the virtual character, we abandoned the traditional method of generating characters with uniform height, face shape, hairstyle, and clothing. Users can create their own unique characters according to their preferences, satisfying the social needs of social users. On one hand, we provide a highly realistic virtual styling system that accurately reflects the user's face. In customization mode, users can import their own photos to generate corresponding 3D cartoon virtual avatars, or choose their favorite face shape, hairstyle, eyes, nose, lips, etc., from a large pool of samples to create their preferred image. On the other hand, users can also choose from various clothing, shoes, hats, and accessories in the item library. This innovative character creation mode and interaction method in dance interactive games improves the experience of rhythm and dance games, creating more social scenarios and fulfilling social needs. Once the character attributes are determined, the virtual character will appear in the game with the user's selected image and perform various preset dance moves, providing users with a high degree of satisfaction and a realistic experience.

[0057] Once the system initiates interaction, users can freely move or shake their phones according to their preferences, or complete specified phone movement actions based on action templates or guides provided by the system program. These hand movements are transmitted to the phone because the phone and hand are integrated. By controlling the trajectory and force of the hand movements, users can generally achieve the desired actions, thus controlling the phone's movements. Simultaneously, various built-in sensors within the phone continuously collect motion data, primarily including acceleration and orientation parameters. These two fundamental data points provide the basis for subsequent processing and calculations. To ensure smooth operation of the interactive control method on the phone, we currently only need to collect acceleration and orientation parameters to complete subsequent calculations, thus conserving computing power.

[0058] Next, we processed the acceleration and orientation parameter data collected from the phone according to preset processing rules. Our previous acceleration data processing methods involved collecting all the trajectory, acceleration, and direction of hand movements, and then performing comparative analysis. Typically, this type of real-time collection prioritizes comprehensiveness and realism, requiring significant computational power and yielding diverse results. In contrast, we focus on entertainment and interactivity, so we don't aim for complete real-time trajectories but rather focus on determining the user's intention, which usually matches the prescribed actions. Since the number of prescribed actions in the game is actually limited, we need to categorize all user hand movements into preset actions as much as possible to maintain game continuity and entertainment. To this end, we designed some simple and easy-to-implement data processing rules, such as filtering the time period for data collection and using simple algorithms like size comparison instead of complex ones. This maintains game smoothness while accurately reproducing the user's intention to shake the phone, reflecting realistic game interactivity and preventing significant differences in the judgment of prescribed actions due to different user body structures and hand movement habits.

[0059] After this, we will adapt the processed results according to preset judgment rules to determine what prescribed action the phone has performed. This step is relatively simple because a database form has been created in advance, and the judgment rules are already stored in it. Once the final value and sign of a certain parameter are determined, the system can adapt and judge according to the preset rules, and then give a judgment result, such as left, or left and then up, etc. It should be noted that although sometimes the user's hand movement is not completed as intended, the system will still determine what prescribed action the user has performed based on the sensor value processing results and the rules.

[0060] Finally, the system outputs preset interactive actions for the virtual character based on the adaptation results of the prescribed actions. These interactive actions are essentially the virtual character's dance moves, which are also pre-stored in the application's dance move library. In short, the entire process involves the application processing data collected by the phone's hardware to obtain the corresponding preset actions, and then calling the Unity engine's API to drive the virtual character to perform specific dance moves. Theoretically, the phone's movement data obtained from hardware such as the gyroscope and gravitational acceleration corresponds one-to-one with the dance moves returned by the Unity API. This correspondence is defined in advance by the designer based on the phone's simulated human hand movement patterns; for example, how much the phone tilts forward corresponds to the character tilting forward, or how much the phone rotates around the Z-axis corresponds to the character spinning in a circle. The final dance moves output by the system can be arbitrarily selected as needed; single actions, combinations of actions, or continuous actions are all possible.

[0061] Furthermore, in step 5), the prescribed actions include at least the following groups: (1) left, right, up, down, forward, and backward; (2) lean forward and lean back; or (3) rotate around the z-axis. These three groups of actions can be called the basic actions of the mobile phone. They do not involve the combination and connection between actions. Simply completing a prescribed action will trigger a dance action of the virtual character. For example, waving the phone to the left is judged as waving to the left, and the virtual character will step to the left and wave to the left at the same time; it can also be matched as waving the phone to the left, and the virtual character will complete a dance action of rotating to the left. In short, once the system determines that the mobile phone has completed the prescribed action of "left", it will select the preset dance action corresponding to the prescribed action from the dance action library and use the 3D engine to drive it to complete the display on the mobile phone or projection screen. Prescribed actions can be set in many groups and many individual actions, but this is a challenge for data processing. Therefore, in order to maintain the continuity and smoothness of the game, we did not design so many basic prescribed actions, but simplified these prescribed actions. For example, the gesture of waving the phone to the left is not further subdivided into more specific movements, such as waving to the upper left, middle left, or lower left. Of course, designing more predefined movements is theoretically and practically feasible, but it would require a significant increase in the phone's computing power and storage.

[0062] Furthermore, when determining the action of group (1), the acceleration of the three coordinate systems x, y and z is obtained by the sensor to determine the user's movement direction. Specifically, an array queue is used to record the acceleration data along the three coordinate axes x, y and z in the entire motion state. Then, the last third of the data is extracted, and the absolute value of the acceleration data in the three directions x, y and z is determined respectively. The component with the largest absolute value represents the current motion along that coordinate axis. Then, the direction of motion is determined according to the positive or negative sign of the value.

[0063] This invention innovates the human-computer interaction mode by using a combination of the phone's gyroscope and gravity sensor to identify dance movement types and amplitudes. The phone itself simulates a standing character, and the character's dance is controlled by parameters such as the phone's direction of movement, gravitational acceleration, rotation angle, and tilt angle. The gyroscope provides the user's acceleration in the x, y, and z coordinate systems, allowing us to obtain the user's current motion state, including direction of movement. The user's acceleration (up, down, left, right, forward, backward) is only returned during movement; therefore, determining the presence of acceleration data is sufficient to determine if the user is moving the phone. As mentioned earlier, our game does not aim for perfect reproduction of motion trajectories; it only needs to satisfy our ability to determine the user's hand movement intentions. Therefore, our algorithm primarily focuses on removing "dirty" data related to unnecessary hand movements. For example, when a user moves the phone to the left, the actual hand movement curve usually shows both leftward and upward (or leftward and downward) indices. By simplifying the algorithm, we retain the main direction of the motion trajectory, only judging the acceleration data at the end of the movement, and using different velocity components to relatively accurately determine the user's movement. For example, when a user swings their arm to the left, the phone moves to the left simultaneously. A normal user's hand doesn't move straight to the left. Extensive testing revealed that this movement likely includes both leftward and upward motion components. The phone's hardware sensor system then returns these leftward and upward motion components via API. We use a queue to record the returned data for the entire movement state, and then extract the last third of the data from the queue. This greatly simplifies the overall data processing. In the specific calculation, we only need to calculate which component (upward or leftward) has the largest average value. The largest value corresponds to the coordinate axis along which the movement occurs, and the positive or negative sign represents the current direction. We no longer consider the magnitude and direction of other data. Extensive experiments have shown that due to the elbow joint being the initial point of movement, hand movements often exhibit a combination of translation and rotation. The true state of the movement intention is usually reflected in the moments near the end of the movement or in the later stages. Using the direction during this period as the direction of the hand's intended movement significantly improves accuracy. The result of our simple algorithm is that it is easy to determine the basic directions of up, down, left, right, front, and back. Then the result can be returned to the system for subsequent business processing.

[0064] refer to Figure 2 For example, we obtained the user's acceleration data from the mobile API, including the sequence of events and the corresponding motion components. Figure 2Based on the acceleration data obtained from the mobile phone API over a period of time, we created a curve diagram with the motion component as the vertical axis, which can basically show the trend of the entire acceleration value and direction along the x-axis.

[0065] From the entire queue, we obtained the following data: [0.64652907848358154, 0.991446852684021, 1.2929573059082031, 1.4309231042861938, 1.5255753993988037, 1.5630614757537842, 1.5082021951675415, 1.4024903774261475, 1.3021039962768555, 1.146971583366394, 0.91148871183395386, 0.585050] 46367645264, -0.63890910148620605, -0.91290980577468872, -1.0345215797424316, -1.0669131278991699, -1.0675280094146729, -1.0845816135406494, -1.0931657552719116, -1.0017318725585938, -0.87182480096817017, -0.74190628528594971, -0.59959214925765991).

[0066] Figure 2The line graph and the data above represent the x-axis acceleration data generated by shaking or waving the phone to the left. Of course, y-axis acceleration data is also collected simultaneously, but it's not shown here for simplicity. Positive data indicates acceleration to the right, and negative data indicates acceleration to the left. We also found that when a user shakes their phone to the left normally, in most cases there's an initial rightward shake, followed by a final leftward shake. Our data processing method involves first recording all the data for the entire movement in a queue, and then calculating only the data with the largest absolute value in the latter half, which is -1.093. This negative number represents the leftward direction. The same logic applies to the other directions: right, up, down, forward, and backward. The user acceleration parameter `userAcceleration` is used to determine up, down, left, and right, and its data structure is `typedef struct {double x; double y; double z;}CMAcceleration`. For smartphones, acceleration values ​​are typically returned along the x, y, and z axes. It's important to note that these values ​​should exclude the influence of gravitational acceleration on the trajectory; they represent the user's pure acceleration along the x, y, and z axes. To determine which predetermined direction the current motion leans towards—that is, which axis the current velocity will be attributed to—we compare the absolute values ​​of the acceleration data collected along the x, y, and z axes. The value with the largest absolute value represents the current direction of motion. In this example, the acceleration values ​​returned along the y-axis are all less than those along the x-axis; therefore, this motion is considered to be along the x-axis. Of course, this direction of motion is predefined. Therefore, if only absolute directions like up, down, left, and right are defined, the situation of being judged as an intermediate direction like upper left or lower left will not occur. Figure 2 The vertical axis represents the current user's acceleration along the x-axis, and the horizontal axis represents the sequence position of the acquired data in the array. The logic of this invention is to take the data from the last third of the sequence in the data array, compare it with the values ​​along other axes, and find the value with the largest absolute value. The axis along which that value belongs determines the direction of the phone's movement. Then, the direction is determined by the sign of the value; for example, a positive sign indicates rightward movement along the x-axis, and a negative sign indicates leftward movement. The other directions are handled in the same way.

[0067] Furthermore, when determining the action of group (1), the acceleration of the three coordinate systems of x, y and z is obtained by the sensor. An array queue is used to record the acceleration data along the three coordinate axes of x, y and z in the entire motion state. Then, the average value of the absolute value of all data is calculated. The average value is compared with the preset acceleration threshold range. Based on the comparison result, the motion amplitude of the mobile phone is divided into small amplitude, medium amplitude and large amplitude.

[0068] In the actual choreography of dance moves, if only a few simple directional movements can trigger corresponding dance actions, the entire choreography will appear rather monotonous. Therefore, when judging simple directions, we additionally designed a data point for movement amplitude. This data comes from the same source as the direction judgment, obtained through the analysis and processing of user acceleration values. This method divides the magnitude of acceleration values ​​into three levels: small, medium, and large. The level to which the average value of all values ​​in a certain coordinate axis falls determines the level of the wave's intensity. This result is fed back to the system, which combines the judgment of movement amplitude with the judgment of movement type, effectively doubling the number of movement styles. Each different intensity level can trigger a corresponding dance action, such as a left-side tiptoe jump, a left-side step jump or spin, a left-side kick jump, or a high-leg jump. This allows for a richer variety of movements in the same direction, enhancing entertainment and interactivity.

[0069] Furthermore, when judging the action of group (1), if it is confirmed that the user has selected a female virtual character, the female-specific action judgment mode can be selected. Specifically, the acceleration of the three coordinate systems x, y and z is obtained by the sensor, and an array queue is used to record the acceleration data along the three coordinate axes x, y and z in the entire motion state. Then, the data between the last half and five-sixths is extracted, and the absolute value of the acceleration data in the three directions x, y and z is determined respectively. The component with the largest absolute value represents the current motion along the coordinate axis, and then the direction of motion is determined according to the positive or negative sign of the value.

[0070] During the design process, we found significant differences in the trajectory and force of waving gestures between male and female users. When the same gesture was performed by both genders, the system's judgment was inconsistent. For example, if a female user repeatedly waved to the left, the system's final directional judgment would be mostly left, but occasionally downwards. In practice, male users often have higher accuracy in lateral and forward / backward translational movements, with significant differences in the values ​​of different motion components, making it easy to determine the direction of movement. However, when female users perform translational movements, such as waving to the left, differences in movement habits, muscle strength, and movement perception result in significantly different trajectories and acceleration values ​​compared to male users. This is particularly noticeable in the initial stage of the movement, where the force and direction control are lower, leading to inconsistencies. Furthermore, in the final stage of the movement, insufficient force can cause significant differences in directional direction and force distribution compared to the previous stages, easily resulting in a downward movement along the tangent of the outer edge of the arc. This stage is especially prone to causing excessive downward components, leading to misjudgments. To this end, we adjusted the data processing rules to better meet the system's judgment requirements and align with the physiological and psychological characteristics of female users, preventing interactions between characters from becoming highly difficult competitive maneuvers. Regarding the difficulty of actions, sufficient consideration was given when designing action connections and transitions, ensuring that the difficulty of implementing individual prescribed actions does not negatively impact the user experience.

[0071] Furthermore, when determining the (2) group of actions, the gravitational acceleration parameters of the three coordinate systems x, y and z are obtained through the built-in sensor, and the offset angle zTheta of the mobile phone relative to the horizontal direction is calculated, thereby obtaining the parameters of the virtual character's forward or backward tilt. In order to distinguish the forward and backward tilt from other directions, the mobile phone offset angle is limited to within 30 degrees to determine the (1) group of actions, and only when it exceeds 30 degrees is the (2) group of actions determined.

[0072] In practice, we collected a large number of mobile phone movements and found that when shaking the phone left, right, down, and up, the forward and backward tilt components in the latter part of the movement are significantly increased, presenting a state where arc motion is superimposed on the original planar motion. We believe this is related to human joint structure and force generation principles, and is a common occurrence. Therefore, in the four directions of up, down, left, and right, we want to weaken the influence of the pitch component in the final stage of the movement on determining the final direction. To address the possibility that the pitch component might affect the normal direction determination, we designed a system that simultaneously collects and identifies the backward or forward tilt angle value when collecting acceleration data. Based on the data detected by the phone's movement, we determine whether to judge forward or backward tilt. If the forward or backward tilt angle does not exceed 30 degrees, it is considered a natural pitch component generated by the human hand movement, and no corresponding forward or backward tilt is matched; only the direction and amplitude of the up, down, left, and right movement are analyzed. For the dedicated forward and backward tilt judgment mode, judging the phone tilt angle requires the user to flip the phone and return it to its original position; otherwise, it remains at a certain angle, making it impossible to accurately calculate the offset angle.

[0073] Furthermore, the method for calculating the offset angle is as follows:

[0074] let gravityX:CGFloat=gravity.x;

[0075] let gravityY:CGFloat=gravity.y;

[0076] let gravityZ:CGFloat=gravity.z;

[0077] let temp: CGFloat=CGFloat(sqrtf(Float(gravityX*gravityX+gravityY*gravityY)));

[0078] let zTheta=atan2(gravityZ,temp) / Double.pi*180.0;

[0079] Here, gravity represents the gravitational acceleration value provided by the phone's system interface API. The data values ​​for the three axes are gravityX, gravityY, and gravityZ, respectively. The temporary variable temp represents the hypotenuse of the triangle corresponding to x and y. The sqrtf function returns x. 2 +y 2The square root of the sum, zTheta, represents the offset angle of the phone relative to the xy plane along the z-axis, where Double.pi represents the mathematical symbol π (value 3.1415926). The previous formula is the method for calculating the angle between the line connecting a point in 3D space and the origin and the z-axis. We collected and processed another set of sensor data gravityX, gravityY, and gravityZ, analyzed the forward or backward tilt state, and calculated the offset angle zTheta.

[0080] Furthermore, when judging the (3) group of actions, the heading parameters of the mobile phone are obtained through the sensor, and then the angle of the user's rotation of the mobile phone around the z-axis is determined, and finally the number of rotations of the virtual character is determined. Specifically, the heading parameters at the beginning and end of the action are recorded. If the difference is greater than 140, it is determined to be two rotations; if it is greater than 100 and less than 140, it is determined to be one rotation; if it is greater than 35 and less than 100, it is determined to be half a rotation. Rotation is an important part of dance movements. For this kind of movement, we extracted another set of orientation sensor data. By calculating this set of data, we obtained the angle of the user's rotation of the mobile phone around the vertical z-axis, and then triggered the corresponding rotation action according to the adaptation rules. This made full use of the fixed sensor resources of the mobile phone and achieved a better interactive effect and dance effect. We use a time delay scheme to judge the rotation orientation result. If the user's orientation heading parameters do not change within 0.5 seconds, we consider this moment to be the initial orientation. We quickly rotate within 0.5 seconds and record all the motion parameters during this time to judge the final rotation angle of the mobile phone.

[0081] Furthermore, in step 2), the prescribed actions also include group (4), which is a sequential combination of phone shaking and finger tapping or swiping on the phone screen. Specifically, after determining that the phone has completed a prescribed action, the system continuously detects whether the user's finger has tapped or swiped on the phone screen within a preset time period, and further detects the tapping area and number of taps, or the length and time of the swipe. Based on preset rules, the system determines the special actions corresponding to the tapping and swiping actions, triggering the special actions of the virtual character. Among the interactive methods controlled by the phone, actions completed by coordinating the left and right hands are relatively difficult, but the satisfaction they bring to the user is also very strong. Therefore, we designed an action mode that superimposes two interactive methods. After the user shakes the phone to the left to complete a prescribed action, if the sensor then collects a swipe or tap operation within a very short time period, it is determined that the user has completed a special action combination. This action usually involves waving the phone with the right hand and swiping the screen with the left hand, fully engaging both hands and requiring a certain level of coordination to complete, which can greatly increase the entertainment value and participation of the game.

[0082] Furthermore, the prescribed actions also include group (5), which consists of a continuous series of actions formed by any combination of the individual prescribed actions from groups (1) to (3). After selecting this mode, the phone needs to remain in its final position for a preset time period after completing a single prescribed action, and then return to a position close to the original state before starting the next prescribed action. The action of the phone returning to the original state is not counted as the virtual character's action. After the continuous input of actions is completed, the system generates a combination of dance actions in sequence. For more advanced and skilled users, a single dance action obviously cannot meet the higher requirements for entertainment and interactivity. Therefore, we have added a continuous action mode to the interaction method to make it more entertaining and challenging.

[0083] Furthermore, in addition to the traditional free-play mode, this invention also provides an imitation or challenge mode, which is a form of completing mobile phone actions according to preset complete dance movements. Specifically, it involves: (1) acquiring a complete continuous dance video as the preset dance movements; (2) dividing the dance video into movements according to the beat; (3) analyzing the movements on each beat and determining the dance movements to be completed within that beat based on the analysis results; (4) wherein the analysis method is determined based on the image changes of the start frame, end frame, and several intermediate frames of the video within that beat; (5) wherein the movement analysis is implemented using a neural network model; (6) determining the dance movements for each beat based on the results of the neural network output and matching them with the preset movements of the system; (7) outputting the matching results as the prescribed movements that the user needs to complete in sequence when imitating the dance video and prompting the user; (8) when imitating the dance video, the user can use the beat-by-beat imitation mode or the continuous movement imitation mode. In this mode, the interaction between the user and the virtual character becomes more personalized and experiential, and the user can choose their favorite dance or dance character as the object of interaction. However, it's important to note that the dance moves should not be overly complex or unusual; otherwise, the accuracy of the neural network model will decrease, and the transitions between movements will become problematic. When starting to train the neural network, dances with complete and standard rhythm and movement segmentation should be selected. After accumulating a certain amount of training data, the recognition of relatively complex dances can be achieved. In practice, the model is relatively accurate in recognizing simple left-right, up-down, and hand-leg movements, but there is room for improvement in recognizing complex movements such as rotations. It's important to note that the types of movements recognized by the neural network are still the system's pre-defined types. This helps to easily match custom dance moves with pre-stored movements in the system's dance library, although this may affect the visual appeal and accuracy of the input dance. This shortcoming can only be addressed by adding more pre-defined movement types to the system and adding a considerable number of dance movement configuration files.

[0084] In addition, combined Figures 1 to 5 The method for controlling character interaction via mobile phone according to embodiments of the present invention can be implemented by a corresponding electronic device. Figure 6 This is a schematic diagram illustrating a hardware structure 300 according to an embodiment of the present invention.

[0085] The present invention also discloses a system for implementing a method for controlling character interaction via mobile phone, comprising: 1) a character generation module for generating virtual character roles; 2) an action acquisition module for acquiring corresponding mobile phone action data after the user moves the mobile phone to complete any action; 3) an action data processing module for processing the action data according to preset processing rules; 4) an action judgment module for adapting and judging the processed results according to preset judgment rules to determine what kind of prescribed action the mobile phone has completed; and 5) an action output module for outputting the preset interactive actions of the virtual character based on the adaptation results of the prescribed actions.

[0086] And, an apparatus characterized in that it comprises: one or more processors; a memory for storing one or more programs; and when the one or more programs are executed by the one or more processors, causing the one or more processors to perform the interaction method described in any of the preceding items.

[0087] And, a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, performs the role-playing method as described in any of the preceding items.

[0088] The device 300 implementing the present invention in this embodiment includes: a processor 301, a memory 302, a communication interface 303, and a bus 310, wherein the processor 301, the memory 302, and the communication interface 303 are connected through the bus 310 and complete communication with each other.

[0089] Specifically, the processor 301 may include a central processing unit (CPU), an ASIC, or one or more integrated circuits that can be configured to implement embodiments of the present invention.

[0090] In other words, device 300 can be implemented as including: processor 301, memory 302, communication interface 303, and bus 310. Processor 301, memory 302, and communication interface 303 are connected via bus 310 and communicate with each other. Memory 302 is used to store program code; processor 301 reads the executable program code stored in memory 302 to run a program corresponding to the executable program code, so as to execute the method in any embodiment of the present invention, thereby realizing the method and apparatus described in conjunction with the accompanying drawings.

[0091] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0092] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.

Claims

1. A method for controlling character interaction via mobile phone, characterized in that, The method includes: 1) Generate virtual character roles; 2) Move your phone to perform any action; 3) Collect mobile phone motion data; 4) Process the motion data according to preset processing rules; 5) The processed result is adapted and judged according to the preset judgment rules to determine what kind of prescribed action the mobile phone has completed; wherein, the prescribed action includes at least the first group: left, right, up, down, forward, and backward; the second group: tilt forward and tilt backward; or the third group: rotate around the z-axis; When judging the action of group (1), the acceleration of the three coordinate systems x, y and z is obtained by the sensor. An array queue is used to record the acceleration data along the three coordinate axes x, y and z in the whole motion state. Then, the last third of the data is extracted, and the absolute value of the acceleration data in the three directions x, y and z is determined respectively. The component with the largest absolute value represents the current motion along the coordinate axis. Then, the direction of motion is determined according to the positive and negative signs of the values. When judging the (2) group of actions, the gravitational acceleration parameters of the three coordinate systems x, y and z are obtained by the built-in sensor, and the offset angle of the mobile phone relative to the horizontal direction is calculated, so as to obtain the parameters of the virtual character's forward tilt or backward tilt. In order to distinguish the forward tilt and backward tilt from other directions, the mobile phone offset angle is limited to within 30 degrees to judge the (1) group of actions, and only when it exceeds 30 degrees is the (2) group of actions judged. The method for calculating the offset angle is as follows: let gravityX:CGFloat=gravity.x; let gravityY:CGFloat=gravity.y; let gravityZ:CGFloat=gravity.z; let temp:CGFloat=CGFloat(sqrtf(Float(gravityX*gravityX+gravityY*gravityY))); Let zTheta=atan2(gravityZ,temp) / Double.pi*180.0; Here, `gravity` represents the gravitational acceleration value provided by the phone's system interface. The data values ​​for the three axes are `gravityX`, `gravityY`, and `gravityZ`, respectively. The temporary variable `temp` represents the hypotenuse of the triangle corresponding to `x` and `y`. The `sqrtf` function returns a value that is not explicitly stated in the original text. The square root of the sum, zTheta represents the offset angle of the phone relative to the xy plane in the z-axis direction, and Double.pi represents the mathematical symbol π; 6) Output the preset interactive actions of the virtual character based on the adaptation results of the prescribed actions.

2. The method according to claim 1, characterized in that, When determining (1) group of actions, the acceleration of the three coordinate systems x, y and z is obtained by the sensor. An array queue is used to record the acceleration data along the three coordinate axes x, y and z in the whole motion state. Then the average value of the absolute value of all data is calculated. The average value is compared with the preset acceleration threshold range. Based on the comparison result, the motion amplitude of the mobile phone is divided into small amplitude, medium amplitude and large amplitude.

3. The method according to claim 1, characterized in that, When judging (1) group of actions, if it is confirmed that the user has selected a female virtual character, the female-specific action judgment mode can be selected. Specifically, the acceleration of the three coordinate systems x, y and z is obtained by the sensor. An array queue is used to record the acceleration data along the three coordinate axes x, y and z in the entire motion state. Then, the data between the last half and five-sixths is extracted, and the absolute value of the acceleration data in the three directions x, y and z is determined respectively. The component with the largest absolute value represents the current motion along the coordinate axis. Then, the direction of motion is determined according to the positive or negative sign of the value.

4. The method according to claim 1, characterized in that, When judging the action of group (3), the orientation parameters of the mobile phone are obtained by the sensor, and then the angle of the user rotating the mobile phone around the z-axis is determined. Finally, the number of rotations of the virtual character is determined. Specifically, the orientation parameters at the beginning and end of the action are recorded. If the difference is greater than 140, it is determined to be two rotations. If it is greater than 100 and less than 140, it is determined to be one rotation. If it is greater than 35 and less than 100, it is determined to be half a rotation.

5. The method according to claim 1, characterized in that, In step 2), the prescribed actions also include group (4), which is a sequential combination of phone shaking action and finger tapping or finger swiping action. Specifically, after determining that the phone has completed a certain prescribed action, the system continues to detect whether the user's finger has tapped the phone screen or swiped the screen within a preset time period, and further detects the area and number of taps, or the length and time of swiping. Based on preset rules, the system determines the special actions corresponding to the tapping and swiping actions, and triggers the special actions of the virtual character.

6. The method according to claim 1, characterized in that, The prescribed actions also include group (5), which is a continuous action formed by any combination of the individual prescribed actions from group (1) to group (3). After selecting the mode, after a single prescribed action is completed, the mobile phone needs to stay in the final position for a preset time period, and then the mobile phone returns to near the original state before starting the next prescribed action. The action of the mobile phone returning to the original state is not counted as the action of the virtual character. After the continuous input of actions is completed, the system generates the combined dance actions in sequence.

7. The method according to claim 1, characterized in that, This also includes forms of performing mobile phone movements according to preset complete dance moves, specifically: (1) Obtain a complete continuous dance video as a preset dance movement; (2) Divide the complete continuous dance video into movements according to the beat; (3) Analyze the movements on each beat and determine the dance movements to be completed within the beat based on the analysis results; (4) The analysis method is to determine the movements based on the image changes of the start frame, end frame and several intermediate frames of the video within the beat; (5) The movement analysis is implemented using a neural network model; (6) Determine the dance movements for each beat based on the results of the neural network output and match them with the preset movements of the system; (7) Output the matching results as the prescribed movements that the user needs to complete in sequence when imitating the dance video and prompt the user; (8) When imitating the dance video, the user can use either the beat-by-beat imitation mode or the continuous movement imitation mode.

8. A system for controlling character interaction via a mobile phone, characterized in that, include: Character generation module: Used to generate virtual character roles; Motion capture module: Used to collect corresponding mobile phone motion data after the user moves the mobile phone to complete any action; Motion data processing module: Used to process motion data according to preset processing rules; Action judgment module: Adapts and judges the processed results according to preset judgment rules to determine what prescribed action the mobile phone has completed; The prescribed actions include at least the following groups: (1) left, right, up, down, forward, and backward; (2) forward and backward; or (3) rotation around the z-axis. When judging the action of group (1), the acceleration of the three coordinate systems x, y and z is obtained by the sensor. An array queue is used to record the acceleration data along the three coordinate axes x, y and z in the whole motion state. Then, the last third of the data is extracted, and the absolute value of the acceleration data in the three directions x, y and z is determined respectively. The component with the largest absolute value represents the current motion along the coordinate axis. Then, the direction of motion is determined according to the positive and negative signs of the values. When judging the (2) group of actions, the gravitational acceleration parameters of the three coordinate systems x, y and z are obtained by the built-in sensor, and the offset angle of the mobile phone relative to the horizontal direction is calculated, so as to obtain the parameters of the virtual character's forward tilt or backward tilt. In order to distinguish the forward tilt and backward tilt from other directions, the mobile phone offset angle is limited to within 30 degrees to judge the (1) group of actions, and only when it exceeds 30 degrees is the (2) group of actions judged. The method for calculating the offset angle is as follows: let gravityX:CGFloat=gravity.x; let gravityY:CGFloat=gravity.y; let gravityZ:CGFloat=gravity.z; let temp:CGFloat=CGFloat(sqrtf(Float(gravityX*gravityX+gravityY*gravityY))); Let zTheta=atan2(gravityZ,temp) / Double.pi*180.0; Here, `gravity` represents the gravitational acceleration value provided by the phone's system interface. The data values ​​for the three axes are `gravityX`, `gravityY`, and `gravityZ`, respectively. The temporary variable `temp` represents the hypotenuse of the triangle corresponding to `x` and `y`. The `sqrtf` function returns a value that is not explicitly stated in the original text. The square root of the sum, zTheta represents the offset angle of the phone relative to the xy plane in the z-axis direction, and Double.pi represents the mathematical symbol π; Action output module: Outputs preset interactive actions of virtual characters based on the adaptation results of specified actions.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.

10. An electronic device, characterized in that, The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements the steps of the method described in any one of claims 1-7.