Method, device and equipment for controlling game role behaviors through head and neck actions

By identifying and analyzing the player's head and neck movements, and using artificial intelligence to control the game character behavior, the hand and neck fatigue problems caused by traditional game control methods are solved, achieving a healthier gaming experience.

CN119868921APending Publication Date: 2025-04-25佘严
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510096970.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing game control methods rely on hand operations, which leads to hand and neck fatigue and affects player health.

Method used

Control the behavior of the game character through head and neck movements, use artificial intelligence algorithms to identify key points in the face image, determine the player's neck movements based on the location of the key points, and control the behavior of the game character through different neck movements.

Benefits of technology

Free your hands, exercise and relax the cervical spine effectively, reduce fatigue and discomfort, and provide a healthier gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119868921A_ABST
    Figure CN119868921A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of game control, and discloses a method, device and equipment for controlling game role behaviors through head and neck actions, and the method comprises the following steps: continuously capturing original images, preprocessing the original images, and determining a target player face image in the original images; acquiring a plurality of preset key point positions in the face image of the target player, and determining head and neck actions of the target player according to a relationship among the plurality of preset key point positions; according to the head and neck actions of the target player and a preset mapping relation, game role behaviors are controlled, and the preset mapping relation is the mapping relation between the head and neck actions and the game role behaviors. According to the method, the key points in the face image are recognized, the neck actions of the player are determined in combination with the positions of the key points, then the game role behaviors are controlled through the different neck actions, traditional two-hand operation is replaced to control the game role, the two hands are liberated, the cervical vertebra of the player is effectively exercised and relaxed, fatigue and discomfort are reduced, and healthier game experience is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game control technology, and in particular to a method, device and equipment for controlling the behavior of a game character through head and neck movements. Background Art

[0002] Currently, the control method of most games relies on hand operation. Players need to control the characters in the game through devices such as handles, mice or touch screens. This traditional operation method may cause hand fatigue and discomfort caused by long-term use of both hands. At the same time, maintaining the same posture for a long time to play games will cause stiffness and fatigue in the neck, which will affect the health of players. With the development of the game industry, players' demand for more convenient, innovative and healthy game operation methods has gradually increased. How to help players relax their cervical spine and promote health while enjoying the game has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] In view of this, the present invention provides a method, device and equipment for controlling the behavior of a game character through head and neck movements, so as to solve the problem of hand and cervical fatigue and health impact when players enjoy the game.

[0004] In a first aspect, the present invention provides a method for controlling the behavior of a game character through head and neck movements, the method comprising:

[0005] Continuously capture original images, and pre-process the original images to determine the face image of the target player in the original images;

[0006] Acquire multiple preset key point positions in the target player's face image, and determine the target player's head and neck movements based on the relationship between the multiple preset key point positions;

[0007] The behavior of the game character is controlled according to the head and neck movements of the target player and the preset mapping relationship, and the preset mapping relationship is the mapping relationship between the head and neck movements and the behavior of the game character.

[0008] The method for controlling the behavior of a game character through head and neck movements provided by the present invention recognizes key points in a face image through an artificial intelligence algorithm, determines the player's neck movements based on the positions of the key points, and then controls the behavior of the game character through different neck movements, replacing the traditional two-handed operation to control the game character, freeing up both hands, effectively exercising and relaxing the player's cervical spine, reducing fatigue and discomfort, and providing a healthier gaming experience.

[0009] In an optional implementation, preprocessing the original image to determine the target player's face image in the original image includes:

[0010] The size of the original image is adjusted to a preset size, and the grayscale value of the original image is normalized to obtain a standard image;

[0011] Performing face recognition on the standard image, determining at least one face image, and calculating the confidence of at least one face image;

[0012] Compare the confidence of at least one face image, and take the face image with the highest confidence as the target player face image.

[0013] The method for controlling the behavior of a game character through head and neck movements provided by the present invention determines the face image of a target player by calculating the confidence of a face image, thereby preventing a camera from capturing multiple face images and reducing the accuracy of the target player's control of the game character's behavior. The face image with the highest confidence is used as the face image of the target player, accurately identifying the target player, and improving the target player's control accuracy over the game character's behavior and the gaming experience.

[0014] In an optional implementation, preprocessing the original image to determine the target player's face image in the original image also includes:

[0015] The size of the original image is adjusted to a preset size, and the grayscale value of the original image is normalized to obtain a standard image;

[0016] Performing face recognition on the standard image, determining the face image, and calculating the similarity between the face image and the preset target player image;

[0017] When the similarity between the face image and the preset target player image is not less than a preset similarity threshold, the corresponding face image is used as the target player face image.

