Object interaction method and device, interaction system and storage medium
By obtaining the player's skeletal data in the mobile terminal or host device, identifying actions and realizing interaction, the problem of high price of somatosensory equipment is solved, the cost of interaction is reduced, and the accessibility of interactive games is improved.
Patent Information
- Application Number
- CN202310340739.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2024-09-27
AI Technical Summary
Existing somatosensory equipment is expensive, resulting in high costs for interactive games. Players need to purchase equipment to experience interaction, and there is a lack of effective cost reduction solutions.
By loading interactive applications into mobile terminals or host devices, receiving join operations, obtaining the player's skeletal data, identifying actions, and realizing user interaction without relying on somatosensory devices, reducing interaction costs.
It achieves user interaction based on skeletal data without relying on somatosensory devices, reduces interaction costs, and improves the accessibility of interactive games.
Smart Images

Figure CN118698116A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, interactive system and storage medium for object interaction. Background Art
[0002] With the vigorous development of human-computer interaction technology, somatosensory devices have been widely used in shopping malls, entertainment, medical and other fields. Somatosensory devices break through the traditional game mode. When the player makes an action, the somatosensory device will process the action and reflect it in the game. Therefore, the player can play the game without holding the somatosensory device.
[0003] At present, common somatosensory devices include Kinect, Psmove, Wii, etc. Take Kinect as an example. Kinect is a 3D somatosensory camera. At the same time, it introduces functions such as real-time dynamic capture, image recognition, microphone input, voice recognition, and social interaction. Players can interact with other players in the game through this technology.
[0004] The inventors have found that the current solution has at least the following problems: players need to purchase a somatosensory device in advance to experience the interaction. However, since the price of the somatosensory device is often relatively high, the cost of the interactive game is relatively high. No effective solution has been proposed for the above problems. Summary of the invention
[0005] The embodiments of the present application provide a method, device, interactive system and storage medium for object interaction, which can realize interaction between users based on the collected skeleton data of each player without relying on somatosensory equipment, thereby reducing the interaction cost.
[0006] In view of this, the present application provides, on one hand, a method for object interaction, comprising:
[0007] In a case where an interactive application is loaded in a first device, a join operation for a target virtual room is received, wherein the first device is a mobile terminal or a host device, the join operation is used to instruct a first object to enter the target virtual room, the target virtual room is a virtual room created for the interactive application, the mobile terminal has a built-in camera device, and the host device has a communication connection relationship with the camera device;
[0008] In response to the adding operation, when at least the first object and the second object have been added to the target virtual room, the skeleton data of the first object is acquired through the first camera device, wherein the skeleton data includes the position data of each skeleton node;
[0009] Acquire a first action recognition result according to the skeleton data of the first object;
[0010] The application interaction result is displayed, wherein the application interaction result is determined according to the first action recognition result and the second action recognition result, and the second action recognition result is obtained according to the skeleton data of the second object.
[0011] Another aspect of the present application provides an object interaction device, comprising:
[0012] a receiving module, configured to receive a join operation for a target virtual room when an interactive application is loaded in a first device, wherein the first device is a mobile terminal or a host device, the join operation is used to instruct the first object to enter the target virtual room, the target virtual room is a virtual room created for the interactive application, the mobile terminal has a built-in camera device, and the host device has a communication connection relationship with the camera device;
[0013] an acquisition module, configured to, in response to a join operation, acquire skeleton data of the first object through a first camera device when at least the first object and the second object have been added to the target virtual room, wherein the skeleton data includes position data of each skeleton node;
[0014] The acquisition module is further used to acquire a first action recognition result according to the skeleton data of the first object;
[0015] The display module is used to display the application interaction result, wherein the application interaction result is determined according to the first action recognition result and the second action recognition result, and the second action recognition result is obtained according to the skeleton data of the second object.
[0016] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0017] An acquisition module, specifically used to acquire the skeleton data of the first object through a first camera device externally connected to the first device when the first device belongs to the host device;
[0018] A display module, specifically used to display the application interaction result through a screen device externally connected to the first device;
[0019] The first device is a terminal used by the first object to enter the target virtual room;
[0020] The skeleton data of the second object is acquired by a second camera device externally connected to the second device when the second device belongs to a host device. The second device is a terminal used by the second object to enter the target virtual room.
[0021] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0022] An acquisition module, specifically used to acquire the skeleton data of the first object through a first camera device built into the first device when the first device is a mobile terminal;
[0023] The first device is a terminal used by the first object to enter the target virtual room;
[0024] The skeleton data of the second object is acquired by a second camera device built into the second device when the second device is a mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
[0025] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0026] An acquisition module, specifically used to acquire the skeleton data of the first object through a first camera device externally connected to the first device when the first device belongs to the host device;
[0027] A display module, specifically used to display the application interaction result through a screen device externally connected to the first device;
[0028] The first device is a terminal used by the first object to enter the target virtual room;
[0029] The skeleton data of the second object is acquired by a second camera device built into the second device when the second device is a mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
[0030] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0031] The acquisition module is further used to acquire the skeleton data of the second object through a first camera device externally connected to the first device, or acquire the skeleton data of the second object through a first camera device built into the first device before displaying the application interaction result;
[0032] The acquisition module is also used to acquire a second action recognition result according to the skeleton data of the second object.
[0033] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first action recognition result includes a first action type;
[0034] An acquisition module, specifically used to send the skeleton data of the first object to the server, so that the server acquires the first action type through a posture recognition model based on the skeleton data of the first object;
[0035] The receiving module is also used to receive the application interaction result sent by the server before displaying the application interaction result, wherein the application interaction result is determined by the server based on the first action recognition result and the second action recognition result, and the second action recognition result includes a second action type.
[0036] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first action recognition result includes a first action type;
[0037] The object interaction device also includes a determination module and a sending module;
[0038] An acquisition module, specifically configured to acquire a first action type through a posture recognition model based on the skeleton data of the first object;
[0039] The receiving module is further used to receive a second action type from a second device before displaying the application interaction result, wherein the second device is a terminal used by the second object to enter the target virtual room;
[0040] The determination module is used to determine the application interaction result according to the first action recognition result and the second action recognition result, wherein the second action recognition result includes the second action type.
[0041] In one possible design, in another implementation of another aspect of the embodiment of the present application, the object interaction device further includes a training module;
[0042] The acquisition module is further used to acquire a training skeleton data set, wherein the training skeleton data set includes K groups of skeleton data samples, each group of skeleton data samples includes position data corresponding to T skeleton nodes, and each group of skeleton data samples corresponds to an action type label, K is an integer greater than or equal to 1, and T is an integer greater than 1;
[0043] The acquisition module is further used to acquire K category feature vectors based on each group of skeleton data samples through the posture recognition model to be trained, wherein each category feature vector corresponds to a group of skeleton data samples;
[0044] The training module is used to update the model parameters of the posture recognition model to be trained according to the action type label and category feature vector corresponding to each group of skeleton data samples until the model training conditions are met to obtain the posture recognition model.
[0045] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0046] The acquisition module is specifically used to call the camera device to collect the video stream of the target object within the collection time in response to the selection operation for any action type label, wherein the video stream includes M video frames, and M is an integer greater than 1;
[0047] Extract a video frame from the video stream as a target video frame;
[0048] T skeleton nodes in the target video frame are identified to obtain a set of skeleton data samples for action type labels.
[0049] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0050] The acquisition module is specifically used to call the camera device to collect the video stream of the target object within the collection time in response to the selection operation for any action type label, wherein the video stream includes M video frames, and M is an integer greater than 1;
[0051] For each video frame in the video stream, T skeleton nodes in the video frame are identified to obtain T position data to be processed, wherein each position data to be processed corresponds to a skeleton node;
[0052] For each of the T skeleton nodes, the M position data to be processed are averaged to obtain the position data corresponding to the skeleton node, wherein each position data to be processed comes from a video frame;
[0053] According to the position data corresponding to each bone node, a group of bone data samples for the action type label is obtained.
[0054] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first action recognition result includes a first action type, and the second action recognition result includes a second action type;
[0055] The determination module is further configured to, before displaying the application interaction result, if the first action type is different from the second action type and the priority of the first action type is higher than the priority of the second action type, determine that the application interaction result is used to indicate that the first object wins the game;
[0056] The determination module is further configured to, before displaying the application interaction result, if the first action type is different from the second action type and the priority of the first action type is lower than the priority of the second action type, determine that the application interaction result is used to indicate that the second object wins the game;
[0057] The determination module is further configured to, before displaying the application interaction result, if the first action type is the same as the second action type, determine that the application interaction result is used to indicate that the first object and the second object have reached a game draw.
[0058] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time;
[0059] The determination module is further used to determine the first action score corresponding to the first object according to the first action time and the preset action time before displaying the application interaction result if the first action type matches the preset action type successfully;
[0060] The determination module is further configured to generate a first total score according to the P action scores corresponding to the first object when the interactive application ends, wherein the P action scores corresponding to the first object include the first action score, and P is an integer greater than or equal to 1;
[0061] The determination module is further used to determine that the application interaction result is used to indicate that the first object wins the game if the first total score is greater than the second total score;
[0062] The determination module is further used to determine that the application interaction result is used to indicate that the second object wins the game if the first total score is less than the second total score;
[0063] The determination module is further configured to determine that the application interaction result is used to indicate that the first object and the second object have reached a game draw if the first total score is equal to the second total score;
[0064] Among them, the second total score is generated when the game is over according to the P action scores corresponding to the second object, and the P action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
[0065] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0066] A determination module is specifically used to perform a difference processing between the first action time and the preset action time and then take an absolute value to obtain a time difference;
[0067] A first action score corresponding to the first object is generated according to the time difference, wherein the time difference is negatively correlated with the first action score.
[0068] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first action recognition result includes a first action type and a first action amplitude, and the second action recognition result includes a second action type and a second action amplitude;
[0069] The determination module is further used to determine the first action score corresponding to the first object according to the first action amplitude before displaying the application interaction result if the first action type successfully matches the preset action type;
[0070] The determination module is further configured to generate a first total score according to the X action scores corresponding to the first object when the interactive application ends, wherein the X action scores corresponding to the first object include the first action score, and X is an integer greater than or equal to 1;
[0071] The determination module is further used to determine that the application interaction result is used to indicate that the first object wins the game if the first total score is greater than the second total score;
[0072] The determination module is further used to determine that the application interaction result is used to indicate that the second object wins the game if the first total score is less than the second total score;
[0073] The determination module is further configured to determine that the application interaction result is used to indicate that the first object and the second object have reached a game draw if the first total score is equal to the second total score;
[0074] The second total score is generated according to the X action scores corresponding to the second object when the game is over, and the X action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action amplitude when the second action type successfully matches the preset action type.
[0075] In one possible design, in another implementation of another aspect of the embodiment of the present application, the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time;
[0076] The determination module is further used to determine the first action score corresponding to the first object according to the first action time and the preset action time before displaying the application interaction result if the first action type matches the preset action type successfully;
[0077] The determination module is further configured to generate a first total score according to the Q action scores corresponding to the first object when the interactive application ends, wherein the Q action scores corresponding to the first object include the first action score, and Q is an integer greater than or equal to 1;
[0078] The determination module is further used to generate a target total score according to the first total score and the second total score;
[0079] The determination module is further used to determine that the application interaction result is used to indicate that both the first object and the second object have won the game if the target total score is greater than or equal to the preset total score;
[0080] The determination module is further used to determine that the application interaction result is used to indicate that neither the first object nor the second object has won the game if the target total score is less than the preset total score;
[0081] Among them, the second total score is generated when the game is over according to the Q action scores corresponding to the second object, and the Q action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
[0082] On the other hand, the present application provides an interactive system, including: a host device, a screen device, a camera device, and a bus system;
[0083] Wherein, the camera device is used to collect video streams;
[0084] The screen device is used to display the screen data output by the host device;
[0085] A host device is used to implement the above-mentioned methods;
[0086] The bus system is used to connect the host device, the screen device and the camera device so that the host device, the screen device and the camera device can communicate.
[0087] On the other hand, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned methods when executing the computer program.
[0088] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned methods are implemented.
[0089] Another aspect of the present application provides a computer program product, including a computer program, which implements the above-mentioned methods when executed by a processor.
[0090] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0091] In an embodiment of the present application, a method for object interaction is provided. That is, when an interactive application is loaded in a first device, a joining operation for a target virtual room is received, and then, in response to the joining operation, when at least the first object and the second object have been added to the target virtual room, the skeleton data of the first object is obtained through a first camera device. Based on this, a first action recognition result is obtained according to the skeleton data of the first object. Finally, the application interaction result is displayed, and the application interaction result is determined according to the first action recognition result and the second action recognition result of the second object. In the above manner, if the player uses a mobile terminal, the camera device provided by the mobile terminal can be directly used to collect the skeleton data. If the player has a host device, only an external camera device is needed to collect the skeleton data. Based on this, the method proposed in the present application can realize interaction between users based on the skeleton data of each player collected without relying on a somatosensory device, thereby reducing the interaction cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 A schematic diagram of an implementation environment of the object interaction method in the embodiment of the present application;
[0093] Figure 2 A schematic diagram of the structure of the interactive system in the embodiment of the present application;
[0094] Figure 3 A schematic diagram of a flow chart of an object interaction method in an embodiment of the present application;
[0095] Figure 4 A schematic diagram of interaction based on an offline mode in an embodiment of the present application;
[0096] Figure 5 A schematic diagram of interaction based on an online mode in an embodiment of the present application;
[0097] Figure 6 A schematic diagram of interaction based on offline mode and online mode in an embodiment of the present application;
[0098] Figure 7 A schematic diagram of multi-person interaction based on the same mode in an embodiment of the present application;
[0099] Figure 8 A schematic diagram of a process of model training and model prediction in an embodiment of the present application;
[0100] Fig. 9 A schematic diagram of a model training interface in an embodiment of the present application;
[0101] Fig.10 A schematic diagram of a skeleton data sample in an embodiment of the present application;
[0102] Fig.11 This is a schematic diagram of the relevant interface of the game application in the embodiment of this application;
[0103] Fig.12 A schematic diagram of implementing interaction based on a confrontation game in an embodiment of the present application;
[0104] Fig.13 A schematic diagram of implementing interaction based on action games in an embodiment of the present application;
[0105] Fig.14 This is another schematic diagram of implementing interaction based on action games in an embodiment of the present application;
[0106] Fig.15 A schematic diagram of an object interaction device in an embodiment of the present application;
[0107] Fig.16 It is a structural diagram of a terminal in an embodiment of the present application. DETAILED DESCRIPTION
[0108] The embodiments of the present application provide a method, device, interactive system and storage medium for object interaction, which can realize interaction between users based on the collected skeleton data of each player without relying on somatosensory equipment, thereby reducing the interaction cost.
[0109] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0110] Somatosensory interactive applications are more widely used in the construction of exhibition halls, abandoning the previous keyboard, mouse, handle and other equipment, and only performing corresponding actions through body movements, which is very convenient. The operation of somatosensory interactive technology allows users to enter the sensor area of the camera at any time to play games, increasing the user's experience and immersion. High-resolution image quality and dynamic music can also reflect the advantages of somatosensory applications. It perfectly combines hardware equipment and software technology to enhance the user's experience and fun.
[0111] Considering that the somatosensory device is not only expensive but also inconvenient to carry. Therefore, the present application provides a method for object interaction, which can play somatosensory games without relying on somatosensory devices. The object interaction method provided by the present application includes at least one of the following scenarios when applied.
[0112] (1) Interactive applications are online conference applications;
[0113] After entering the virtual conference room, users can trigger specific actions instead of using the keyboard and mouse to perform specific operations. For example, raising the left hand means turning a page forward. Another example is raising the right hand means turning a page backward.
[0114] Assume that during a meeting, two users need to demonstrate the process of lifting a heavy object. For example, user A makes a gesture, which is recognized as a first action type (e.g., raising the left hand). User B makes a gesture, which is recognized as a second action type (e.g., raising the right hand). If the application interaction result is determined to be lifting a heavy object based on the first action type and the second action type, the corresponding animation effect is displayed.
[0115] (2) The interactive application is a game application;
[0116] For example, taking the somatosensory catching game as an example, after the player enters the somatosensory catching game, he / she makes corresponding actions according to the text prompts in the game interface. Game materials (for example, virtual bombs, virtual gift bags, etc.) will fall on the screen device, and the player moves both hands to catch them. When the player receives a virtual bomb, points will be deducted, and when the player receives a virtual gift bag, points will be added. When the game time is over, the score interface will appear, and the score can be saved.
[0117] For example, taking the somatosensory racing car as an example, after the player enters the somatosensory object game, he will give corresponding feedback according to the changes in the virtual road in the game interface. For example, the player raises his right hand to start the game, controls acceleration through body movements such as jumping, and controls deceleration through body movements such as squatting. Both hands hold the steering wheel to control the steering. Turning left means turning left, and turning right means turning right. Players can collect virtual coins during driving.
[0118] It should be noted that the above application scenarios are only examples, and the object interaction method provided in this embodiment can also be applied to other scenarios, which are not limited here.
[0119] The method provided in this application can be applied to Figure 1The implementation environment shown includes a first device 110 and a second device 120, wherein the first device 110 may be a mobile terminal or a host device, and the second device 120 may be a mobile terminal or a host device. The first device 110 and the second device 120 may communicate via a communication network 130. The communication network 130 uses standard communication technology and / or protocols, typically the Internet, but may also be any network, including but not limited to Bluetooth, local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, dedicated network, or any combination of virtual private networks). In some embodiments, customized or dedicated data communication technology may be used to replace or supplement the above data communication technology.
[0120] The mobile terminals involved in this application include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Among them, the client is deployed on the mobile terminal, and the client can be run on the mobile terminal in the form of a browser, or in the form of an independent application (application, APP), etc. The implementation environment also includes a server 140. The server 140 involved in this application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence (AI) platforms.
[0121] Exemplarily, in step S1, the first device 110 sends the skeleton data of the first object to the server 140 through the communication network 130. In step S2, the second device 120 sends the skeleton data of the second object to the server 140 through the communication network 130. In step S3, the server 140 obtains the recognition results of each object according to the skeleton data of each object. In step S4, the application interaction result is generated in combination with the recognition results of each object. In step S5, the server 140 sends the application interaction result to the first device 110 through the communication network 130. In step S6, the server 140 sends the application interaction result to the second device 120 through the communication network 130.
[0122] Exemplarily, in step S1, the first device 110 obtains a first action recognition result after recognizing the skeleton data of the first object, and then sends the first recognition result to the server 140 through the communication network 130. In step S2, the second device obtains a second action recognition result after recognizing the skeleton data of the second object, and then the second device 120 sends the second recognition result to the server 140 through the communication network 130. In step S3, the server 140 obtains the recognition results of each object. In step S4, an application interaction result is generated in combination with the recognition results of each object. In step S5, the server 140 sends the application interaction result to the first device 110 through the communication network 130. In step S6, the server 140 sends the application interaction result to the second device 120 through the communication network 130.
[0123] Exemplarily, in step S1, the first device 110 obtains a first action recognition result after recognizing the skeleton data of the first object, and then sends the first recognition result to the second device 120 through the communication network 130. In step S2, the second device obtains a second action recognition result after recognizing the skeleton data of the second object, and then the second device 120 sends the second recognition result to the first device 110 through the communication network 130. In step S3, the first device 110 generates an application interaction result based on the first recognition result and the second recognition result. In step S4, the second device 120 generates an application interaction result based on the first recognition result and the second recognition result.
[0124] Furthermore, the first device 110 and the second device 120 may also be host devices. Figure 2 , Figure 2 This is a structural diagram of an interactive system in an embodiment of the present application. As shown in the figure, the interactive system includes a screen device A1, a host device A2, and a camera device A3. Among them, the screen device A1 and the host device A2 can be connected in a wired or wireless manner. The camera device A3 and the host device A2 can also be connected in a wired or wireless manner. The camera device A3 is used to capture video streams. The screen device A1 is used to display the picture data output by the host device A2. The host device A2 is used to process the data.
[0125] Since this application involves some terms related to professional fields, they will be explained below for ease of understanding.
[0126] (1) Dual mode: refers to online mode and offline mode.
[0127] (2) Online mode: This means that users do not need to go to the event site to set up interactive competitions (player killing, PK). They can use mobile terminals, or any device that can browse the web and has a camera to browse the web and participate in interactive PK.
[0128] (3) Offline mode: refers to setting up an interactive PK event site (for example, an interactive system in an e-sports hotel lobby, hotel room, or other offline scenarios). The interactive system includes a host device, a screen device, and a camera device.
[0129] (4) Posture Detection Network (PoseNet): It is a model for detecting the posture of an object developed using Tensoflow.js. It can be used to detect the posture of a single object or multiple objects. One version of the algorithm can detect a single person in an image or video, while another version of the algorithm can detect multiple people in a video or image. The posture recognition model involved in this application can use PoseNet, in which this application describes how to configure the environment required for the model to run, and use the open source PoseNet model on the hosting platform (Github) to achieve local operation.
[0130] (5) ml5.js: is a library based on TensorFlow.js and p5.js. p5.js encapsulates the camera device, so the camera device can be accessed in the browser. ml5.js is based on TensorFlow.js and provides access to machine learning algorithms and models in the browser through simple syntax. Due to the simplicity of ml5.js, it is very suitable for building prototypes quickly in the browser.
[0131] (6) Tensorflow: It is a symbolic mathematical system based on dataflow programming and is widely used in the programming implementation of various machine learning algorithms. Tensorflow has a multi-level structure and can be deployed on various servers, terminals and web pages, and supports high-performance numerical computing on graphics processing units (GPUs) and tensor processing units (TPUs).
[0132] Combined with the above introduction, the following will introduce the method of object interaction in this application, please refer to Figure 3 In the embodiment of the present application, the object interaction method can be completed independently by the terminal, independently by the server, or in cooperation between the terminal and the server. The method of the present application includes:
[0133] 210. When an interactive application is loaded in a first device, a joining operation for a target virtual room is received, wherein the first device is a mobile terminal or a host device, the joining operation is used to instruct the first object to enter the target virtual room, the target virtual room is a virtual room created for the interactive application, the mobile terminal has a built-in camera device, and the host device has a communication connection relationship with the camera device;
[0134] In one or more embodiments, an interactive application is loaded in the first device, wherein the interactive application may be a web application (e.g., a web game) running in a browser, or an application running in the first device in the form of an APP. The interactive application supports opening a virtual room, based on which the first terminal may receive a user (e.g., the first object)'s joining operation for the target virtual room.
[0135] It should be noted that the first device is a mobile terminal or a host device. The mobile terminal can be a mobile phone, a computer, a tablet computer, etc., wherein the mobile terminal has a built-in camera device and does not require an external screen device. The host device requires an external camera device and a screen device to realize data input and output.
[0136] 220. In response to the adding operation, when at least the first object and the second object have been added to the target virtual room, acquiring skeleton data of the first object through the first camera device, wherein the skeleton data includes position data of each skeleton node;
[0137] In one or more embodiments, in an interactive application, at least two objects are required to interact. Based on this, in response to a join operation triggered by a user (e.g., a first object), the target virtual room is joined. In one case, if there are other users (e.g., a second object) in the target virtual room at this time, the interactive application can be run in the target virtual room. In another case, if there are no other users (i.e., other objects) in the target virtual room at this time, the user (e.g., the first object) is in a waiting state.
[0138] Specifically, when at least two users (e.g., the first object and the second object) are added to the target virtual room, the interactive application is started to run. Thus, a video stream is first captured by a first camera, and then, at least one video frame including the user's (e.g., the first object) gesture is extracted from the video stream. Next, a gesture recognition model is called to perform gesture recognition on each video frame to obtain the skeleton nodes (i.e., key points) of the first object in each video frame. Finally, based on the position data of each skeleton node in each video frame, the skeleton data of the first object in each video frame is generated.
[0139] It is understandable that, for the sake of ease of explanation, this application is introduced by taking the skeleton data of the first object obtained based on a video frame as an example. In practical applications, the skeleton data extracted from each video frame can be processed similarly, which will not be described in detail here. If there is no user or only a small part of the user appears in the video frame, the skeleton data will not be identified in the video frame.
[0140] It should be noted that the term "in response to" in this application is used to indicate the conditions or states on which the execution of an operation depends, and one or more operations can be executed when certain conditions or states are met. These operations can be real-time or have a certain delay.
[0141] 230. Obtain a first action recognition result according to the skeleton data of the first object;
[0142] In one or more embodiments, after obtaining the skeleton data of the first object, action recognition can be performed through the position data of each skeleton node to obtain a first action recognition result, wherein the first action recognition result includes but is not limited to the first action type, for example, raising both hands.
[0143] 240. Display an application interaction result, wherein the application interaction result is determined according to the first motion recognition result and the second motion recognition result, and the second motion recognition result is obtained according to the skeleton data of the second object.
[0144] In one or more embodiments, the skeletal data of the second object is obtained by the camera device, thereby obtaining the second action recognition result according to the skeletal data of the second object. Then, the application interaction result of the interactive application can be determined by combining the first action recognition result of the first object and the second action recognition result of the second object, and the application interaction result can be displayed.
[0145] It should be noted that this application is introduced by taking the target virtual room including the first object and the second object as an example. In actual applications, the target virtual room may also include more other objects, for example, the third object. Based on this, when determining the application interaction result, it is also necessary to combine the action recognition results of other objects (for example, the third object), which is not limited here.
[0146] In an embodiment of the present application, a method for object interaction is provided. In the above manner, if a user uses a mobile terminal, the camera device provided by the mobile terminal can be directly used to collect skeletal data. If the user has a host device, only an external camera device is required to collect skeletal data. Based on this, the method proposed in the present application can realize interaction between users based on the collected skeletal data of each user without relying on a somatosensory device, thereby reducing the cost of interaction.
[0147] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining the skeleton data of the first object by using the first camera device may specifically include:
[0148] In the case where the first device is a host device, acquiring the skeleton data of the first object through a first camera device externally connected to the first device;
[0149] Display application interaction results, which can include:
[0150] Displaying the application interaction result through a screen device externally connected to the first device;
[0151] The first device is a terminal used by the first object to enter the target virtual room;
[0152] The skeleton data of the second object is acquired by a second camera device externally connected to the second device when the second device belongs to a host device. The second device is a terminal used by the second object to enter the target virtual room.
[0153] In one or more embodiments, a method of interacting based on an offline mode is introduced. As can be seen from the aforementioned embodiments, assuming that each object in the target virtual room adopts an offline mode, offline interaction can be performed based on an interactive system. The interactive system includes a screen device, a host device, and a camera device. The following is an example in which the target virtual room includes a first object and a second object.
[0154] Specifically, for ease of understanding, see Figure 4 , Figure 4 This is a schematic diagram of interaction based on the offline mode in an embodiment of the present application. As shown in the figure, "User 1" is used as the first object and "User 2" is used as the second object as an example. It can be understood that in addition to "User 1" and "User 2", there can also be other users (for example, User K), and this is just an illustration. Assume that an event site is set up in Beijing, and the event site uses interactive system A, wherein interactive system A includes a first device, a first camera device externally connected to the first device, and a screen device. Assume that another event site is set up in Shanghai, and the event site uses interactive system B, wherein interactive system B includes a second device, a second camera device externally connected to the second device, and a screen device.
[0155] Based on this, when the first object and the second object start an interactive application in the target virtual room, the first camera device can be called to obtain the skeleton data of the first object, and the second camera device can be called to obtain the skeleton data of the second object. Thus, the first action recognition result is generated in combination with the skeleton data of the first object, and the second action recognition result is generated in combination with the skeleton data of the second object. Then, the application interaction result of the interactive application is generated based on the first action recognition result and the second action recognition result. Finally, the application interaction results are displayed respectively through the screen device externally connected to the first device and the screen device externally connected to the second device.
[0156] It should be noted that the types of communication networks are as described above and will not be described in detail here. If the interactive application is a web application, it is necessary to access the relevant web page through the communication network.
[0157] Secondly, in the embodiment of the present application, a method of interaction based on an offline mode is provided. Through the above method, interactive activity sites are pre-built at different locations (for example, e-sports hotel lobby, hotel room, etc.), and then the interactive system provided at the activity site is combined to realize online interaction at different locations. Thus, without relying on somatosensory equipment, users can interact based on offline modes, thereby reducing the cost of setting up activities, which is conducive to attracting more users to participate in activities and increasing activity.
[0158] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining the skeleton data of the first object by using the first camera device may specifically include:
[0159] In the case where the first device is a mobile terminal, acquiring the skeleton data of the first object by using a first camera device built into the first device;
[0160] The first device is a terminal used by the first object to enter the target virtual room;
[0161] The skeleton data of the second object is acquired by a second camera device built into the second device when the second device is a mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
[0162] In one or more embodiments, a method of interacting based on an online mode is introduced. As can be seen from the above embodiments, assuming that each object in the target virtual room adopts an online mode, online interaction can be performed based on a mobile terminal. The mobile terminal can be a mobile phone, a tablet computer, a computer with a camera device, etc. The following is an example in which the target virtual room includes a first object and a second object.
[0163] Specifically, for ease of understanding, see Figure 5 , Figure 5 This is a schematic diagram of interaction based on an online mode in an embodiment of the present application. As shown in the figure, "User 1" is the first object and "User 2" is the second object as an example. It can be understood that in addition to "User 1" and "User 2", there can also be other users (for example, User K), which is only a schematic diagram. The first object uses a first device, wherein the first device has a built-in first camera. The second object uses a second device, wherein the second device has a built-in second camera.
[0164] Based on this, when the first object and the second object start an interactive application in the target virtual room, the first camera device can be called to obtain the skeleton data of the first object, and the second camera device can be called to obtain the skeleton data of the second object. Thus, the first action recognition result is generated in combination with the skeleton data of the first object, and the second action recognition result is generated in combination with the skeleton data of the second object. Then, the application interaction result of the interactive application is generated based on the first action recognition result and the second action recognition result. Finally, the application interaction result is displayed by the first device and the second device respectively.
[0165] It should be noted that the types of communication networks are as described above and will not be described in detail here. If the interactive application is a web application, it is necessary to access the relevant web page through the communication network.
[0166] Secondly, in the embodiment of the present application, a method of interaction based on an online mode is provided. Through the above method, users can use their own mobile terminals, or devices that can browse web pages and have cameras to participate in the interaction. Thus, without relying on somatosensory devices, users can interact based on the online mode, thereby reducing the interaction cost, which is conducive to attracting more users to participate in the activities and increasing the activity.
[0167] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining the skeleton data of the first object by using the first camera device may specifically include:
[0168] In the case where the first device is a host device, acquiring the skeleton data of the first object through a first camera device externally connected to the first device;
[0169] Display application interaction results, which can include:
[0170] Displaying the application interaction result through a screen device externally connected to the first device;
[0171] The first device is a terminal used by the first object to enter the target virtual room;
[0172] The skeleton data of the second object is acquired by a second camera device built into the second device when the second device is a mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
[0173] In one or more embodiments, a method for interaction based on offline mode and online mode is introduced. As can be seen from the above embodiments, assuming that some objects in the target virtual room are in offline mode and some objects are in online mode. Then offline and online interaction can be performed based on the interactive system and the mobile terminal. The following is an example of the target virtual room including the first object and the second object.
[0174] Specifically, for ease of understanding, see Figure 6 , Figure 6 This is a schematic diagram of interaction based on offline mode and online mode in an embodiment of the present application. As shown in the figure, "User 1" is used as the first object and "User 2" is used as the second object as an example. It can be understood that in addition to "User 1" and "User 2", there can also be other users (for example, User K), and this is just an illustration. Suppose an event site is set up in Beijing, and the event site uses an interactive system A, wherein the interactive system A includes a first device, a first camera device externally connected to the first device, and a screen device. The second object uses a second device, wherein the second device has a built-in second camera device.
[0175] Based on this, when the first object and the second object start an interactive application in the target virtual room, the first camera device can be called to obtain the skeleton data of the first object, and the second camera device can be called to obtain the skeleton data of the second object. Thus, the first action recognition result is generated in combination with the skeleton data of the first object, and the second action recognition result is generated in combination with the skeleton data of the second object. Then, the application interaction result of the interactive application is generated based on the first action recognition result and the second action recognition result. Finally, the application interaction results are displayed respectively through the screen device externally connected to the first device and the second device.
[0176] Secondly, in the embodiment of the present application, a method of interaction based on offline mode and online mode is provided. Through the above method, users can use their own mobile terminals, or devices that can browse web pages and have cameras, to interact with users who use the interactive system at the event site. Thus, without relying on somatosensory devices, users can interact based on online mode and offline mode, thereby reducing the cost of interaction, which is conducive to attracting more users to participate in the event and increasing activity.
[0177] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, before displaying the application interaction result, the following may also be included:
[0178] Acquire the skeleton data of the second object through a first camera device externally connected to the first device, or acquire the skeleton data of the second object through a first camera device built into the first device;
[0179] A second action recognition result is obtained according to the skeleton data of the second object.
[0180] In one or more embodiments, a method for identifying multiple participating objects is introduced. As can be seen from the above embodiments, if the first object and the second object are in the same real space, the skeleton data of different objects can also be obtained through the same camera device. In order to capture a picture containing multiple objects, a wide-angle camera device can also be used.
[0181] Specifically, for ease of understanding, see Figure 7 , Figure 7 This is a schematic diagram of multi-person interaction based on the same mode in an embodiment of the present application, with "user 1" as the first object and "user 2" as the second object as an example. Figure 7 As shown in Figure (A), when the first device is a host device, the skeleton data of the first object and the skeleton data of the second object can be obtained through a camera device externally connected to the first device (i.e., the first camera device). Based on this, the first action recognition result and the second action recognition result can be obtained respectively. Figure 7 As shown in Figure (A), when the first device is a mobile device, the skeleton data of the first object and the skeleton data of the second object can be obtained through the first camera device built into the first device. Based on this, the first action recognition result and the second action recognition result can be obtained respectively.
[0182] Secondly, in the embodiment of the present application, a method for identifying multiple participating objects is provided. Through the above method, considering that the camera device can capture multiple users at the same time, the action recognition results of multiple users can also be recognized at the same time, so as to facilitate users to interact in the same real space.
[0183] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first action recognition result includes a first action type;
[0184] Acquiring a first action recognition result according to the skeleton data of the first object may specifically include:
[0185] Sending the skeleton data of the first object to the server, so that the server acquires the first action type through a posture recognition model based on the skeleton data of the first object;
[0186] Before displaying the app interaction results, you can also include:
[0187] An application interaction result sent by a server is received, wherein the application interaction result is determined by the server according to a first action recognition result and a second action recognition result, and the second action recognition result includes a second action type.
[0188] In one or more embodiments, a deployment method of a gesture recognition model is introduced. As can be seen from the aforementioned embodiments, the action recognition result includes at least the action type, and the gesture recognition model can be called to identify the action type. Based on this, the following will take the identification of the skeleton data of the first object as an example for introduction. It should be noted that other objects (for example, the second object) can also be identified in a similar manner, which will not be repeated here.
[0189] Specifically, the server downloads the trained gesture recognition model locally. The gesture recognition model is saved locally on the server in the form of a file. Based on this, after the first device obtains the skeleton data of the first object, the skeleton data of the first object is sent to the server. The server calls the gesture recognition model to predict the skeleton data of the first object to obtain a first action type (for example, raising both hands). Similarly, the server can also predict the action types of other objects. Assuming that the target virtual room only includes the first object and the second object, the server can determine the application interaction result based on the first action recognition result and the second action recognition result after predicting the second action type.
[0190] It should be noted that the application interaction result can be the final scoring result of a game, or a certain scoring result in a game, or a specific effect (for example, a fireworks effect), etc., which is not limited here.
[0191] The gesture recognition model file generally includes, but is not limited to, a metadata file (eg, model_meta.json), a model information file (eg, model.json), and a binary weight file (model.weights.bin). These files will be described below.
[0192] (1) Metadata file: This file contains metadata information related to the model. The metadata information includes but is not limited to the size and shape of the input and output data, the architecture of the model (i.e., the network hierarchy), the optimizer and hyperparameters used in the training process, the version information and author information of the model, etc. Metadata information can help users better understand the characteristics and performance of the trained model, and this information will also be used to initialize the model when loading the model using ml5.js. For example, based on the size and shape of the input and output data, ml5.js can create input and output tensors of appropriate sizes. Information such as the model's architecture and hyperparameters can also facilitate better adjustment of the model to suit different application scenarios.
[0193] (2) Model information file: This file contains the model's structure, weights, and other related information. The model information file can be used to load the model, adjust model parameters, and export the model. Loading the model means passing the model information file as a parameter to the loadModel() function of ml5.js, which can load the trained model for prediction or transfer learning. Adjusting model parameters can be done by modifying the parameters in the model information file to adjust the model's structure or training process, for example, modifying the number of layers, number of neurons, loss function, optimizer, etc. Exporting the model can package the model information file together with other related files and publish it to other platforms or applications for others to use or for further training and optimization.
[0194] (3) Binary weight file: This file contains the weight parameters of the trained model. These weight parameters play a key role in using the model for prediction. During prediction, the model uses these weight parameters to map the input data into the output space.
[0195] Secondly, in the embodiment of the present application, a method for deploying a posture recognition model is provided. Through the above method, the posture recognition model is deployed on the server side, and the server calls the model to identify the action type. On the one hand, it can save the computing power of local recognition of the terminal and improve processing efficiency. On the other hand, it can save local storage resources.
[0196] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first action recognition result includes a first action type;
[0197] Acquiring a first action recognition result according to the skeleton data of the first object may specifically include:
[0198] Based on the skeleton data of the first object, obtaining a first action type through a posture recognition model;
[0199] Before displaying the app interaction results, you can also include:
[0200] receiving a second action type from a second device, wherein the second device is a terminal used by a second object to enter a target virtual room;
[0201] An application interaction result is determined according to the first action recognition result and the second action recognition result, wherein the second action recognition result includes a second action type.
[0202] In one or more embodiments, another deployment mode of the gesture recognition model is introduced. As can be seen from the aforementioned embodiments, the action recognition result includes at least the action type, and the gesture recognition model can be called to identify the action type. Based on this, the following will be introduced by taking the recognition of the skeleton data of the first object as an example. It should be noted that other objects (for example, the second object) can also be recognized in a similar manner, which will not be repeated here.
[0203] Specifically, the first device downloads the trained gesture recognition model locally, and the gesture recognition model is saved locally in the first device in the form of a file. Similarly, the second device downloads the trained gesture recognition model locally, and the gesture recognition model is saved locally in the second device in the form of a file. Based on this, after the first device obtains the skeleton data of the first object, the gesture recognition model is called to predict the skeleton data of the first object, thereby obtaining the first action type. Similarly, after the second device obtains the skeleton data of the second object, the gesture recognition model is called to predict the skeleton data of the second object, thereby obtaining the second action type. Assuming that the target virtual room only includes the first object and the second object, the first device receives the second action type from the second device, and the second device receives the first action type from the first device. Therefore, the first device and the second device adopt the same evaluation strategy to determine the application interaction result based on the first action recognition result and the second action recognition result.
[0204] It should be noted that the application interaction result can be the final score result of a game, or a certain score result in a game, or a specific effect (for example, a fireworks effect), etc. It can be understood that the content of the gesture recognition model file can be referred to the aforementioned embodiment, and will not be repeated here.
[0205] Secondly, in the embodiment of the present application, another deployment mode of the gesture recognition model is provided. Through the above method, the gesture recognition model is deployed on the host device or the mobile terminal, and the host device or the mobile terminal calls the model to identify the action type. On the one hand, there is no need to feed back the skeleton data to the server, thereby saving the transmission bandwidth. On the other hand, the efficiency of action recognition can be improved.
[0206] Optionally, in the above Figure 3On the basis of the corresponding embodiments, another optional embodiment provided by the embodiment of the present application may further include:
[0207] Obtain a training skeleton data set, wherein the training skeleton data set includes K groups of skeleton data samples, each group of skeleton data samples includes position data corresponding to T skeleton nodes, and each group of skeleton data samples corresponds to an action type label, K is an integer greater than or equal to 1, and T is an integer greater than 1;
[0208] Based on each group of skeleton data samples, K category feature vectors are obtained through the posture recognition model to be trained, wherein each category feature vector corresponds to a group of skeleton data samples;
[0209] According to the action type label and category feature vector corresponding to each group of skeleton data samples, the model parameters of the posture recognition model to be trained are updated until the model training conditions are met to obtain the posture recognition model.
[0210] In one or more embodiments, a method for training a gesture recognition model is introduced. As can be seen from the aforementioned embodiments, both the prediction and training of the gesture recognition model can be developed using the ml5.js framework, and human body movements are estimated in real time based on the gesture recognition model. Specifically, the neural network function of ml5.js is used. That is, create a neural network and train it in the browser using ml5.NeuroalNetwork. Collect data to train the neural network, or use existing data to train your neural network in real time. Once trained, the neural network can do classification or regression tasks.
[0211] It should be noted that the development framework used in this application is not limited to ml5.js, where ml5.js is based on Tensorflow encapsulation and can also be developed using Tensorflow.js. The posture recognition model involved in this application can use the PoseNet model, or the open posture network (OpenPose), etc., which is not limited here.
[0212] Specifically, for ease of understanding, see Figure 8 , Figure 8 This is a flow chart of model training and model prediction in the embodiment of the present application. As shown in the figure, the process on the left is the model prediction process, and the process on the right is the model training process. The model training process and the model prediction process will be described below.
[0213] During the model training process:
[0214] In step C1 , the camera device is turned on.
[0215] In step C2, the human skeleton data is captured by a camera device to obtain a training skeleton data set, wherein the training skeleton data set includes K groups of skeleton data samples, and each group of skeleton data samples includes position data corresponding to T skeleton nodes. The labeling personnel also need to label each group of skeleton data samples, that is, obtain the action type label of each group of skeleton data samples.
[0216] In step C3, the posture recognition model is trained using K groups of skeleton data samples. That is, each group of skeleton data samples is used as the input of the posture recognition model to be trained, and the posture recognition model to be trained outputs the category feature vector corresponding to each group of skeleton data samples. Thus, K category feature vectors are obtained.
[0217] Assume that three actions are predicted, namely "rock", "scissors" and "paper". Among them, the action type label of a group of skeletal data samples is "rock", that is, its corresponding annotation feature vector is (1,0,0), and its category feature vector output by the posture recognition model to be trained is (0.1,0.8,0.1). Based on this, the classification loss function can be used to calculate the loss value. Combined with the loss result, the model parameters of the posture recognition model to be trained are updated.
[0218] In step C4, until the model training conditions are met, the posture recognition model can be derived. In one case, an exhaustion criterion can be used as a basis for determining whether the model training conditions are met. For example, a threshold of the number of iterations is set. When the number of iterations reaches the threshold of the number of iterations, it means that the model training conditions are met. In another case, an observation criterion can be used as a basis for determining whether the model training conditions are met. For example, when the loss value has converged, it means that the model training conditions are met.
[0219] In step C5, a gesture recognition model file is generated.
[0220] In the model prediction process:
[0221] In step D1 , the camera device is turned on.
[0222] In step D2, human skeleton data is captured by a camera device to obtain the user's skeleton data.
[0223] In step D3, the posture recognition model file generated in step C5 is imported.
[0224] In step D4, the action type is identified based on the gesture recognition model file.
[0225] In step D5, it is determined whether the identified action type is correct. If the action type is correct, if the interactive application needs to detect the stuck time, step D7 is executed. If the interactive application does not need to detect the stuck time, step D8 is executed. If the action type is incorrect, step D6 is executed.
[0226] In step D6, the user does not score.
[0227] In step D7, the time when the user performs the action is compared with the preset time to obtain the stuck time. The shorter the stuck time, the higher the user score.
[0228] In step D8, the user obtains a corresponding score.
[0229] The training process of the posture recognition model is described below. The T value involved in this application can be 34, that is, the posture recognition model can extract 34 bone nodes. Therefore, the input of the setting option is 34, and the output is the total number of action types (that is, the dimension of the category feature vector). Fig. 9 , Fig. 9 This is a schematic diagram of the model training interface in the embodiment of the present application. As shown in the figure, the developer can configure the training-related options in the model training interface, such as the network layer name, output shape, parameter amount, etc. Import the JS object notation (JSON) of each skeletal data sample. For ease of understanding, please refer to Fig.10 , Fig.10 This is a schematic diagram of the skeleton data sample in the embodiment of the present application. As shown in the figure, it is assumed that the developer presses the "A key" to start collecting skeleton data samples. Then, the "A key" and the position data of the 34 skeleton nodes in the skeleton data sample (i.e., the x-coordinate and the y-coordinate) are recorded and written into a JSON file.
[0230] After the model training is completed, the gesture recognition model file is downloaded to the local computer. In addition, you can also write a test program, import the gesture recognition model, turn on the camera device, and then make the corresponding movements. Determine whether the action type output by the program is correct. If the model evaluation is accurate, it can be used for the development of interactive applications.
[0231] Again, in the embodiment of the present application, a method for training a gesture recognition model is provided. Through the above method, a large number of skeletal data samples are used to train the model, and the accuracy of model recognition can be improved. Based on machine learning, the development workload of action recognition can also be simplified. At the same time, if it is necessary to add or modify the model, the action can be retrained, which has the advantages of faster updating and higher efficiency than modifying the algorithm. In addition, using a camera device as hardware for capturing user images, a set of code compatible online mode and offline mode is realized, which improves development efficiency and expands application scenarios.
[0232] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining a training data set may specifically include:
[0233] In response to a selection operation for any action type label, calling a camera device to collect a video stream of the target object within a collection time, wherein the video stream includes M video frames, where M is an integer greater than 1;
[0234] Extract a video frame from the video stream as a target video frame;
[0235] T skeleton nodes in the target video frame are identified to obtain a set of skeleton data samples for action type labels.
[0236] In one or more embodiments, a method for collecting skeleton data samples is introduced. As can be seen from the above embodiments, each group of skeleton data samples includes position data corresponding to T skeleton nodes, and each group of skeleton data samples corresponds to an action type label. The skeleton data sample collection process will be described below.
[0237] Specifically, it is necessary to define the relationship between the key value and the action type label. For ease of understanding, please refer to Table 1, which is a schematic diagram of the relationship between the key value and the action type label.
[0238] Table 1
[0239] Key-value Action Type Tags A "Stone" B Key "Scissors" C Key "cloth"
[0240] Turn on the camera and set the acquisition duration of each action type (e.g., 5 seconds). Based on Table 1, when the developer presses the "A key", the data collection of the action type "stone" starts. That is, the skeletal data of the target object (e.g., the developer or other development participant) collected within the acquisition duration has the corresponding action type label "stone".
[0241] The video stream includes M video frames, and M is an integer greater than 1. Based on this, the clarity of the M video frames can be detected, and several video frames that meet the requirements can be selected. Then the target video frame is selected from these video frames. One way is to randomly select a video frame as the target video frame. Another way is for the developer to select a video frame as the target video frame. Or other methods are used to select the target video frame. Thus, the T bone nodes in the target video frame are identified to obtain a set of bone data samples for the action type label.
[0242] Furthermore, in an embodiment of the present application, a method for collecting skeleton data samples is provided. Through the above method, only one video frame in the video stream needs to be identified to extract the skeleton data sample, thereby improving data processing efficiency.
[0243] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining a training data set may specifically include:
[0244] In response to a selection operation for any action type label, calling a camera device to collect a video stream of the target object within a collection time, wherein the video stream includes M video frames, where M is an integer greater than 1;
[0245] For each video frame in the video stream, T skeleton nodes in the video frame are identified to obtain T position data to be processed, wherein each position data to be processed corresponds to a skeleton node;
[0246] For each of the T skeleton nodes, the M position data to be processed are averaged to obtain the position data corresponding to the skeleton node, wherein each position data to be processed comes from a video frame;
[0247] According to the position data corresponding to each bone node, a group of bone data samples for the action type label is obtained.
[0248] In one or more embodiments, another method of collecting skeleton data samples is introduced. As can be seen from the above embodiments, each group of skeleton data samples includes position data corresponding to T skeleton nodes, and each group of skeleton data samples corresponds to an action type label. The skeleton data sample collection process will be described below.
[0249] Specifically, the camera is turned on and the acquisition duration of each action type is set (e.g., 5 seconds). Based on Table 1, when the developer presses the "A key", the data collection of the action type "stone" is started. That is, the skeletal data of the target object (e.g., developer or other development participant) collected within the acquisition duration, and the corresponding action type label is "stone".
[0250] The video stream includes M video frames, and M is an integer greater than 1. Assuming that the clarity and completeness of the M video frames meet the requirements, T skeleton nodes can be identified for each of the M video frames, thereby obtaining T position data to be processed corresponding to each video frame. For ease of understanding, assuming that T is 2 and M is 3, please refer to Table 2, which is a schematic diagram of the position data to be processed of T skeleton nodes.
[0251] Table 2
[0252] Video frame number The location data to be processed of the head node The position data to be processed of the left-hand node 1 (100,90) (200,300) 2 (200,10) (500,100) 3 (150,20) (200,200)
[0253] Based on this, the position data to be processed of the M head nodes are averaged, and the position data of the head node is (150, 40). The position data to be processed of the M left-hand nodes are averaged, and the position data of the left-hand node is (300, 200). It can be seen that for each skeleton node, the position data corresponding to the skeleton node can be obtained based on the M position data to be processed, and each position data to be processed comes from a video frame.
[0254] Further, in the embodiment of the present application, another mode of collecting skeleton data sample is provided. Through the above method, each video frame in the video stream is identified, and the identification result of each video frame is integrated to obtain the skeleton data sample. Thus, it is possible to avoid that the sample is accurate due to a large deviation of a certain video frame, thereby being conducive to improving the reliability of the sample.
[0255] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first action recognition result includes a first action type, and the second action recognition result includes a second action type;
[0256] Before displaying the app interaction results, you can also include:
[0257] If the first action type is different from the second action type, and the priority of the first action type is higher than the priority of the second action type, determining that the application interaction result is used to indicate that the first object wins the game;
[0258] If the first action type is different from the second action type, and the priority of the first action type is lower than the priority of the second action type, determining that the application interaction result is used to indicate that the second object wins the game;
[0259] If the first action type is the same as the second action type, then determining the application interaction result is used to indicate that the first object and the second object have reached a game draw.
[0260] In one or more embodiments, a method for generating application interaction results based on a game application is introduced. As can be seen from the above embodiments, the interactive application can be a game application, wherein the game application can provide a game matching function, a game result display function, and a ranking function.
[0261] For ease of understanding, please refer to Fig.11 , Fig.11 Schematic diagram of the game application interface in the embodiment of the present application. Fig.11 As shown in Figure (A), assume that user 1 is the "first object". After entering the game application, the first object clicks to start the game, and enters the interactive session after matching with an opponent. Among them, the matched object and the first object are in the same target virtual room. Assume that "user 2" is matched, and assume that user 2 is the "second object". Fig.11 As shown in Figure (B), during the game, the first object and the second object obtain corresponding scores according to their actions. Fig.11 The interface shown in Figure (C) shows the results of application interaction. In addition to viewing the results of the local users, you can also view the rankings of all users. Fig.11 As shown in the middle (D) figure. The ranking list is sorted from high to low by score, and supports viewing the rankings and scores of the top W (W can be 100) users.
[0262] The following will take a competitive game (for example, the "Rock, Paper, Scissors" game) as an example for introduction, wherein the first action recognition result includes a first action type (for example, "Rock", "Scissors", or "Paper"), and the second action recognition result includes a second action type (for example, "Rock", "Scissors", or "Paper").
[0263] Specifically, see Fig.12 , Fig.12 FIG. 1 is a schematic diagram of implementing interaction based on a confrontation game in an embodiment of the present application. Fig.12 As shown in Figure (A), a countdown is set, and when the countdown ends, "User 1" and "User 2" throw a punch. Among them, "User 1" can be the first object, and "User 2" can be the second object. Based on this, E1 is used to indicate the first action type of "User 1" (i.e., "cloth"). E2 is used to indicate the second action type of "User 2" (i.e., "rock"). According to the game rules of "Rock, Scissors, Paper", the player's win or loss is determined. Since the developer has pre-set the relationship between the action type and the action type label (see Table 1), the win or loss of both parties can be determined based on the key value corresponding to the action type. Among them, the game rules of "Rock, Scissors, Paper" are that "Rock" has a higher priority than "Scissors", "Scissors" has a higher priority than "Cloth", and "Cloth" has a higher priority than "Rock". That is, the priority relationship satisfies "C key value>A key value>B key value>C key value".
[0264] Based on this, "User 1" wins this game. Fig.12 In the interface shown in Figure (B), E3 is used to indicate the application interaction result, for example, "User 1" wins the game. Exemplarily, if the priority of the second action type is higher than the priority of the first action type, the application interaction result is that "User 2" wins the game. Exemplarily, if the second action type is the same as the first action type, the application interaction result is a tie between "User 1" and "User 2".
[0265] Secondly, in the embodiment of the present application, a method for generating application interaction results based on game applications is provided. Through the above method, interaction between users for competitive games is achieved, the operation forms are enriched, and the user experience is improved.
[0266] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time;
[0267] Before displaying the app interaction results, you can also include:
[0268] If the first action type successfully matches the preset action type, determining the first action score corresponding to the first object according to the first action time and the preset action time;
[0269] When the interactive application ends, generating a first total score according to the P action scores corresponding to the first object, wherein the P action scores corresponding to the first object include the first action score, and P is an integer greater than or equal to 1;
[0270] If the first total score is greater than the second total score, determining that the application interaction result is used to indicate that the first object wins the game;
[0271] If the first total score is less than the second total score, determining that the application interaction result is used to indicate that the second object wins the game;
[0272] If the first total score is equal to the second total score, determining that the application interaction result is used to indicate that the first object and the second object have reached a game draw;
[0273] Among them, the second total score is generated when the game is over according to the P action scores corresponding to the second object, and the P action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
[0274] In one or more embodiments, another method of generating application interaction results based on a game application is introduced. As can be seen from the foregoing embodiments, the interactive application can be a game application, wherein the game application can provide a game matching function, a game result display function, and a ranking function, etc., which are not described in detail here. The following will take an action game (for example, a "Dancing Machine" game) as an example for introduction, wherein the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time.
[0275] Specifically, for ease of understanding, see Fig.13 , Fig.13 This is a schematic diagram of implementing interaction based on action games in an embodiment of the present application. Fig.13 Figure (A) shows the interface seen by "User 1", where "User 1" can be the first object and "User 2" can be the second object. As the music plays, action markers will continue to appear on the interface, and these action markers gradually move to the designated area (for example, the area indicated by F1). The user needs to make corresponding actions within a specific time. If the action type is consistent with the preset action type, the corresponding action score will be obtained. If the action type is inconsistent with the preset action type, no score will be obtained. In addition, the action score obtained will be inconsistent depending on the accuracy of the user's card point. F2 is used to indicate the real-time score of each object during the interaction process. F3 is used to indicate the real-time action of "User 2".
[0276] Taking the first action type of "User 1" currently identified as an example, if the first action type successfully matches the preset action type, the first action score is calculated based on the difference between the first action time and the preset action time. Assuming that the difference between the first action time and the preset action time is less than the first threshold, the first action type is determined to be "excellent", and thus, the first action score (for example, 100 points) can be obtained. Exemplarily, assuming that there are 200 preset action types in a game (that is, assuming P = 200), "User 1" needs to perform other actions until P action scores are obtained, and then the P action scores are added together to obtain the first total score.
[0277] Similarly, Fig.13The middle (B) figure shows the interface seen by "User 2". Taking the second action type of "User 2" currently identified as an example, if the second action type successfully matches the preset action type, the second action score is calculated based on the difference between the second action time and the preset action time. Assuming that the difference between the second action time and the preset action time is less than the first threshold and greater than the second threshold, the first action type is determined to be "good", and thus the first action score (for example, 90 points) can be obtained. "User 2" also needs to perform other actions until P action scores are obtained, and then the P action scores are added together to obtain the second total score.
[0278] If the first total score is greater than the second total score, the application interaction result is that "User 1" wins the game. If the second total score is greater than the first total score, the application interaction result is that "User 2" wins the game. If the second total score is equal to the first total score, the application interaction result is a tie between "User 1" and "User 2".
[0279] Secondly, in the embodiment of the present application, another method for generating application interaction results based on game applications is provided. Through the above method, the interaction between users for action games is realized, the operation form is enriched, and the user experience is improved.
[0280] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining the first action score corresponding to the first object according to the first action time and the preset action time may specifically include:
[0281] The first action time and the preset action time are subjected to difference processing and then the absolute value is taken to obtain the time difference;
[0282] A first action score corresponding to the first object is generated according to the time difference, wherein the time difference is negatively correlated with the first action score.
[0283] In one or more embodiments, a method for determining an action score based on a time difference is introduced. As can be seen from the above embodiments, the key value corresponding to the action type label is obtained by using the recognition function of the neural network in the ml5.js framework, that is:
[0284]
[0285]
[0286] Among them, "A" is the key value.
[0287] The following method is used to identify the action code in the game screen, that is, the method based on ml5.js encapsulation is used to achieve recognition. brain.classify(collect data, (error, results) = > {
[0288] / / results[0].label is the key value
[0289] })
[0290] Among them, error is an error report, and results is the recognized action type. If the key value "A" is used to represent raising the left hand during training, the key value "A" returned by results means that the currently recognized action type is "raising the left hand". results[0].label represents the data structure.
[0291] For example, the key value "A" means raising the left hand, the key value "B" means raising the right hand, and the key value "C" means raising both hands. Based on this, it is also necessary to set the preset action type corresponding to each preset action time. For example, when the song is playing at the 4.391623th second (that is, the preset action time is the 4.391623th second), the action type corresponding to the key value A needs to be performed, that is, the preset action type is "raising the left hand". For example, its configuration method is as follows:
[0292]
[0293] The game interface will display an action prompt before the preset action time arrives. The user will make an action and determine the corresponding key value through the identified action type. The program will record the key value and the current time T. Taking the action type identified as the first action type as an example, the corresponding current time is the first action time. Therefore, the first action type is first matched with the preset action type. If the match is consistent, the difference between the first action time and the preset action time is calculated, and then the absolute value is taken to obtain the time difference corresponding to the first action type. Combined with the pre-set rules, the first action score corresponding to the first object is generated according to the time difference.
[0294] Please refer to Table 3, which is a diagram showing the mapping relationship between the time difference and the action score.
[0295] Table 3
[0296] Time difference Action Score Less than 1 second 100 Greater than or equal to 1 second and less than 2 seconds 90 Greater than or equal to 2 seconds 50
[0297] It can be seen that the time difference and the action score are negatively correlated, that is, the larger the time difference, the smaller the action score. Conversely, the smaller the time difference, the larger the action score. Based on this, the total score can be obtained by summing up the action scores in a game.
[0298] Again, in the embodiment of the present application, a method for determining the action score based on the time difference is provided. Through the above method, the influence of time accuracy on the action score is further considered, thereby increasing the diversity of the gameplay, enriching the operation form, and improving the user experience.
[0299] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first action recognition result includes a first action type and a first action amplitude, and the second action recognition result includes a second action type and a second action amplitude;
[0300] Before displaying the app interaction results, you can also include:
[0301] If the first action type successfully matches the preset action type, determining the first action score corresponding to the first object according to the first action amplitude;
[0302] When the interactive application ends, generating a first total score according to the X action scores corresponding to the first object, wherein the X action scores corresponding to the first object include the first action score, and X is an integer greater than or equal to 1;
[0303] If the first total score is greater than the second total score, determining that the application interaction result is used to indicate that the first object wins the game;
[0304] If the first total score is less than the second total score, determining that the application interaction result is used to indicate that the second object wins the game;
[0305] If the first total score is equal to the second total score, determining that the application interaction result is used to indicate that the first object and the second object have reached a game draw;
[0306] The second total score is generated according to the X action scores corresponding to the second object when the game is over, and the X action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action amplitude when the second action type successfully matches the preset action type.
[0307] In one or more embodiments, another method of generating application interaction results based on a game application is introduced. As can be seen from the aforementioned embodiments, the interactive application can be a game application, wherein the game application can provide a game matching function, a game result display function, and a ranking function, etc., which will not be described in detail here. The following will take an action game (for example, a "high jump machine" game) as an example for introduction, wherein the first action recognition result includes a first action type and a first action amplitude, and the second action recognition result includes a second action amplitude and a second action amplitude.
[0308] Specifically, for ease of understanding, see Fig.14 , Fig.14 This is another schematic diagram of implementing interaction based on action games in an embodiment of the present application. Fig.14 Figure (A) shows the interface seen by "User 1", where "User 1" can be the first object and "User 2" can be the second object. Set a countdown, and "User 1" and "User 2" complete the upward jump before the countdown ends. If the action type is consistent with the preset action type, the corresponding action score is obtained. If the action type is inconsistent with the preset action type, no score is obtained. In addition, the action score obtained is inconsistent according to the amplitude of the user's action. For example, the greater the maximum height off the ground when jumping, the higher the action score. Among them, G1 is used to indicate the picture of "User 1" jumping. G2 is used to indicate the picture of "User 2" jumping. G3 is used to indicate the real-time score of each object during the interaction. Taking the currently identified first action type of "User 1" as an example, if the first action type successfully matches the preset action type, the first action score is calculated according to the size of the first action amplitude.
[0309] Assuming that the action amplitude is the jumping height, for ease of understanding, please refer to Table 4, which is an illustration of the mapping relationship between the action amplitude and the action score.
[0310] Table 4
[0311] Range of motion Action Score Less than 20 cm 50 Greater than or equal to 20 cm and less than 50 cm 80 Greater than or equal to 50 cm 100
[0312] It can be seen that the action amplitude and the action score are positively correlated, that is, the larger the action amplitude, the larger the action score. Conversely, the smaller the action amplitude, the smaller the action score. Based on this, the total score can be obtained by summing up the scores of each action in a game. For example, suppose that there are 10 preset action types in a game (that is, assuming X=10). "User 1" needs to make other actions until X action scores are obtained, and then add up the X action scores to get the first total score.
[0313] Similarly, Fig.14 The middle (B) figure shows the interface seen by "User 2". Taking the second action type of "User 2" currently identified as an example, if the second action type successfully matches the preset action type, the second action score is calculated according to the magnitude of the second action. "User 2" needs to make other actions until X action scores are obtained, and then the X action scores are added together to obtain the second total score.
[0314] If the first total score is greater than the second total score, the application interaction result is that "User 1" wins the game. If the second total score is greater than the first total score, the application interaction result is that "User 2" wins the game. If the second total score is equal to the first total score, the application interaction result is a tie between "User 1" and "User 2".
[0315] Secondly, in the embodiment of the present application, another method for generating application interaction results based on game applications is provided. Through the above method, the interaction between users for action games is realized, the operation form is enriched, and the user experience is improved.
[0316] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time;
[0317] Before displaying the app interaction results, you can also include:
[0318] If the first action type successfully matches the preset action type, determining the first action score corresponding to the first object according to the first action time and the preset action time;
[0319] When the interactive application ends, generating a first total score according to the Q action scores corresponding to the first object, wherein the Q action scores corresponding to the first object include the first action score, and Q is an integer greater than or equal to 1;
[0320] Generate a target total score according to the first total score and the second total score;
[0321] If the target total score is greater than or equal to the preset total score, determining that the application interaction result is used to indicate that both the first object and the second object have won the game;
[0322] If the target total score is less than the preset total score, determining the application interaction result is used to indicate that neither the first object nor the second object has won the game;
[0323] Among them, the second total score is generated when the game is over according to the Q action scores corresponding to the second object, and the Q action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
[0324] In one or more embodiments, another method of generating application interaction results based on a game application is introduced. As can be seen from the foregoing embodiments, the interactive application can be a game application, wherein the game application can provide a game matching function, a game result display function, and a ranking function, etc., which are not described in detail here. The following will take an action game (for example, a "Dancing Machine" game) as an example for introduction, wherein the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time.
[0325] Specifically, as the music plays, action marks will continue to appear on the interface, and these action marks gradually move to the designated area. The user needs to make the corresponding action within a specific time. If the action type is consistent with the preset action type, the corresponding action score is obtained. If the action type is inconsistent with the preset action type, no score is obtained. In addition, the action score obtained is inconsistent according to the accuracy of the user's card point. Based on this, taking the first action type of "User 1" currently identified as an example, if the first action type matches the preset action type successfully, the first action score is calculated based on the difference between the first action time and the preset action time. Assuming that there are 100 preset action types in a game (that is, assuming Q = 200), "User 1" also needs to make other actions until Q action scores are obtained, and then the Q action scores are added to obtain the first total score. Similarly, if the second action type matches the preset action type successfully, the second action score is calculated based on the difference between the second action time and the preset action time. "User 2" needs to perform other actions until Q action scores are obtained, and then the Q action scores are added together to obtain the second total score.
[0326] Based on this, the first total score and the second total score are summed to obtain the target total score. If the target total score is greater than or equal to the preset total score (for example, 1000 points), it means that both the first object and the second object have won the game, that is, the application interaction result is that "User 1" and "User 2" have successfully challenged. If the target total score is less than the preset total score (for example, 1000 points), it means that neither the first object nor the second object has won the game, that is, the application interaction result is that "User 1" and "User 2" have failed the challenge.
[0327] Secondly, in the embodiment of the present application, another method for generating application interaction results based on game applications is provided. Through the above method, the interaction between users for cooperative games is realized, the operation form is enriched, and the user experience is improved.
[0328] The object interaction device in this application is described in detail below. Fig.15 , Fig.15This is a schematic diagram of an embodiment of an object interaction device in an embodiment of the present application. The object interaction device 30 includes:
[0329] The receiving module 310 is used to receive a joining operation for a target virtual room when an interactive application is loaded in a first device, wherein the first device is a mobile terminal or a host device, the joining operation is used to instruct the first object to enter the target virtual room, the target virtual room is a virtual room created for the interactive application, the mobile terminal has a built-in camera device, and the host device has a communication connection relationship with the camera device;
[0330] The acquisition module 320 is used for acquiring the skeleton data of the first object through the first camera device in response to the adding operation, when at least the first object and the second object have been added to the target virtual room, wherein the skeleton data includes the position data of each skeleton node;
[0331] The acquisition module 320 is further used to acquire a first action recognition result according to the skeleton data of the first object;
[0332] The display module 330 is used to display the application interaction result, wherein the application interaction result is determined according to the first action recognition result and the second action recognition result, and the second action recognition result is obtained according to the skeleton data of the second object.
[0333] In an embodiment of the present application, an object interaction device is provided. With the above device, if a player uses a mobile terminal, the camera device provided by the mobile terminal can be directly used to collect the skeleton data. If the player has a host device, only an external camera device is required to collect the skeleton data. Based on this, the method proposed in the present application can realize the interaction between users based on the collected skeleton data of each player without relying on the somatosensory device, thereby reducing the interaction cost.
[0334] Optionally, in the above Fig.15 Based on the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application,
[0335] An acquisition module 320 is specifically used to acquire the skeleton data of the first object through a first camera device externally connected to the first device when the first device belongs to the host device;
[0336] The display module 330 is specifically used to display the application interaction result through a screen device externally connected to the first device;
[0337] The first device is a terminal used by the first object to enter the target virtual room;
[0338] The skeleton data of the second object is acquired by a second camera device externally connected to the second device when the second device belongs to a host device. The second device is a terminal used by the second object to enter the target virtual room.
[0339] In an embodiment of the present application, an object interaction device is provided. The above device is used to pre-build interactive activity sites at different locations (for example, e-sports hotel lobby, hotel room, etc.), and then the interactive system provided at the activity site is combined to realize online interaction at different locations. In this way, without relying on somatosensory equipment, the interaction of players based on the offline mode is realized, thereby reducing the cost of setting up the activity, which is conducive to attracting more players to participate in the activity and increasing the activity level.
[0340] Optionally, in the above Fig.15 Based on the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application,
[0341] An acquisition module 320 is specifically configured to acquire the skeleton data of the first object by using a first camera device built into the first device when the first device is a mobile terminal;
[0342] The first device is a terminal used by the first object to enter the target virtual room;
[0343] The skeleton data of the second object is acquired by a second camera device built into the second device when the second device is a mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
[0344] In the embodiment of the present application, an object interaction device is provided. With the above device, players can use their own mobile terminals, or devices that can browse web pages and have cameras to participate in the interaction. Thus, without relying on somatosensory devices, players can interact in an online mode, thereby reducing the cost of interaction, which is conducive to attracting more players to participate in the activity and improving the activity level.
[0345] Optionally, in the above Fig.15 Based on the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application,
[0346] An acquisition module 320 is specifically used to acquire the skeleton data of the first object through a first camera device externally connected to the first device when the first device belongs to the host device;
[0347] The display module 330 is specifically used to display the application interaction result through a screen device externally connected to the first device;
[0348] The first device is a terminal used by the first object to enter the target virtual room;
[0349] The skeleton data of the second object is acquired by a second camera device built into the second device when the second device is a mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
[0350] In the embodiment of the present application, an object interaction device is provided. With the above device, players can use their own mobile terminals, or devices that can browse web pages and have cameras, to interact with players who use the interactive system at the event site. Thus, without relying on somatosensory devices, players can interact based on online and offline modes, thereby reducing the cost of interaction, which is conducive to attracting more players to participate in the event and increasing activity.
[0351] Optionally, in the above Fig.15 Based on the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application,
[0352] The acquisition module 320 is further used to acquire the skeleton data of the second object through a first camera device externally connected to the first device, or acquire the skeleton data of the second object through a first camera device built into the first device before displaying the application interaction result;
[0353] The acquisition module 320 is further configured to acquire a second action recognition result according to the skeleton data of the second object.
[0354] In an embodiment of the present application, an object interaction device is provided. With the above device, considering that the camera device can simultaneously capture multiple players, the action recognition results of multiple players can also be recognized simultaneously, thereby facilitating the players to interact in the same real space.
[0355] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application, the first action recognition result includes a first action type;
[0356] The acquisition module 320 is specifically configured to send the skeleton data of the first object to the server, so that the server acquires the first action type through a posture recognition model based on the skeleton data of the first object;
[0357] The receiving module 310 is also used to receive the application interaction result sent by the server before displaying the application interaction result, wherein the application interaction result is determined by the server based on the first action recognition result and the second action recognition result, and the second action recognition result includes a second action type.
[0358] In an embodiment of the present application, an object interaction device is provided. Using the above device, a posture recognition model is deployed on the server side, and the server calls the model to identify the action type. On the one hand, it can save the computing power of the terminal local recognition and improve the processing efficiency. On the other hand, it can save local storage resources.
[0359] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application, the first action recognition result includes a first action type;
[0360] The object interaction device 30 further includes a determination module 340;
[0361] An acquisition module 320 is specifically configured to acquire a first action type through a posture recognition model based on the skeleton data of the first object;
[0362] The receiving module 310 is further configured to receive a second action type from a second device before displaying the application interaction result, wherein the second device is a terminal used by the second object to enter the target virtual room;
[0363] The determination module 340 is used to determine the application interaction result according to the first action recognition result and the second action recognition result, wherein the second action recognition result includes the second action type.
[0364] In an embodiment of the present application, an object interaction device is provided. Using the above device, a posture recognition model is deployed on a host device or a mobile terminal, and the host device or the mobile terminal calls the model to identify the action type. On the one hand, there is no need to feed back the skeleton data to the server, thereby saving transmission bandwidth. On the other hand, the efficiency of action recognition can be improved.
[0365] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application, the object interaction device further includes a training module 350;
[0366] The acquisition module 320 is further used to acquire a training skeleton data set, wherein the training skeleton data set includes K groups of skeleton data samples, each group of skeleton data samples includes position data corresponding to T skeleton nodes, and each group of skeleton data samples corresponds to an action type label, K is an integer greater than or equal to 1, and T is an integer greater than 1;
[0367] The acquisition module 320 is further used to acquire K category feature vectors based on each group of skeleton data samples through the posture recognition model to be trained, wherein each category feature vector corresponds to a group of skeleton data samples;
[0368] The training module 350 is used to update the model parameters of the posture recognition model to be trained according to the action type label and the category feature vector corresponding to each group of skeleton data samples until the model training conditions are met to obtain the posture recognition model.
[0369] In an embodiment of the present application, an object interaction device is provided. By adopting the above device and training the model with a large number of skeletal data samples, the accuracy of model recognition can be improved. Based on machine learning, the development workload of action recognition can also be simplified. At the same time, if it is necessary to add or modify the model, the action can be retrained, which has the advantages of faster updates and higher efficiency compared to modifying the algorithm. In addition, by using a camera device as hardware for capturing user images, a set of codes compatible with online and offline modes is implemented, which improves development efficiency and expands application scenarios.
[0370] Optionally, in the above Fig.15 Based on the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application,
[0371] The acquisition module 320 is specifically configured to call a camera device to acquire a video stream of the target object within an acquisition time in response to a selection operation for any action type label, wherein the video stream includes M video frames, where M is an integer greater than 1;
[0372] Extract a video frame from the video stream as a target video frame;
[0373] T skeleton nodes in the target video frame are identified to obtain a set of skeleton data samples for action type labels.
[0374] In an embodiment of the present application, an object interaction device is provided. By adopting the above device, only one video frame in a video stream needs to be identified to extract a skeleton data sample, thereby improving data processing efficiency.
[0375] Optionally, in the above Fig.15 Based on the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application,
[0376] The acquisition module 320 is specifically configured to call a camera device to acquire a video stream of the target object within an acquisition time in response to a selection operation for any action type label, wherein the video stream includes M video frames, where M is an integer greater than 1;
[0377] For each video frame in the video stream, T skeleton nodes in the video frame are identified to obtain T position data to be processed, wherein each position data to be processed corresponds to a skeleton node;
[0378] For each of the T skeleton nodes, the M position data to be processed are averaged to obtain the position data corresponding to the skeleton node, wherein each position data to be processed comes from a video frame;
[0379] According to the position data corresponding to each bone node, a group of bone data samples for the action type label is obtained.
[0380] In an embodiment of the present application, an object interaction device is provided. The above device is used to identify each video frame in the video stream, and the recognition results of each video frame are combined to obtain a skeleton data sample. In this way, it is possible to avoid the sample being inaccurate due to a large deviation of a certain video frame, which is conducive to improving the reliability of the sample.
[0381] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application, the first action recognition result includes a first action type, and the second action recognition result includes a second action type;
[0382] The determination module 340 is further configured to, before displaying the application interaction result, if the first action type is different from the second action type and the priority of the first action type is higher than the priority of the second action type, determine that the application interaction result is used to indicate that the first object wins the game;
[0383] The determination module 340 is further configured to, before displaying the application interaction result, if the first action type is different from the second action type and the priority of the first action type is lower than the priority of the second action type, determine that the application interaction result is used to indicate that the second object wins the game;
[0384] The determination module 340 is further configured to, before displaying the application interaction result, if the first action type is the same as the second action type, determine that the application interaction result is used to indicate that the first object and the second object have reached a game draw.
[0385] In the embodiment of the present application, an object interaction device is provided. By using the above device, interaction between users in competitive games is realized, the operation forms are enriched, and the user experience is improved.
[0386] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application, the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time;
[0387] The determination module 340 is also used to determine the first action score corresponding to the first object according to the first action time and the preset action time before displaying the application interaction result, if the first action type matches the preset action type successfully;
[0388] The determination module 340 is further configured to generate a first total score according to the P action scores corresponding to the first object when the interactive application ends, wherein the P action scores corresponding to the first object include the first action score, and P is an integer greater than or equal to 1;
[0389] The determination module 340 is further configured to determine that the application interaction result is used to indicate that the first object wins the game if the first total score is greater than the second total score;
[0390] The determination module 340 is further configured to determine that the application interaction result is used to indicate that the second object wins the game if the first total score is less than the second total score;
[0391] The determination module 340 is further configured to determine that the application interaction result is used to indicate that the first object and the second object have reached a game draw if the first total score is equal to the second total score;
[0392] Among them, the second total score is generated when the game is over according to the P action scores corresponding to the second object, and the P action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
[0393] In the embodiment of the present application, an object interaction device is provided. By using the above device, the interaction between users on action games is realized, the operation forms are enriched, and the user experience is improved.
[0394] Optionally, in the above Fig.15 Based on the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application,
[0395] The determination module 340 is specifically used to perform a difference processing between the first action time and the preset action time and then take an absolute value to obtain a time difference;
[0396] A first action score corresponding to the first object is generated according to the time difference, wherein the time difference is negatively correlated with the first action score.
[0397] In the embodiment of the present application, an object interaction device is provided. By adopting the above device, the influence of time accuracy on action scores is further considered, thereby increasing the diversity of gameplay, enriching the operation forms, and improving the user experience.
[0398] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application, the first motion recognition result includes a first motion type and a first motion amplitude, and the second motion recognition result includes a second motion type and a second motion amplitude;
[0399] The determination module 340 is further configured to determine, before displaying the application interaction result, if the first action type successfully matches the preset action type, a first action score corresponding to the first object according to the first action amplitude;
[0400] The determination module 340 is further configured to generate a first total score according to the X action scores corresponding to the first object when the interactive application ends, wherein the X action scores corresponding to the first object include the first action score, and X is an integer greater than or equal to 1;
[0401] The determination module 340 is further configured to determine that the application interaction result is used to indicate that the first object wins the game if the first total score is greater than the second total score;
[0402] The determination module 340 is further configured to determine that the application interaction result is used to indicate that the second object wins the game if the first total score is less than the second total score;
[0403] The determination module 340 is further configured to determine that the application interaction result is used to indicate that the first object and the second object have reached a game draw if the first total score is equal to the second total score;
[0404] The second total score is generated according to the X action scores corresponding to the second object when the game is over, and the X action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action amplitude when the second action type successfully matches the preset action type.
[0405] In the embodiment of the present application, an object interaction device is provided. By using the above device, the interaction between users on action games is realized, the operation forms are enriched, and the user experience is improved.
[0406] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the object interaction device 30 provided in the embodiment of the present application, the first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time;
[0407] The determination module 340 is also used to determine the first action score corresponding to the first object according to the first action time and the preset action time before displaying the application interaction result, if the first action type matches the preset action type successfully;
[0408] The determination module 340 is further configured to generate a first total score according to the Q action scores corresponding to the first object when the interactive application ends, wherein the Q action scores corresponding to the first object include the first action score, and Q is an integer greater than or equal to 1;
[0409] The determination module 340 is further configured to generate a target total score according to the first total score and the second total score;
[0410] The determination module 340 is further configured to determine that the application interaction result is used to indicate that both the first object and the second object have won the game if the target total score is greater than or equal to the preset total score;
[0411] The determination module 340 is further configured to determine that the application interaction result indicates that neither the first object nor the second object has won the game if the target total score is less than the preset total score;
[0412] Among them, the second total score is generated when the game is over according to the Q action scores corresponding to the second object, and the Q action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
[0413] In the embodiment of the present application, an object interaction device is provided. By using the above device, interaction between users in cooperative games is realized, the operation forms are enriched, and the user experience is improved.
[0414] The present application also provides a terminal, such as Fig.16 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. In the embodiments of the present application, the terminal is taken as an example for explanation:
[0415] Fig.16 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Fig.16 The mobile phone includes: a radio frequency (RF) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and a power supply 490. Those skilled in the art will understand that Fig.16 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0416] Combine the following Fig.16A detailed introduction to the various components of the mobile phone:
[0417] The RF circuit 410 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 480 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 410 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 410 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.
[0418] The memory 420 can be used to store software programs and modules. The processor 480 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 420. The memory 420 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 420 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0419] The input unit 430 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 431 or near the touch panel 431 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 431 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 480, and can receive and execute commands sent by the processor 480. In addition, the touch panel 431 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 431, the input unit 430 may further include other input devices 432. Specifically, the other input devices 432 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a mouse, a joystick, etc.
[0420] The display unit 440 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 440 may include a display panel 441. Optionally, the display panel 441 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 431 may cover the display panel 441. When the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event. Subsequently, the processor 480 provides a corresponding visual output on the display panel 441 according to the type of touch event. Although in Fig.16 In the embodiment, the touch panel 431 and the display panel 441 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 431 and the display panel 441 can be integrated to realize the input and output functions of the mobile phone.
[0421] The mobile phone may also include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 441 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 441 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0422] The audio circuit 460, the speaker 461, and the microphone 462 can provide an audio interface between the user and the mobile phone. The audio circuit 460 can transmit the received audio data to the speaker 461 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, and then the audio data is output to the processor 480 for processing, and then sent to another mobile phone through the RF circuit 410, or the audio data is output to the memory 420 for further processing.
[0423] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 470. It provides users with wireless broadband Internet access. Fig.16 A WiFi module 470 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0424] The processor 480 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420. Optionally, the processor 480 may include one or more processing units; optionally, the processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 480.
[0425] The mobile phone also includes a power source 490 (such as a battery) for supplying power to various components. Optionally, the power source can be logically connected to the processor 480 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0426] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0427] The steps performed by the terminal in the above embodiment can be based on the Fig.16 The terminal structure shown.
[0428] A computer-readable storage medium is also provided in an embodiment of the present application, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods described in the above embodiments are implemented.
[0429] A computer program product is also provided in an embodiment of the present application, including a computer program, which, when executed by a processor, implements the steps of the methods described in the above embodiments.
[0430] It is understandable that in the specific implementation of the present application, related data such as skeleton data and account data are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0431] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0432] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0433] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0434] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0435] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a server or terminal device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store computer programs.
[0436] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for object interaction, characterized in that: include: In a case where an interactive application is loaded in a first device, a joining operation for a target virtual room is received, wherein the first device is a mobile terminal or a host device, the joining operation is used to instruct the first object to enter the target virtual room, the target virtual room is a virtual room created for the interactive application, the mobile terminal has a built-in camera device, and the host device has a communication connection relationship with the camera device; In response to the adding operation, when at least the first object and the second object have been added to the target virtual room, acquiring skeleton data of the first object through a first camera device, wherein the skeleton data includes position data of each skeleton node; Acquire a first action recognition result according to the skeleton data of the first object; The application interaction result is displayed, wherein the application interaction result is determined based on the first motion recognition result and the second motion recognition result, and the second motion recognition result is obtained based on the skeleton data of the second object.
2. The method according to claim 1, characterized in that The step of acquiring the skeleton data of the first object by using a first camera device includes: In the case where the first device belongs to the host device, acquiring the skeleton data of the first object by using the first camera device externally connected to the first device; The displaying of the application interaction result includes: Displaying the application interaction result through a screen device externally connected to the first device; Wherein, the first device is a terminal used by the first object to enter the target virtual room; The skeleton data of the second object is acquired through a second camera device externally connected to the second device when the second device belongs to the host device, and the second device is a terminal used by the second object to enter the target virtual room.
3. The method according to claim 1, characterized in that The step of acquiring the skeleton data of the first object by using a first camera device includes: In the case where the first device is the mobile terminal, acquiring the skeleton data of the first object by using the first camera device built into the first device; Wherein, the first device is a terminal used by the first object to enter the target virtual room; The skeleton data of the second object is acquired through a second camera device built into the second device when the second device belongs to the mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
4. The method according to claim 1, characterized in that: The step of acquiring the skeleton data of the first object by using a first camera device includes: In the case where the first device belongs to the host device, acquiring the skeleton data of the first object by using the first camera device externally connected to the first device; The displaying of the application interaction result includes: Displaying the application interaction result through a screen device externally connected to the first device; Wherein, the first device is a terminal used by the first object to enter the target virtual room; The skeleton data of the second object is acquired through a second camera device built into the second device when the second device belongs to the mobile terminal, and the second device is a terminal used by the second object to enter the target virtual room.
5. The method according to claim 1, characterized in that Before displaying the application interaction result, the method further includes: Acquire the skeleton data of the second object by using the first camera device externally connected to the first device, or acquire the skeleton data of the second object by using the first camera device built into the first device; A second action recognition result is obtained according to the skeleton data of the second object.
6. The method according to claim 1, characterized in that The first action recognition result includes a first action type; The step of obtaining a first action recognition result according to the skeleton data of the first object includes: Sending the skeleton data of the first object to a server, so that the server acquires the first action type through a posture recognition model based on the skeleton data of the first object; Before displaying the application interaction result, the method further includes: Receive the application interaction result sent by the server, wherein the application interaction result is determined by the server according to the first action recognition result and the second action recognition result, and the second action recognition result includes a second action type.
7. The method according to claim 1, characterized in that The first action recognition result includes a first action type; The step of obtaining a first action recognition result according to the skeleton data of the first object includes: Based on the skeleton data of the first object, acquiring the first action type through a posture recognition model; Before displaying the application interaction result, the method further includes: receiving the second action type from a second device, wherein the second device is a terminal used by the second object to enter the target virtual room; The application interaction result is determined according to the first action recognition result and the second action recognition result, wherein the second action recognition result includes a second action type.
8. The method according to claim 6 or 7, characterized in that: The method further comprises: Acquire a training skeleton data set, wherein the training skeleton data set includes K groups of skeleton data samples, each group of skeleton data samples includes position data corresponding to T skeleton nodes, and each group of skeleton data samples corresponds to an action type label, K is an integer greater than or equal to 1, and T is an integer greater than 1; Based on each group of skeleton data samples, K category feature vectors are obtained through the posture recognition model to be trained, wherein each category feature vector corresponds to a group of skeleton data samples; According to the action type label and the category feature vector corresponding to each group of skeleton data samples, the model parameters of the posture recognition model to be trained are updated until the model training conditions are met to obtain the posture recognition model.
9. The method according to claim 8, characterized in that The step of obtaining a training data set includes: In response to a selection operation for any action type label, calling a camera device to collect a video stream of the target object within a collection time, wherein the video stream includes M video frames, and M is an integer greater than 1; Extracting a video frame from the video stream as a target video frame; The T skeleton nodes in the target video frame are identified to obtain a group of skeleton data samples corresponding to the action type label.
10. The method according to claim 8, characterized in that The step of obtaining a training data set includes: In response to a selection operation for any action type label, calling a camera device to collect a video stream of the target object within a collection time, wherein the video stream includes M video frames, and M is an integer greater than 1; For each video frame in the video stream, the T skeleton nodes in the video frame are identified to obtain T position data to be processed, wherein each position data to be processed corresponds to a skeleton node; For each of the T skeleton nodes, averaging the M position data to be processed to obtain the position data corresponding to the skeleton node, wherein each position data to be processed comes from a video frame; According to the position data corresponding to each skeleton node, a group of skeleton data samples corresponding to the action type label is obtained.
11. The method according to claim 1, characterized in that: The first action recognition result includes a first action type, and the second action recognition result includes a second action type; Before displaying the application interaction result, the method further includes: If the first action type is different from the second action type, and the priority of the first action type is higher than the priority of the second action type, determining that the application interaction result is used to indicate that the first object wins the game; If the first action type is different from the second action type, and the priority of the first action type is lower than the priority of the second action type, determining that the application interaction result is used to indicate that the second object wins the game; If the first action type is the same as the second action type, determining the application interaction result is used to indicate that the first object and the second object have reached a game draw.
12. The method according to claim 1, characterized in that The first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time; Before displaying the application interaction result, the method further includes: If the first action type successfully matches the preset action type, determining the first action score corresponding to the first object according to the first action time and the preset action time; When the interactive application ends, generating a first total score according to the P action scores corresponding to the first object, wherein the P action scores corresponding to the first object include the first action score, and P is an integer greater than or equal to 1; If the first total score is greater than the second total score, determining that the application interaction result is used to indicate that the first object wins the game; If the first total score is less than the second total score, determining that the application interaction result is used to indicate that the second object wins the game; If the first total score is equal to the second total score, determining that the application interaction result is used to indicate that the first object and the second object have reached a game draw; Among them, the second total score is generated according to P action scores corresponding to the second object when the game is over, and the P action scores corresponding to the second object at least include a second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
13. The method according to claim 12, characterized in that The determining, according to the first action time and a preset action time, a first action score corresponding to the first object includes: The first action time and the preset action time are subjected to a difference processing and then an absolute value is taken to obtain a time difference; A first action score corresponding to the first object is generated according to the time difference, wherein the time difference is negatively correlated with the first action score.
14. The method according to claim 1, characterized in that The first motion recognition result includes a first motion type and a first motion amplitude, and the second motion recognition result includes a second motion type and a second motion amplitude; Before displaying the application interaction result, the method further includes: If the first action type successfully matches the preset action type, determining the first action score corresponding to the first object according to the first action amplitude; When the interactive application ends, generating a first total score according to the X action scores corresponding to the first object, wherein the X action scores corresponding to the first object include the first action score, and X is an integer greater than or equal to 1; If the first total score is greater than the second total score, determining that the application interaction result is used to indicate that the first object wins the game; If the first total score is less than the second total score, determining that the application interaction result is used to indicate that the second object wins the game; If the first total score is equal to the second total score, determining that the application interaction result is used to indicate that the first object and the second object have reached a game draw; The second total score is generated according to the X action scores corresponding to the second object when the game is over, the X action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action amplitude when the second action type successfully matches the preset action type.
15. The method according to claim 1, characterized in that The first action recognition result includes a first action type and a first action time, and the second action recognition result includes a second action type and a second action time; Before displaying the application interaction result, the method further includes: If the first action type successfully matches the preset action type, determining the first action score corresponding to the first object according to the first action time and the preset action time; When the interactive application ends, generating a first total score according to the Q action scores corresponding to the first object, wherein the Q action scores corresponding to the first object include the first action score, and Q is an integer greater than or equal to 1; generating a target total score according to the first total score and the second total score; If the target total score is greater than or equal to the preset total score, determining that the application interaction result is used to indicate that both the first object and the second object win the game; If the target total score is less than the preset total score, determining that the application interaction result is used to indicate that neither the first object nor the second object has won the game; Among them, the second total score is generated according to the Q action scores corresponding to the second object when the game is over, the Q action scores corresponding to the second object at least include the second action score, and the second action score is determined according to the second action time and the preset action time when the second action type successfully matches the preset action type.
16. An object interaction device, characterized in that: include: a receiving module, configured to receive a join operation for a target virtual room when an interactive application is loaded in a first device, wherein the first device is a mobile terminal or a host device, the join operation is used to instruct the first object to enter the target virtual room, the target virtual room is a virtual room created for the interactive application, the mobile terminal has a built-in camera device, and the host device has a communication connection relationship with the camera device; an acquisition module, configured to, in response to the adding operation, acquire skeleton data of the first object through a first camera device when at least the first object and the second object have been added to the target virtual room, wherein the skeleton data includes position data of each skeleton node; The acquisition module is further used to acquire a first action recognition result according to the skeleton data of the first object; The display module is used to display the application interaction result, wherein the application interaction result is determined according to the first action recognition result and the second action recognition result, and the second action recognition result is obtained according to the skeleton data of the second object.
17. An interactive system, characterized in that: Including host equipment, screen equipment, camera device and bus system; Wherein, the camera device is used to collect video streams; The screen device is used to display the image data output by the host device; The host device is used to perform the steps of the method according to any one of claims 1 to 15; The bus system is used to connect the host device, the screen device and the camera device so that the host device, the screen device and the camera device can communicate with each other.
18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 15 are implemented.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.
Citation Information
Cited By
Game control method and device
CN121971854A