[0018] The method for controlling the behavior of a game character through head and neck movements provided by the present invention determines whether the current player is the player of the corresponding account by calculating the similarity of face images, thereby preventing others from entering their own game, improving the privacy of the game, and enhancing the player's experience.

[0019] In an optional implementation, the preset key points include: left eye, right eye, nose tip, mouth, left tragus point, right tragus point;

[0020] Head and neck movements include: neck tilting back, neck rotation left and right, neck stretching left and right;

[0021] Get the locations of multiple preset key points in the target player's face image, including:

[0022] According to the original image, a plane rectangular coordinate system is established with the original image from left to right as the horizontal coordinate direction and from bottom to top as the vertical coordinate direction;

[0023] The coordinates of multiple preset key points in the plane rectangular coordinate system are obtained as the corresponding preset key point positions.

[0024] The method for controlling the behavior of a game character through head and neck movements provided by the present invention helps players relax and exercise their cervical vertebrae during the game by designing specific head and neck movements, thereby reducing cervical fatigue caused by long-term gaming. Appropriate facial key points are selected in combination with the head and neck movements, and the positions of the facial key points are used to determine the head and neck movements, thereby achieving more accurate control.

[0025] In an optional implementation, determining the head and neck movement of the target player according to the relationship between the positions of a plurality of preset key points includes:

[0026] When the vertical coordinate of the nose tip is greater than the vertical coordinate of the left tragus point, and the vertical coordinate of the nose tip is greater than the vertical coordinate of the right tragus point, the target player's head and neck movement is neck tilt;

[0027] When the horizontal coordinate of the nose tip is smaller than the horizontal coordinate of the left tragus point, the target player's head and neck movement is a left rotation of the neck;

[0028] When the horizontal coordinate of the nose tip is greater than the horizontal coordinate of the right tragus point, the target player's head and neck movement is a rightward rotation of the neck;

[0029] When the ordinate of the left tragus point is greater than the ordinate of the left eye, the ordinate of the left eye is greater than the ordinate of the right eye, and the ordinate of the right eye is greater than the ordinate of the right tragus point, the target player's head and neck movement is that the neck stretches to the right;

[0030] When the ordinate of the right tragus point is greater than the ordinate of the right eye, the ordinate of the right eye is greater than the ordinate of the left eye, and the ordinate of the left eye is greater than the ordinate of the left tragus point, the head and neck movement of the target player is that the neck stretches to the left.

[0031] The method for controlling the behavior of a game character through head and neck movements provided by the present invention combines the relationship changes between key point positions corresponding to different neck movements, and determines the player's current neck movement by identifying the relationship changes between key point positions, so that the player can control the behavior of the game character more easily and naturally and prevent excessive neck fatigue.

[0032] In an optional implementation, the preset mapping relationship includes: neck tilting back corresponds to jumping acceleration, neck rotation to the left and right corresponds to changing facial orientation, and neck stretching to the left and right corresponds to moving direction;

[0033] Control the behavior of the game character based on the target player's head and neck movements and preset mapping relationships, including:

[0034] When the head and neck movement is to tilt the neck backward, control the game character to jump and accelerate;

[0035] When the head and neck movement is the neck rotating to the left or right, control the game character to turn left or right, and change the face direction to the left or right;

[0036] When the head and neck movement is that the neck stretches to the left or right, the game character is controlled to move left or right.

[0037] The method for controlling the behavior of a game character through head and neck movements provided by the present invention triggers changes in the character's behavior in the game by capturing and analyzing the player's neck movements (such as stretching the neck left and right, rotating, and leaning back, etc.), thereby allowing the player to effectively relax the cervical spine while enjoying the game and alleviate the physical discomfort caused by long-term gaming.

[0038] In an optional embodiment, the method further includes:

[0039] Perform health analysis based on the target player's head and neck movements to obtain the target player's health monitoring data;

[0040] Head and neck movement suggestions for the target player are generated based on the health monitoring data and displayed to the target player.

[0041] The method provided by the present invention for controlling the behavior of a game character through head and neck movements records the player's head and neck movements in real time through a health monitoring and control mechanism and provides health data feedback and suggestions. While playing the game, the player can relax and exercise his neck according to the head and neck movement suggestions of health monitoring, thereby helping to reduce common physical fatigue problems during the game and improving the health of the game experience.

[0042] In a second aspect, the present invention provides a device for controlling the behavior of a game character through head and neck movements, the device comprising:

[0043] The target player identification module is used to continuously capture the original image, pre-process the original image, and determine the target player's face image in the original image;

[0044] A head and neck motion determination module, used to obtain multiple preset key point positions in the target player's face image, and determine the head and neck motion of the target player based on the relationship between the multiple preset key point positions;

[0045] The character behavior control module is used to control the game character behavior according to the head and neck movements of the target player and the preset mapping relationship. The preset mapping relationship is the mapping relationship between the head and neck movements and the game character behavior.

[0046] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0047] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 is a flow chart of a method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0050] Figure 2 is a flow chart of another method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0051] Figure 3 is a schematic diagram of the positions of key points in a face image in a method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0052] Figure 4 is a schematic diagram of a neck backward movement in a method for controlling a game character's behavior through head and neck movements according to an embodiment of the present invention;

[0053] Figure 5 is a schematic diagram of the action of rotating the neck to the left in the method of controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0054] Figure 6 is a schematic diagram of the action of rotating the neck to the right in the method of controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0055] Figure 7 is a schematic diagram of an action of stretching the neck to the right in a method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0056] Figure 8 is a schematic diagram of an action of stretching the neck to the left in a method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0057] Fig. 9 is a schematic diagram of a game interface in a specific embodiment of a method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0058] Fig.10 is a structural block diagram of a device for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention;

[0059] Fig.11 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0061] An embodiment of the present invention provides a method for controlling the behavior of a game character through head and neck movements, which determines the head and neck movements by identifying the key point positions on the face of a target player, and controls the behavior of the game character through the head and neck movements, so as to relieve the fatigue of the hands and cervical spine of the player when enjoying the game.

[0062] According to an embodiment of the present invention, a method embodiment of controlling the behavior of a game character through head and neck movements is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0063] In this embodiment, a method for controlling the behavior of a game character through head and neck movements is provided, which can be used in the above-mentioned computer system. Figure 1 is a flow chart of a method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0064] Step S101, continuously capture original images, and pre-process the original images to determine the target player's face image in the original images.

[0065] Specifically, before continuously capturing raw images, first check whether there is a camera on the game device (such as a mobile phone, computer, etc.). If there is no camera, a prompt "This device has no available camera" will be displayed when entering the game. If there is a camera, the original images containing human faces will be continuously captured by calling the camera of the game device. For example, a mobile phone generally has two cameras: a front camera and a rear camera. Therefore, in actual implementation, if the game is running in an iOS or Android system, the front camera will be turned on by default, and a button for switching cameras is also provided on the game interface.

[0066] After the original image is acquired by the camera, the original image is preprocessed to identify at least one face image in the original image, and the face image of the target player is determined according to a preset rule.

[0067] Step S102, obtaining multiple preset key point positions in the target player's face image, and determining the head and neck movements of the target player based on the relationship between the multiple preset key point positions.

[0068] Specifically, the preset key points can be any point on the face, such as eyes, nose tip, mouth, etc., which are examples only, but not limited to these. Artificial intelligence algorithms can be used to analyze facial images to determine the positions of multiple preset key points. The analysis process is a mature existing technology and will not be repeated here.

[0069] By actually analyzing the positional relationship of each key point during the head and neck movement, the head and neck movement is determined in reverse based on the positional relationship between the key points in the face image. For example, when the longitudinal height of the nose tip is equal to the longitudinal height of the mouth, the target player's head and neck movement may be lowering the head. This is just an example, but not limited to this.

[0070] Step S103, controlling the behavior of the game character according to the head and neck movements of the target player and the preset mapping relationship, where the preset mapping relationship is the mapping relationship between the head and neck movements and the behavior of the game character.

[0071] Specifically, the player's head and neck movements are mapped to the character behavior in the game, and the game character behavior is controlled according to the target player's head and neck movements and the preset mapping relationship. For example, the target player controls the game character to jump and accelerate by tilting the neck backward, and the jumping height or speed is proportional to the degree of tilting the neck backward. The greater the degree of tilting backward, the higher the game character jumps within the corresponding height range. This is just an example, but not limited to this.

[0072] The method for controlling the behavior of a game character through head and neck movements provided in this embodiment recognizes key points in a face image through an artificial intelligence algorithm, determines the player's neck movements based on the positions of the key points, and then controls the behavior of the game character through different neck movements, replacing the traditional two-handed operation to control the game character, freeing up both hands, effectively exercising and relaxing the player's cervical spine, reducing fatigue and discomfort, and providing a healthier gaming experience.

[0073] In some optional embodiments, the method further comprises:

[0074] According to the head and neck movements of the target player, health analysis is performed to obtain the health monitoring data of the target player.

[0075] Specifically, the method for controlling the behavior of a game character through head and neck movements provided in this embodiment can be combined with a health monitoring device to record the head and neck movements of a target player in real time and generate health monitoring data of the target player.

[0076] Head and neck movement suggestions for the target player are generated based on the health monitoring data and displayed to the target player.

[0077] Specifically, the target players' health problems and causes are analyzed based on the health monitoring data, and targeted head and neck action suggestions for improving health problems are generated and displayed to the target players through the game interface or text messages, reminding the target players to pay attention to their health problems and take measures.

[0078] The method provided in this embodiment for controlling the behavior of a game character through head and neck movements records the player's head and neck movements in real time through a health monitoring and control mechanism and provides health data feedback and suggestions. While playing the game, the player can relax and exercise his neck according to the head and neck movement suggestions of health monitoring, thereby helping to reduce common physical fatigue problems during the game and improving the health of the gaming experience.

[0079] In this embodiment, a method for controlling the behavior of a game character through head and neck movements is provided, which can be used in the above-mentioned computer system. Figure 2 is a flow chart of a method for controlling the behavior of a game character through head and neck movements according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0080] Step S201, continuously capture original images, and pre-process the original images to determine the target player's face image in the original images.

[0081] Specifically, the above step S201 includes:

[0082] Step S2011, adjusting the size of the original image to a preset size, and normalizing the grayscale value of the original image to obtain a standard image.

[0083] Specifically, the original image is obtained from the camera every 100 ms, and the size of the original image is adjusted to a preset size, such as 128×128 pixels, using the resize function, and the grayscale values ​​of the RGB channels of the original image are normalized to eliminate some illumination changes, thereby obtaining a standard image.

[0084] Step S2012, performing face recognition on the standard image, determining at least one face image, and calculating the confidence of at least one face image.

[0085] Specifically, the pixel values ​​between standard images are comparable, so standard images are used for face recognition, at least one face image is determined, each face image is marked with a rectangular frame, and the key points on each face image are marked with "points". The size of the rectangular frame corresponding to each face image can be used as the confidence of the corresponding face image, which is only an example, but not limited to this. The process of calculating the confidence of a face image is a mature existing technology and will not be repeated here.

[0086] Step S2013, comparing the confidence of at least one facial image, and taking the facial image with the highest confidence as the target player's facial image.

[0087] Specifically, taking into account the complexity of the environment scenes in which players are playing games (for example, when players use mobile phones to play games in public places, the camera may capture many faces other than players), the face image with the highest confidence is used as the target player's face image, and the model returns the rectangular box corresponding to the face image with the highest confidence and the corresponding key point position as the target player's control operation data for the game character.

[0088] The method for controlling the behavior of a game character through head and neck movements provided in this embodiment determines the facial image of the target player by calculating the confidence of the facial image, thereby preventing the camera from capturing multiple facial images and reducing the accuracy of the target player's control of the game character's behavior. The facial image with the highest confidence is used as the facial image of the target player, accurately identifying the target player, and improving the target player's control accuracy over the game character's behavior and the gaming experience.

[0089] In some optional implementations, the above step S201 pre-processes the original image to determine the target player's face image in the original image, and further includes:

[0090] Step a1, adjusting the size of the original image to a preset size, and normalizing the grayscale value of the original image to obtain a standard image.

[0091] Step a2, performing face recognition on the standard image, determining the face image, and calculating the similarity between the face image and the preset target player image.

[0092] Specifically, by calculating the similarity between the face image captured by the camera and the preset target player image, at least one target player is determined, and only the target player who meets the similarity requirement with the input face image data can control the character in the game.

[0093] When multiple players need to participate in the same device, facial image data of multiple target players can be recorded before the game starts, and the facial image data recorded in advance can be encoded into a facial feature vector corresponding to a player's face through an artificial intelligence model (such as CurricularFace face recognition model) (for example, CurricularFace encodes the face into a 512-dimensional vector, such as player a corresponds to vector 512-dimensional data data_a, and player b corresponds to vector 512-dimensional data data_b).

[0094] When multiple people play games at the same time and the camera detects multiple faces, the detected face frames are input into the artificial intelligence model to be encoded into face frame vectors. For example, the vectors emb1, emb2, ... of the detected face frames are used to perform vector inner products with the previously encoded player data data_a and data_b to obtain similarity values. If emb1 is calculated to have a higher similarity with data_a and exceeds the preset similarity threshold, it can be confirmed that the face frame corresponding to emb1 is the corresponding player a. Similarly, emb2 is calculated to perform vector inner products with the previously encoded data_a and data_b to obtain similarity values. If emb2 is calculated to have a higher similarity with data_a and exceeds the preset similarity threshold, it can be confirmed that the face frame corresponding to emb2 is the corresponding player b. This achieves the purpose of satisfying multiple players to control their corresponding characters separately on the same device.

[0095] Step a3: when the similarity between the face image and the preset target player image is not less than a preset similarity threshold, the corresponding face image is used as the target player face image.

[0096] The method for controlling the behavior of a game character through head and neck movements provided in this embodiment determines whether the current player is the registered player by calculating the similarity of facial images, thereby preventing others from entering their own game and improving the privacy of the game. At the same time, it can satisfy the needs of multiple players to play games simultaneously on the same device, such as a mobile phone or laptop computer, without adding redundant hardware facilities, thereby reducing hardware costs.

[0097] Step S202, obtaining multiple preset key point positions in the target player's face image, and determining the head and neck movements of the target player based on the relationship between the multiple preset key point positions.

[0098] Specifically, Figure 3As shown, the preset key points include: left eye, right eye, nose tip, mouth, left tragus point, right tragus point. Head and neck movements include: neck tilting back, neck rotation left and right, neck stretching left and right. In the above step S202, the positions of multiple preset key points in the target player's face image are obtained, including:

[0099] Step S2021, based on the original image, a plane rectangular coordinate system is established with the original image from left to right as the horizontal coordinate direction and from bottom to top as the vertical coordinate direction.

[0100] Specifically, the position of the preset key point can be represented by using coordinates, so it is necessary to establish a coordinate system based on the plane where the target player's face image is located. The plane where the target player's face image is located is the same plane as the plane where the original image is located. In this embodiment, the original image is used from left to right as the horizontal coordinate direction and from bottom to top as the vertical coordinate direction to establish a plane rectangular coordinate system. The origin position of the plane rectangular coordinate system can be selected arbitrarily. For the convenience of representation and calculation, the coordinate value of each key point is made to be a positive number as much as possible. For example, the fixed point position in the lower left corner of the original image is used as the origin of the plane rectangular coordinate system. This is only used as an example, but is not limited to this.

[0101] Step S2022, obtaining the coordinates of a plurality of preset key points in a plane rectangular coordinate system as corresponding preset key point positions.

[0102] Specifically, the coordinates of the plurality of preset key points in the plane rectangular coordinate system are used as the corresponding preset key point positions, and the format is (x, y).

[0103] The method provided in this embodiment controls the behavior of a game character through head and neck movements. By designing specific head and neck movements, it helps players relax and exercise their cervical spine during the game, reduces cervical fatigue caused by long-term gaming, selects appropriate facial key points in combination with the head and neck movements, and uses the positions of the facial key points to determine the head and neck movements, thereby achieving more accurate control.

[0104] In the above step S202, the head and neck movements of the target player are determined according to the relationship between the positions of the plurality of preset key points, including:

[0105] Step S2023, when the ordinate of the nose tip is greater than the ordinate of the left tragus point, and the ordinate of the nose tip is greater than the ordinate of the right tragus point, the head and neck movement of the target player is neck tilting back.

[0106] Specifically, Figure 4As shown, when the target player's neck is tilted back, the tip of his nose is higher than the vertical coordinates of the two tragus points, so the vertical coordinate of the nose tip is greater than the vertical coordinate of the left tragus point and the vertical coordinate of the nose tip is greater than the vertical coordinate of the right tragus point as the judgment condition for judging that the target player's head and neck movement is neck tilting back. When the vertical coordinate of the nose tip is greater than the vertical coordinate of the left tragus point and the vertical coordinate of the nose tip is greater than the vertical coordinate of the right tragus point, it means that the target player's head and neck movement is neck tilting back.

[0107] Step S2024, when the horizontal coordinate of the nose tip is smaller than the horizontal coordinate of the left tragus point, the head and neck movement of the target player is that the neck rotates to the left.

[0108] Specifically, Figure 5 As shown, when the target player's neck rotates to the left, the horizontal coordinate of the nose tip changes from being greater than the horizontal coordinate of the left tragus point to being less than the horizontal coordinate of the left tragus point. Therefore, the horizontal coordinate of the nose tip is less than the horizontal coordinate of the left tragus point as the judgment condition for judging that the target player's head and neck movement is a rotation of the neck to the left. When the horizontal coordinate of the nose tip is less than the horizontal coordinate of the left tragus point, it means that the target player's head and neck movement is a rotation of the neck to the left.

[0109] Step S2025, when the horizontal coordinate of the nose tip is greater than the horizontal coordinate of the right tragus point, the head and neck movement of the target player is that the neck rotates to the right.

[0110] Specifically, Figure 6 As shown, when the target player's neck rotates to the right, the horizontal coordinate of the nose tip changes from being less than the horizontal coordinate of the right tragus point to being greater than the horizontal coordinate of the right tragus point. Therefore, the horizontal coordinate of the nose tip being greater than the horizontal coordinate of the right tragus point is used as a judgment condition for judging that the target player's head and neck movement is a rotation of the neck to the right. When the horizontal coordinate of the nose tip is greater than the horizontal coordinate of the right tragus point, it means that the target player's head and neck movement is a rotation of the neck to the right.

[0111] Step S2026, when the ordinate of the left tragus point is greater than the ordinate of the left eye, the ordinate of the left eye is greater than the ordinate of the right eye, and the ordinate of the right eye is greater than the ordinate of the right tragus point, the head and neck movement of the target player is that the neck stretches to the right.

[0112] Specifically, Figure 7 As shown, when the target player's neck is stretched to the right, the ordinate of its left tragus point is greater than the ordinate of its left eye, the ordinate of its left eye is greater than the ordinate of its right eye, and the ordinate of its right eye is greater than the ordinate of its right tragus point. Therefore, the ordinate of its left tragus point is greater than the ordinate of its left eye, the ordinate of its left eye is greater than the ordinate of its right eye, and the ordinate of its right eye is greater than the ordinate of its right tragus point as the judgment condition for determining that the target player's head and neck movement is a neck stretch to the right.

[0113] Step S2027, when the ordinate of the right tragus point is greater than the ordinate of the right eye, the ordinate of the right eye is greater than the ordinate of the left eye, and the ordinate of the left eye is greater than the ordinate of the left tragus point, the head and neck movement of the target player is that the neck stretches to the left.

[0114] Specifically, Figure 8 As shown, when the target player's neck is stretched to the left, the ordinate of the right tragus point is greater than the ordinate of the right eye, the ordinate of the right eye is greater than the ordinate of the left eye, and the ordinate of the left eye is greater than the ordinate of the left tragus point. Therefore, the ordinate of the right tragus point is greater than the ordinate of the right eye, the ordinate of the right eye is greater than the ordinate of the left eye, and the ordinate of the left eye is greater than the ordinate of the left tragus point as the judgment condition for judging that the target player's head and neck movement is the neck stretching to the right.

[0115] The method provided in this embodiment for controlling the behavior of a game character through head and neck movements combines the relationship changes between key point positions corresponding to different neck movements, and determines the player's current neck movement by identifying the relationship changes between key point positions, so that the player can control the behavior of the game character more easily and naturally and prevent excessive neck fatigue.

[0116] Step S203, controlling the behavior of the game character according to the head and neck movements of the target player and the preset mapping relationship, where the preset mapping relationship is the mapping relationship between the head and neck movements and the behavior of the game character.

[0117] Specifically, the preset mapping relationship includes: neck tilting back corresponds to jumping acceleration, neck rotation to the left and right corresponds to changing facial orientation, and neck stretching to the left and right corresponds to moving direction. The above step S2023 includes:

[0118] Step S2031, when the head and neck movement is the neck leaning back, the game character is controlled to jump and accelerate.

[0119] Specifically, the behaviors of game characters generally include: moving left, moving right, accelerating, decelerating, jumping, etc., so they are mapped one-to-one according to the types of head and neck movements and the behaviors of game characters. Leaning back the neck corresponds to jumping acceleration, rotating the neck left and right corresponds to changing the facial orientation, and stretching the neck left and right corresponds to the moving direction. The behavior direction of the game character is consistent with the direction of the facial movement, ensuring that the target player's head and neck movements control the behavior of the game character more in line with people's conventional cognition, bringing players a better gaming experience.

[0120] When the target player's head and neck movement is to tilt the neck backward, control the game character to jump and accelerate.

[0121] Step S2032, when the head and neck movement is the neck rotating to the left or right, control the game character to turn left or right, and change the facial orientation to the left or right.

[0122] Specifically, when the head and neck movement is a left rotation of the neck, the game character is controlled to turn left and change the facial orientation to the left; when the head and neck movement is a right rotation of the neck, the game character is controlled to turn right and change the facial orientation to the right.

[0123] Step S2033, when the head and neck movement is the neck stretching to the left or right, control the game character to move to the left or right.

[0124] Specifically, when the head and neck movement is the neck stretching to the left, the game character is controlled to move to the left; when the head and neck movement is the neck stretching to the right, the game character is controlled to move to the right.

[0125] The method for controlling the behavior of a game character through head and neck movements provided in this embodiment captures and analyzes the player's neck movements (such as stretching the neck left and right, rotating it, leaning back, etc.), triggers changes in the character's behavior in the game, thereby allowing the player to effectively relax the cervical spine while enjoying the game and alleviate the physical discomfort caused by long-term gaming.

[0126] In a specific embodiment, Fig. 9 As shown, the cute pet is always in a jumping state, and the player controls the cute pet's behavior by identifying the player's head and neck movements:

[0127] (1) The jump is accelerated and the jump is made higher by tilting the neck backward (the model recognizes that the vertical coordinate position of the nose is higher than the vertical coordinate positions of the left tragus point and the right tragus point).

[0128] (2) The direction of the bullet shooting is controlled by rotating the neck. If the neck is rotated to the left (the horizontal coordinate position of the nose is less than the horizontal coordinate position of the left tragus point), the pet's face will face left. If the neck is rotated to the right (the horizontal coordinate position of the nose is greater than the horizontal coordinate position of the right tragus point), the pet's face will face right.

[0129] (3) The movement direction of the cute pet on the horizontal plane is controlled by stretching the neck. Stretching to the left (satisfying at the same time: the ordinate of the right tragus point is greater than the ordinate of the right eye, the ordinate of the right eye is greater than the ordinate of the left eye, and the ordinate of the left eye is greater than the ordinate of the left tragus point) controls the cute pet to move to the left. Stretching to the right (satisfying at the same time: the ordinate of the left tragus point is greater than the ordinate of the left eye, the ordinate of the left eye is greater than the ordinate of the right eye, and the ordinate of the right eye is greater than the ordinate of the right tragus point) controls the cute pet to move to the right.

[0130] If the bullet shot by the cute pet character hits a monster, the monster's health will be deducted. If the monster's health is deducted to less than or equal to 0, the monster is considered defeated and the number of remaining monsters is reduced by 0.

[0131] This is a casual game that frees your hands, allowing players to relax while playing the game and relieve fatigue caused by long-term work or playing other games by exercising their necks.

[0132] In the present embodiment, a device for controlling the behavior of game characters by head and neck movements is also provided, and the device is used to realize the above-mentioned embodiment and preferred implementation mode, and the description thereof will not be repeated. As used below, the term "module" can realize the combination of software and / or hardware of the predetermined function. Although the device described in the following embodiments is preferably realized with software, the realization of hardware, or the combination of software and hardware is also possible and conceived.

[0133] This embodiment provides a device for controlling the behavior of a game character through head and neck movements, such as Fig.10 As shown, including:

[0134] The target player identification module 1001 is used to continuously capture original images, pre-process the original images, and determine the target player's face image in the original images.

[0135] The head and neck motion determination module 1002 is used to obtain multiple preset key point positions in the target player's face image, and determine the head and neck motion of the target player based on the relationship between the multiple preset key point positions.

[0136] The character behavior control module 1003 is used to control the game character behavior according to the head and neck movements of the target player and the preset mapping relationship, where the preset mapping relationship is the mapping relationship between the head and neck movements and the game character behavior.

[0137] In some optional implementations, the target player identification module 1001 includes:

[0138] The image preprocessing unit is used to adjust the size of the original image to a preset size and normalize the grayscale value of the original image to obtain a standard image.

[0139] The confidence calculation unit is used to perform face recognition on the standard image, determine at least one face image, and calculate the confidence of at least one face image.

[0140] The confidence comparison unit is used to compare the confidence of at least one face image and take the face image with the highest confidence as the target player face image.

[0141] In some optional implementations, the head and neck motion determination module 1002 includes:

[0142] The coordinate system establishing unit is used to establish a plane rectangular coordinate system according to the original image, with the original image from left to right as the horizontal coordinate direction and from bottom to top as the vertical coordinate direction.

[0143] The preset key point position determination unit is used to obtain the coordinates of multiple preset key points in a plane rectangular coordinate system as corresponding preset key point positions.

[0144] The first head and neck motion determining unit is used to determine that when the ordinate of the nose tip is greater than the ordinate of the left tragus point, and the ordinate of the nose tip is greater than the ordinate of the right tragus point, the head and neck motion of the target player is neck tilting back.

[0145] The second head and neck motion determining unit is used for determining that when the horizontal coordinate of the nose tip is smaller than the horizontal coordinate of the left tragus point, the head and neck motion of the target player is that the neck rotates to the left.

[0146] The third head and neck motion determination unit is used for determining that when the horizontal coordinate of the nose tip is greater than the horizontal coordinate of the right tragus point, the head and neck motion of the target player is that the neck rotates to the right.

[0147] The fourth head and neck action determination unit is used to determine that when the ordinate of the left tragus point is greater than the ordinate of the left eye, the ordinate of the left eye is greater than the ordinate of the right eye, and the ordinate of the right eye is greater than the ordinate of the right tragus point, the head and neck action of the target player is that the neck stretches to the right.

[0148] The fifth head and neck action determination unit is used to determine that when the ordinate of the right tragus point is greater than the ordinate of the right eye, the ordinate of the right eye is greater than the ordinate of the left eye, and the ordinate of the left eye is greater than the ordinate of the left tragus point, the head and neck action of the target player is that the neck stretches to the left.

[0149] In some optional implementations, the character behavior control module 1003 includes:

[0150] The first character behavior control unit is used to control the game character to jump and accelerate when the head and neck action is to tilt the neck backward.

[0151] The second character behavior control unit is used to control the game character to turn left or right and change the facial orientation to the left or right when the head and neck movement is the neck rotating left or right.

[0152] The third character behavior control unit is used to control the game character to move left or right when the head and neck action is the neck stretching to the left or right.

[0153] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0154] The device for controlling the behavior of a game character through head and neck movements in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0155] The embodiment of the present invention also provides a computer device having the above Fig.10 The device shown controls the behavior of a game character through head and neck movements.

[0156] See also Fig.11 , Fig.11 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.11 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.11 A processor 10 is taken as an example.

[0157] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0158] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0159] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0160] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0161] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0162] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0163] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for controlling the behavior of a game character through head and neck movements, characterized in that: The method comprises: Continuously capture original images, and pre-process the original images to determine the face image of the target player in the original images; Acquire multiple preset key point positions in the target player's face image, and determine the head and neck movement of the target player according to the relationship between the multiple preset key point positions; The behavior of the game character is controlled according to the head and neck movements of the target player and a preset mapping relationship, wherein the preset mapping relationship is a mapping relationship between the head and neck movements and the behavior of the game character.

2. The method according to claim 1, characterized in that Preprocess the original image to determine the target player's face image in the original image, including: The size of the original image is adjusted to a preset size, and the grayscale value of the original image is normalized to obtain a standard image; Performing face recognition on the standard image, determining at least one face image, and calculating the confidence of at least one face image; Compare the confidences of the at least one facial image, and take the facial image with the highest confidence as the target player facial image.

3. The method according to claim 1, characterized in that Preprocessing the original image to determine the target player's face image in the original image also includes: The size of the original image is adjusted to a preset size, and the grayscale value of the original image is normalized to obtain a standard image; Performing face recognition on the standard image to determine the face image, and calculating the similarity between the face image and a preset target player image; When the similarity between the facial image and the preset target player image is not less than a preset similarity threshold, the corresponding facial image is used as the target player facial image.

4. The method according to claim 1, characterized in that: The preset key points include: left eye, right eye, nose tip, mouth, left tragus point, right tragus point; The head and neck movements include: neck tilting back, neck rotation left and right, and neck stretching left and right; Get the locations of multiple preset key points in the target player's face image, including: According to the original image, a plane rectangular coordinate system is established with the original image from left to right as the horizontal coordinate direction and from bottom to top as the vertical coordinate direction; The coordinates of a plurality of preset key points in the plane rectangular coordinate system are obtained as corresponding preset key point positions.

5. The method according to claim 4, characterized in that Determining the head and neck movement of the target player according to the relationship between the positions of the plurality of preset key points includes: When the vertical coordinate of the nose tip is greater than the vertical coordinate of the left tragus point, and the vertical coordinate of the nose tip is greater than the vertical coordinate of the right tragus point, the target player's head and neck movement is neck tilt; When the horizontal coordinate of the nose tip is smaller than the horizontal coordinate of the left tragus point, the target player's head and neck movement is a left rotation of the neck; When the horizontal coordinate of the nose tip is greater than the horizontal coordinate of the right tragus point, the target player's head and neck movement is a rightward rotation of the neck; When the ordinate of the left tragus point is greater than the ordinate of the left eye, the ordinate of the left eye is greater than the ordinate of the right eye, and the ordinate of the right eye is greater than the ordinate of the right tragus point, the target player's head and neck movement is that the neck stretches to the right; When the ordinate of the right tragus point is greater than the ordinate of the right eye, the ordinate of the right eye is greater than the ordinate of the left eye, and the ordinate of the left eye is greater than the ordinate of the left tragus point, the head and neck movement of the target player is that the neck stretches to the left.

6. The method according to claim 1, characterized in that The preset mapping relationship includes: neck backward corresponds to jumping acceleration, neck rotation corresponds to changing facial orientation, and neck stretching corresponds to moving direction; Control the behavior of the game character based on the target player's head and neck movements and preset mapping relationships, including: When the head and neck movement is to tilt the neck backward, control the game character to jump and accelerate; When the head and neck movement is the neck rotating to the left or right, control the game character to turn left or right, and change the face direction to the left or right; When the head and neck movement is that the neck stretches to the left or right, the game character is controlled to move left or right.

7. The method according to claim 1, characterized in that The method further comprises: Perform health analysis based on the head and neck movements of the target player to obtain health monitoring data of the target player; Head and neck movement suggestions for the target player are generated based on the health monitoring data and displayed.

8. A device for controlling the behavior of a game character through head and neck movements, characterized in that: The device comprises: A target player identification module is used to continuously capture original images, pre-process the original images, and determine the target player's face image in the original images; A head and neck motion determination module, used to obtain a plurality of preset key point positions in the target player's face image, and determine the head and neck motion of the target player based on the relationship between the plurality of preset key point positions; The character behavior control module is used to control the game character behavior according to the head and neck movements of the target player and a preset mapping relationship, wherein the preset mapping relationship is a mapping relationship between the head and neck movements and the game character behavior.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.