COMMENTARY VIDEO GENERATION METHOD AND APPARATUS, SERVER, AND STORAGE MEDIUM

A commentary video generation method and apparatus, server, and storage medium. The method includes: obtaining a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object; generating a commentary data stream based on the game instruction frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior; rendering a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame; and combining the commentary data stream with the game video stream, the game video frame and the commentary audio corresponding to the same game event in the commentary video stream being aligned in time.

FIELD

Embodiments of this disclosure relate to the field of artificial intelligence, and in particular, to a commentary video generation method and apparatus, a server, and storage medium.

BACKGROUND

With the rapid development of livestreaming technologies, live video streaming has become a daily live entertainment and communication manner, and currently, live game streaming has become one of the popular live video streaming.

Currently, during the live game streaming, a game streamer needs to commentate on the game based on how the game goes on. For a generation process of a game commentary video, processes such as game segment selection, commentary text writing, video editing, speech generation, and video synthesis need to be manually performed in advance to generate the commentary video for commentary playback.

However, the game commentary process in the related art requires manual participation in the process of producing a commentary video, and has a long production process and high manual operation costs.

SUMMARY

Embodiments of the disclosure may provide a commentary video generation method and apparatus, a server, and a storage medium, so that operation costs of commentary video generation can be reduced. The technical solutions are as follows:

A commentary video generation method may be provided, the method being performed by a commentary server, and including: obtaining a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game; generating a commentary data stream based on the game instruction frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior; rendering a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame; and combining the commentary data stream with the game video stream to generate a commentary video stream, the game video frame and the commentary audio corresponding to the same game event in the commentary video stream being aligned in time.

A commentary video generation apparatus may be provided, including: an obtaining module, configured to obtain a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game; a first generation module, configured to generate a commentary data stream based on the game instruction frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior; a second generation module, configured to render a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame; and a third generation module, configured to combine the commentary data stream with the game video stream to generate a commentary video stream, the game video frame and the commentary audio corresponding to the same game event in the commentary video stream being aligned in time.

A terminal may be provided, including a memory and one or more processors, the memory storing computer-readable instructions, the computer-readable instructions, when executed by the processor, causing the one or more processors to perform the following operations: obtaining a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game; generating a commentary data stream based on the game instruction frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior; rendering a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame; and combining the commentary data stream with the game video stream to generate a commentary video stream, the game video frame and the commentary audio corresponding to the same game event in the commentary video stream being aligned in time.

One or more non-transitory computer-readable storage media storing computer-readable instructions may be provided, the computer-readable instructions, when executed by one or more processors, causing the one or more processors to perform the following operations: obtaining a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game; generating a commentary data stream based on the game instruction frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior; rendering a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame; and combining the commentary data stream with the game video stream to generate a commentary video stream, the game video frames and the commentary audio corresponding to the same game event in the commentary video stream being aligned in time.

A computer program product or a computer program may be provided, the computer program product or the computer program including computer instructions, and the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device performs the commentary video generation method provided in the foregoing possible implementations.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of the present disclosure clearer, the following further describes the present disclosure in detail with reference to the accompanying drawings. The described embodiments are not to be construed as a limitation to the present disclosure. All other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present disclosure.

The commentary video generation method provided in the embodiments of the disclosure mainly relates to the following technologies in the foregoing AI software technologies: a computer vision technology, a speech processing technology, and a natural language processing technology.

FIG.1is an architectural diagram of a commentary system according to some embodiments. The commentary system includes at least one game terminal110, a commentary server120, and a livestreaming terminal130. The commentary system in this example embodiment is applied to a virtual online commentary scenario.

The game terminal110is a device installed with a game application. The game application may be a sports game, a military simulation program, a multiplayer online battle arena (MOBA) game, a battle royale shooting game, a simulation game (SLG), etc. The types of the game application are not limited in the embodiments. The game terminal110may be a smartphone, a tablet computer, a personal computer, etc. In some embodiments, in the virtual online game commentary scenario, when the game terminal110is running the game application, a user can control a virtual object in a game to perform an in-game behavior through the game terminal110. Correspondingly, the game terminal110receives a game operation instruction for the user to control the virtual object and sends the game operation instruction to the commentary server120, so that the commentary server120can render the game in the commentary server120based on the received game operation instruction.

The game terminal110is directly or indirectly connected to the commentary server120through wired or wireless communication.

The commentary server120is a back-end server or service server of the game application, and is configured to perform online game commentary and push a commentary video stream to other livestreaming platforms or terminals. The commentary server120may be an independent physical server, a server cluster including a plurality of physical servers, or a distributed system, or may be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a content delivery network (CDN), big data, and an artificial intelligence platform. In some embodiments, the commentary server120may be configured to receive a game operation instruction (or game instruction frame) sent by a plurality of game terminals110. For example, the commentary server120may receive game operation instructions sent by a game terminal112and a game terminal111. On one hand, the commentary server120generates a commentary data stream based on analysis on the game instruction frame. On the other hand, the commentary server120renders the game online based on the game instruction frame to generate a game video stream in real time, and combines the commentary data stream with the game video stream to generate a commentary video stream to be pushed to the livestreaming terminal130.

Based on the design of the server architecture, the commentary server120may include a game video stream generation server (configured to render a game screen based on the game instruction frame, and record to generate the game video stream), a commentary data stream generation server (configured to generate the commentary data stream based on the game instruction frame), and a commentary video stream generation server (configured to generate the commentary video stream based on the game video stream and the commentary data stream).

The livestreaming terminal130is directly or indirectly connected to the commentary server120through wired or wireless communication.

The livestreaming terminal130may be a device where a livestreaming client or video client is run, or a back-end server corresponding to the livestreaming client or video client. In some embodiments, if the livestreaming terminal130is a device where a livestreaming client or video client is run, the livestreaming terminal130can receive and decode the commentary video stream sent by the commentary server120, and then play the commentary video on the livestreaming client or video client. Optionally, if the livestreaming terminal130is a back-end server corresponding to the livestreaming client or video client, the livestreaming terminal130can receive the commentary video stream sent by the commentary server120and push the commentary video stream to the corresponding livestreaming client or video client.

FIG.2is a flowchart of a commentary video generation method according to some embodiments. The method being applied to the commentary server shown inFIG.1is used as an example for description. The method includes:

Operation201. Obtain a game instruction frame. the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game.

In the related art, after the game is over, a commentary text is written based on the game video, and the commentary text is converted into a speech, the speech being played to generate the commentary video. Different from this, an application scenario in some embodiments is an online game commentary scenario. That is, the commentary server automatically generates a corresponding commentary video stream during the game, and pushes the commentary video stream to a livestreaming terminal for playing, to improve the generation timeliness of the commentary video. To generate the commentary video during the game in real time, in a possible implementation, online game video rendering and online analysis and commentary can be implemented through analysis on the game instruction frame.

The game instruction frame includes at least one game operation instruction, and the game operation instruction is used for controlling the virtual object to perform the in-game behavior in the game. The in-game behavior refers to a behavior that the virtual object performs under the control of the user after the game begins. For example, the user controls the virtual object to move in a virtual environment, to cast a skill, to perform a preset game action, etc.

The terminal can control the virtual object to perform the in-game behavior in the game based on the game operation instruction. For example, when the user opens a game application and touches a skill cast control in the game application by the terminal, the terminal can generate the game operation instruction based on the touch operation of the user, and control the virtual object to cast a skill based on the game operation instruction.

In an embodiment, the game operation instruction is defined in a form of frame. Each game instruction frame may include a plurality of game operation instructions for elements in the game such as a player character and non-player character (NPC).

Operation202. Generate a commentary data stream based on the game operation frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior.

To realize online game commentary and generate the commentary video in real time, some embodiments provide an online game comprehension technology where the game event to be commentated on during the game is obtained based on an online game process that analyzes and comprehends the game instruction frame.

The game instruction frame is a set of game operation instructions. Therefore, in an example embodiment, the commentary server can analyze the game operation instructions in the game instruction frame, accurately calculate changes in attribute value of objects in the virtual environment after receiving each game instruction frame, to discover the game event to be commentated on, and generate the commentary text based on the game event and convert the commentary text into the commentary audio, to generate the commentary data stream through the analysis on the game instruction frame.

In an embodiment, apart from the commentary audio, the commentary data stream further includes the commentary text, so that the commentary text can be added to a corresponding commentary video frame in the commentary video stream during subsequent generation of the commentary video stream.

In an example embodiment, if the game operation instruction in the game instruction frame is “Shen xx casts a mixed bomb”, the commentary server can calculate corresponding information such as location and health points of each element in the game under the game operation instruction. If it is determined based on the information such as location and health points that a virtual object in the game loses a lot of health points after triggering the mixed bomb, the game event can correspondingly be determined as “Shen xx casts a mixed bomb with high damage” by analyzing the game instruction frame, to further generate the Commentary audio describing the game event.

Operation203. Render a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame.

Based on the principle of online generation of the commentary video, when the user controls virtual objects to play games in different game clients, correspondingly, the game screen needs to be rendered in real time if the commentary video corresponding to the game process needs to be generated online. Therefore, there is no need to wait for the game to be over to obtain and process the game video to generate the commentary video, thereby further improving the real-time performance and timeliness of the commentary video generation.

When the user plays the game in the game client installed in the terminal (the mobile client), it is the game client that renders in real time the attribute changing process of each object or element in the game based on the received game operation instruction and the game operation instruction forwarded by the server (the back-end server or service server corresponding to the game client) from other users. Based on the game rendering process, in a possible implementation, the game client can also be installed in the commentary server to receive game operation instructions of game clients controlled by other users and render the game screen in real time according to the game operation instructions. Since the commentary video needs to be finally generated, the rendered game screen needs to be recorded to generate the game video stream including the game video frame.

Operations202and203may be performed simultaneously, or either operation202or operation203is performed first. The sequence of operations202and203is not limited herein.

Operation204. Combine the commentary data stream with the game video stream to generate a commentary video stream, the game video frame and the commentary audio corresponding to the same game event in the commentary video stream being aligned in time.

During the online commentary video generation process provided in this embodiment, the commentary server generates two data streams respectively: the commentary data stream and the game video stream. There is a difference between processing processes of the two data streams. For example, the commentary data stream is generated at a lower rate due to the need of analysis on the game instruction frame. In addition, the game video stream is started, rendered, and recorded when the player loads the game while the commentary data stream is processed after the game begins. Therefore, due to the different processing rates of the two data streams, during the commentary video generation process, there is a need to align the two data streams and synchronize them with the commentary video by a criterion, so as to adapt to the different processing rates of the two data streams. In other words, the commentary server aligns the game video frame and the commentary audio corresponding to the same game event in time during the commentary video generation process. That is, the commentary audio corresponding to the game event needs to be played at the same time when the game video frame corresponding to the game event is displayed.

In summary, in some embodiments, through online analysis on the game instruction frame, the commentary audio is generated, the game video is rendered, the commentary audio and the game video are aligned in time to generate the commentary video. By analyzing the game instruction frame to generate the commentary video, on one hand, the commentary video matching the game is generated during the game. There is no need to wait for the game to be over to generate the commentary video, thereby improving the generation timeliness of the commentary video. Generating the commentary video matching the game during the game can avoid the case where the game video needs to be recorded and stored before the commentary video is generated, thereby saving electricity and storage resources consumed in recording and storage. On the other hand, instead of manually writing the commentary text to generate the commentary video, the commentary video can be generated automatically, thereby further improving the generation efficiency of the commentary video, and the matching degree of the commentary video with the game. Moreover, modifications for a mismatch are reduced effectively to save electricity and computing resources consumed by modifying the commentary video.

There is a time difference between the commentary data stream and the game video stream due to the different data processing rates of the game video stream and the commentary data stream. If the game video stream and the commentary data stream are aligned only at the beginning during the commentary video stream generation process, apparently there is no guarantee that the game event described by the commentary audio being played is displayed on the game video frame that is being displayed. Therefore, in a possible implementation, during aligning the game video stream and the commentary data stream in time, the commentary server needs to analyze to obtain the correspondence between the game video stream and the commentary data stream, and align the game video stream and the commentary data stream corresponding to the same game event in time.

FIG.3is a flowchart of a commentary video generation method according to some embodiments. The method being applied to the commentary server shown inFIG.1is used as an example for description. The method includes:

Operation301. Obtain a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game.

The game instruction frame corresponds to a first frame rate, that is, the game instruction frame is refreshed or obtained according to the first frame rate. In an exemplary example, if the first frame is 30 FPS, correspondingly, the game instruction frame is obtained every 33 ms, or there is an interval of 33 ms between adjacent game instruction frames. Correspondingly, each game instruction frame includes a game operation instruction generated within 33 ms.

In an example embodiment, the commentary server receives or obtains the game instruction frame according to the first frame rate, and analyzes a game based on the game instruction frame to obtain attribute information of each object in the game after an in-game behavior corresponding to the game instruction frame is performed.

Operation302. Obtain a preset game event set, where the preset game event set includes a plurality of preset game events; control the virtual object to perform the in-game behavior in the game based on the game instruction frame; and determine attribute information of virtual objects after the in-game behavior is performed.

The attribute information may include the following information of the virtual objects in the game: location information, health point information, speed information, level information, skill information, feat information, equipment information, score information, etc. The specific information types of the attribute information are not limited thereto.

In an example embodiment, after receiving the game instruction frame, the commentary server controls the virtual object to perform the in-game behavior in the game based on the game operation instructions in the game instruction frame. Then the commentary server accurately calculates the attribute information of the objects in the virtual environment under each game operation instruction, so as to analyze and discover the game event that can be used for commentary based on the attribute information.

The objects in the game may include a virtual object controlled by a user (a player character), a virtual object controlled by a back-end device (a non-player character, NPC), or all kinds of virtual buildings, etc. The object types in the game are not limited thereto.

In an example embodiment, if the in-game behavior is “The home team hero has slain the visiting team red/blue BUFF”, correspondingly, after this in-game behavior is performed, the obtained attribute information of the objects in the game includes “health points of the home team heroes, health points of the visiting team heroes, location of the visiting team heroes, equipment of the visiting team, etc.”.

In an embodiment, the commentary server can preset the types of the attribute information (the attribute information types are dimensions of commentary features) to be analyzed in an online commentary process. Therefore, the attribute information needed is obtained based on the preset dimensions of the commentary features in the online commentary process.

In an example embodiment of multiplayer online battle arena (MOBA), the obtained attribute information can be summarized into four types: player character (the virtual object controlled by the user), NPC, team fight, and statistics. There is corresponding attribute information for each type. For example, corresponding attribute information for the team fight type may include: location of the team fight, virtual objects in the team fight (types or the number of the virtual objects), team fight type, team fight aim, team fight time, team fight result, etc.; corresponding attribute information for a single virtual object may include: health points, level, location, equipment, skill, feat, etc.; corresponding attribute information for NPC may include: health points, location, attacking skill, etc.; and corresponding attribute information for statistics may include: score, the number of towers, win rate, etc.

Operation303. Select at least one candidate game event matching the attribute information from the plurality of preset game events.

To discover and comprehend the game event online, in an embodiment, the commentary server analyzes in advance the game events to be focused on in the commentary scenario and presets these game events in the commentary server to obtain a preset game event set. The commentary server sets corresponding preset attribute information (the preset attribute information is a preset condition that triggers the preset game event) for each preset game event in the preset game event set. Then, at least one candidate game event can be determined based on the preset attribute information and the obtained attribute information in the online commentary process.

Each preset game event in the preset game event set corresponds to the preset attribute information. Therefore, when determining at least one candidate game event matching the attribute information, the commentary server needs to determine whether the attribute information matches the preset attribute information of any preset game event in the preset game event set. In other words, the commentary server needs to match the attribute information with the preset attribute information of each preset game event. In this way, when it is determined that the attribute information matches the preset attribute information of a preset game event in the preset game event set, this preset game event corresponding to the matched preset attribute information can be determined as a candidate game event matching the attribute information. If the attribute information does not match the preset attribute information of any preset game event, correspondingly, the attribute information does not correspond to any preset game event.

By presetting the game event set, the candidate preset can be selected quickly from the preset game event set after the attribute information of the virtual object is obtained. Compared with generating the candidate game event in real time, some embodiments can enhance the efficiency of determining the candidate game event. Moreover, since the game event is generated in advance, electricity and computing resources consumed by generating the candidate game event in real time can be saved.

In an embodiment, the selecting at least one candidate game event matching the attribute information from a plurality of preset game events includes: matching the attribute information with the preset attribute information of the preset game events in the preset game event set to obtain target preset attribute information matching the attribute information; and determining the preset game event corresponding to the target preset attribute information as the candidate game event.

When the candidate game event needs to be determined, the commentary server can obtain the attribute information of the objects in the game after the in-game behavior is performed, and match the attribute information with the preset attribute information of the preset game events in the preset game event set. By doing this, the commentary server obtains the target preset attribute information matching the attribute information and determines the preset game event corresponding to the target preset attribute information.

In an embodiment, during determining the candidate game event, the attribute information of the virtual object is matched with the preset attribute information of the preset game event to obtain the candidate game event. The candidate game event selected can match a game event in the user's angle in the game. In this way, the probability of repeated commentary on the same game event is reduced, thereby reducing electricity and computing resources consumed by a repeated commentary video. Moreover, the accuracy of determining the final commentary event can be improved thereby reducing electricity and computing resources consumed by generating an inaccurate commentary video.

Correspondingly, the determining the preset game event corresponding to the target attribute information as the candidate game event includes: determining the preset game event corresponding to the target preset attribute information, and determining the preset game event that meets a preset commentary condition in the preset game events corresponding to the target preset attribute information as the candidate game event. The preset commentary condition includes at least one of a game angle condition or an event repeat condition. The game angle condition means that the preset condition game event is in a game viewing angle. In other words, after the attribute information matches the preset attribute information of any preset game event, the commentary server also needs to determine whether the preset game event corresponding to the target preset attribute information meets the preset commentary condition. For example, the commentary server needs to determine whether the preset game event corresponding to the target preset attribute information is within the game angle. If it is determined that the preset game event corresponding to the target preset attribute information is within the game angle, the preset game event is determined as the candidate game event corresponding to the game instruction frame. Otherwise, if the preset game event is not within the current game angle, the preset game event is eliminated from a plurality of candidate game events matched according to the attribute information.

The event repeat condition means that the number of times that the preset game event occurs within a preset duration is less than a threshold of times. In other words, after the attribute information matches the preset attribute information of a preset game event, it needs to further determine whether the preset game event has been repeatedly commentated within the preset time. If there is no repeated commentary, the preset game event is determined as the candidate game event matching the attribute information. Otherwise, the preset game event is eliminated from the candidate game events.

In an embodiment, the candidate game event can be set to meet any one of the game angle condition or the event repeat condition, or to meet both of the two conditions.

The preset commentary condition includes at least one of the game angle condition or the event repeat condition. What is determined as the candidate game event is the preset game event that meets the preset commentary condition in the preset game events corresponding to the target preset attribute information. In this way, the probability of the repeated commentary on the game event is reduced, and the probability of the commentary outside the game viewing angle can be reduced. Therefore, the electricity and computing resources consumed by generating the commentary video not within the game viewing angle are saved. Modifications for an unsuitable game viewing angle are reduced to save the electricity and computing resources consumed by modifying the commentary video.

FIG.4is a diagram of a setting interface of preset attribute information corresponding to a preset game event. In the setting interface401, the preset game event is “The hero invaded the red blue BUFF”, the corresponding preset attribute information (a trigger condition) can be “The home team hero has slain the visiting team's red/blue BUFF, the visiting team hero is around the BUFF, and the home team hero has enough health points.”, etc.

Operation304. Select the target game event from the at least one candidate game event.

There may be more than one candidate game event matching the attribute information, but only one game event can be commentated on in each commentary moment. Therefore, in an example embodiment, if the attribute information matches a plurality of candidate game events, the best game event needs to be selected from a plurality of candidate game events as the target game event to generate a subsequent commentary text and commentary audio.

In an embodiment, the selecting the target game event from the at least one candidate game event includes the following operations:

1. Obtain event weights corresponding to the candidate game events.

The event weights are offline event weights or basic event weights corresponding to the candidate game events. In other words, the event weights are not directly related to the current game.

In an example embodiment, the commentary server has a commentary event scoring model. The commentary event scoring model is formed by labeling the commentary event a professional commentary host has selected and offline iterate learning. Therefore, only by inputting the candidate game events generated by the game instruction frames into the trained commentary event scoring model, the event weights corresponding to the candidate game event can be obtained. The commentary game events and their corresponding event weights are stored in the commentary server, so that the event weights corresponding to the candidate game events can be found according to the determined candidate game events.

In an embodiment, since the commentary server has the commentary event scoring model, there is no need to store the candidate game events and their corresponding event weights. In the online commentary process, the commentary server inputs the candidate game events into the commentary event scoring model to obtain the event weights corresponding to the candidate game events.

In an example embodiment, if three candidate game events are generated based on the game instruction frame, the event weights corresponding to the three candidate game events respectively are: The event weight corresponding to candidate game event 1 is 0.6, the event weight corresponding to candidate game event 2 is 0.7, and the event weight corresponding to candidate game event 3 is 0.8.

2. Determine event scores corresponding to the candidate game events based on the importance of the candidate game events in the game.

The event weight obtained in operation1is the offline event weight without direct relation to the current game. If the target game event is selected only based on the offline event weight, the target game event selected may not be the most wonderful or the user's more expected game event to be commentated on. Therefore, in a possible implementation, based on the event weights, the commentary server also needs to consider the importance of the candidate game events in the game to determine the event scores corresponding to the candidate game events.

The importance of the candidate game events is related to at least one of the following: a location where the candidate game event occurs, the virtual object type that triggers the candidate game event, and the number of the virtual objects that trigger the game event. In other words, if the game event occurs within the current game angle, correspondingly, the event score of the game event is set high, otherwise the event score of the game event is set low; if the number of the virtual objects that trigger the game event is large, the event score of the game event is set high, otherwise the event score of the game event is set low; and if the virtual object that triggers the game event is a main role (or an important role) in the game, the event score of the game event is set high, otherwise the event score of the game event is set low, where the main role and important role are preset by a developer.

In an embodiment, multiplayer online battle arena (MOBA) is used as an example. When determining the event score, the commentary server can, through scoring the team fight and scoring the event within the team fight, synthesize to obtain the event scores corresponding to the candidate game events. The team fight scoring is related to the number of roles in the team fight (the more the roles are in the team fight, the higher the score is set), team fight location (the more important the resources occupied by the team fight are, the higher the score is set), team fight result (the score is set higher if the team fight is won), etc.; and scoring the event within a team fight is related to the type of heroes participating in the game event (the more important the heroes are, the higher the event score is set), the score of the heroes participating in the game event (the higher score the heroes obtain, the higher the event score is set), etc.

Elements that affect the event scores corresponding to the candidate game events are preset by the developer.

3. Weight the event scores by the event weights to obtain event weighted scores corresponding to the candidate game events.

In an example embodiment, basic weights of the event and online scoring are considered to obtain the event weighted scores corresponding to the candidate game events, so that the target game event is selected from a plurality of candidate game events based on the event weighted scores. That is, the commentary server can consider the event weights and the event score of the candidate game event to obtain the event weighted score of the candidate game event.

In an example embodiment, if the game instruction frame corresponds to three candidate game events, the event weight corresponding to candidate game event 1 is 0.6, and the event score is 50; the event weight corresponding to candidate game event 2 is 0.7, and the event score is 50; and the event weight corresponding to candidate game event 3 is 0.6, and the event score is 80. The event weighted scores of the candidate game events respectively are: The event weighted score corresponding to candidate game event 1 is 30; the event weighted score corresponding to candidate game event 2 is 35; and the event weighted score corresponding to candidate game event 3 is 42.

During setting the event score, the scoring can be done according to the ten-point system or the hundred-point system. This is not limited herein.

4. Determine the candidate game event with the highest event weighted score as the target game event.

Only one game event can be commentated on in one commentary moment. A higher event weighted score means that the game event in an offline commentary scenario attracts more attention, and meanwhile is of greater importance in the current game situation. Therefore, during determining the target game event from a plurality of candidate game events, the candidate game event with the highest event weighted score is determined as the target game event.

In an example embodiment, if the event weighted scores of the candidate game events respectively are: The event weighted score corresponding to candidate game event 1 is 30, the event weighted score corresponding to candidate game event 2 is 35, and the event weighted score corresponding to candidate game event 3 is 42, the corresponding target game event is candidate game event 3.

In some embodiments, multiplayer online battle arena (MOBA) (including a team fight situation) is taken as an example. When selecting the target game event from a plurality of candidate game events, the commentary server can first select the game event based on the number of the virtual objects in the team fight. For example, if the game includes two team fights, where the team fight A has 3 virtual objects and the team fight B has 7 virtual objects, priority is given to the game event corresponding to the team fight B in selecting the game event. Selecting elements may include the types and scores of the virtual objects. For example, the team fight B corresponds to 3 candidate game events, and the 3 virtual game events are respectively performed by a virtual object A and a virtual object B. The virtual object A is an important hero role. Correspondingly, the candidate game event corresponding to the virtual object A is determined as the target game event.

In some embodiments, the target game event is determined based on a single game instruction frame. Optionally, during determining the game event, the target game event cannot be determined only based on the single game instruction frame. At least two game instruction frames may be needed to determine the target game event.

A higher event weighted score means that the game event in offline commentary attracts more attention, and meanwhile is of greater importance in the current game situation. Therefore, the candidate game event with the highest event weighted score is determined as the target game event, so that the game event to be commentated finally will be more important. In this way, the user can have better experience, and the commentary on the game event can also produce better effects. In addition, generating the important commentary video for important game event can also reduce the probability of generating the unimportant commentary video for the unimportant game event. Therefore, electricity and computing resources consumed by generating the unimportant commentary video can be saved.

Operation305. Generate the commentary text based on the target game event, and process the text to generate a commentary data stream.

In a possible implementation, after the corresponding target game event is obtained based on analysis on the game instruction frame, the commentary server needs to automatically generate the commentary text through a natural language understanding (NLU) technology, and convert the commentary text into a commentary speech through a TTS technology, to obtain the commentary data stream so as to realize online game comprehension.

The commentary audio describes the target game event and the target game event corresponds to the single target game instruction frame or a plurality of target game instruction frames. Therefore, in a possible implementation, the commentary audio is associated with its corresponding target game event or a frame number of its corresponding game instruction frame. In this way, the corresponding commentary audio can be found according to the frame number during generating the commentary video later.

Operation306. Render a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame.

For the implementation of operation306, reference may be made to the foregoing embodiment, and details are not described again in this embodiment.

Operation307. Determine a target game video frame in the game video stream, where the target game video frame is any one game video frame in the game video stream; and determine a game time corresponding to the target game video frame as a target game time, where the target game time is the time elapsing from the start of the game to the target game video frame.

The reasons for different data processing rates of the commentary data stream and the game video stream includes: On one hand, the game video stream starts to be rendered and recorded when the user loads the game while the commentary data stream is processed after the player enters the game. The recording time of the game video stream is obviously longer than the game time. Therefore, there is a time difference between the commentary data stream and the game video stream. On the other hand, the difference between a frame rate of the game instruction frame and a record frame of the game video frame also causes the time difference between the game video stream and the commentary data stream. Therefore, there is a need to analyze the correspondence between the commentary data stream and the game video stream, so that the game video frame and the commentary audio corresponding to the same game event are aligned in time to generate a commentary video stream.

No matter how long the game video stream is prolonged, game time is still a main timeline of commentary. Therefore, in a possible implementation, the commentary server sets the timeline in the commentary video stream based on the game time in the game. In other words, the commentary server determines the commentary audio corresponding to the game time by obtaining the target game time in the game video frame, that is, the time elapsing from the game time to the target game video frame. The target game video frame is a video frame in the game video stream. Therefore, the target game time of the target game video frame is the time elapsing from the start of the game to the target game video frame.

Operation308. Determine the game instruction frame generated within the target game time as the target game instruction frame, and determine a target frame number of the target game instruction frame.

A target commentary audio is generated based on the received target game instruction frame. Therefore, the target commentary audio describing the target game event can correspond to the frame number corresponding to the target game instruction frame. Therefore, in a possible implementation, the commentary server can generate the target frame number of the target game instruction frame based on the game time, and then determine the target commentary audio according to the target frame number.

In an embodiment, the process of determining the target frame number of the target game instruction frame may be: determining the target frame number of the target game instruction frame based on the target game time and the first frame rate.

The game instruction frame has a preset frame rate of obtaining or refreshing (the first frame). Correspondingly, during determining which frame of game instruction frame the target game time corresponds to the target frame number of the target game instruction frame needs to be calculated based on the target game time and the first frame rate.

In an example embodiment, if the target game instruction frame is generated in the target game time, the first frame rate is 30 FPS, that is, the interval between two adjacent game instruction frames is 30 ms. If the target game time is 13 minutes, 56 seconds and 34 milliseconds, the corresponding target frame number of the target game instruction frame is: the target game time of the target game video frame divided by the time interval of the adjacent game instruction frames. In other words, the target frame number corresponding to the target game time 13 minutes, 56 seconds and 34 milliseconds is frame 25334.

The target frame number of the target game instruction frame can be obtained by a simple calculation of the target game time and the first frame rate, which not only improves the efficiency of determining the target frame number, but also saves the electricity and storage resources consumed by the complex calculation.

FIG.5is a schematic diagram of an alignment process of a game video frame and a game instruction frame according to some embodiments. The recognition process of the game time in the game video frame is in a stream pulling client510, that is, the stream pulling client510pulls the game video stream from the server that generates the game video stream, and performs game time recognition on the game video frames in the game video stream. The game time recognition process includes stream pulling monitoring511, video decoding512, time cropping513, and time recognition514. The stream pulling monitoring511refers to monitoring the generation of the game video stream and pulling the game video stream in time. The video decoding512is used to decapsulate the pulled game video stream to obtain consecutive game video frames. The time cropping513is used to crop a local image including the game time in the game video frame to obtain the local image, and then perform the subsequent time recognition. In the time recognition514, a time sequence included in the game video frame is recognized as 1356, that is, the video time of the game video frame in the game video stream, 36 minutes and 21 seconds, corresponds to the game time, 13 minutes and 56 seconds; the time sequences of the game video frames recognized by the stream pulling client510are formed into a time queue511which is sent to the commentary service520. Interframe alignment is performed in the commentary service520. Time smoothing516is used to process the obtained time queue in a case of erroneous time recognition, that is, there is a large difference between adjacent time sequences; and then game frame matching517is performed. The game frame matching517is used to generate the target frame number corresponding to the target game instruction frame based on the time sequence (the target game time). If the target frame number has a corresponding target game event, interframe alignment518is performed, that is, the video time of the game video frame in the game video stream, 36 minutes and 21 seconds, is aligned in time with commentary audio whose frame number is 25334.

Operation309. Determine the game event corresponding to the target frame number as a target game event, and use the commentary audio for describing the target game event is used as target commentary audio; align the target commentary audio in time with the target game video frame; and generate the commentary video stream based on the target commentary audio and the target game video frame that are aligned in time.

Not each game video frame corresponds to the target game event. The target frame number corresponds to the target game instruction frame and the target game instruction frame corresponds to the target game event. Therefore, the commentary server can search for the corresponding target game event in the commentary data stream based on the target frame number. If the target game event corresponding to the target frame number is found, the target commentary audio for describing the target game event is aligned in time with the target game video frame, that is, the target commentary audio is played while the target game video frame is displayed. In an embodiment, the commentary data stream may further include a commentary text. When synthesizing the commentary video stream, the commentary server can embed a target commentary text corresponding to the target game video frame into the preset position of the target game video frame, and adjust the target commentary audio and the target game video frame to the same time.

In this embodiment, by analyzing the attribute information of the objects after the in-game behavior indicated by the game operation instruction, the corresponding candidate game event can be matched with the attribute information based on the attribute information and the preset attribute information of the preset game event. In this way, the game event is obtained by the automatic analysis without manual intervention, so that the commentary text and the commentary audio can be generated subsequently based on the game event, thereby improving the generation efficiency of the commentary video. In addition, the game time is used as a criterion to adjust the commentary data stream and the game video stream to realize online synthesis and generation of the commentary video. Therefore, the video image and the commentary audio of the same game event can be synchronized. The commentary on the game event can produce better effects based on the synchronized video image and commentary audio. Furthermore, the operation costs of online generation of the commentary video are reduced as there is no need to manually edit the game video. In addition, the game time can be used as a criterion in the game to adjust the commentary video and the game video stream, which can avoid the case where before the commentary video is generated, the game process video needs to be recorded and stored, and the commentary audio is generated and stored in advance, thereby saving electricity and storage resources consumed in recording and storage.

The accuracy of the game time in the game video frame is in seconds while the interval of image refreshing is in milliseconds. Therefore, in order to increase the accuracy of determining the target frame number, in an embodiment, the commentary server needs to correct the game time recognized in the target game video frame.

FIG.6is a flowchart of a method for determining a target game event according to some embodiments. The method being applied to the commentary server shown inFIG.1is used as an example for description. The method includes:

Operation601. Utilize an image recognition model to perform image recognition on the game time in the target game video frame to obtain an image recognition result.

The game time is displayed in the game video frame. Therefore, in a possible implementation, the commentary server can perform the image recognition on the game time in the target game video frame to obtain a target game time corresponding to the target game video frame.

The commentary server has the image recognition model, and can input the target game video frame into the image recognition model for image recognition and output the game time included in the target game video frame. The image recognition model may be a (Deep Neural Networks, DNN) model for handwritten digit recognition in the CV field.

FIG.7is a schematic diagram of a game video frame according to some embodiments. A video time702corresponding to the game video frame is 36 minutes and 21 seconds, and a game time701corresponding to the game video frame is 13 minutes and 56 seconds.

When image recognition is performed on the game time in the target game video frame, the target game video frame can be directly inputted into the image recognition model to obtain the game time outputted by the image recognition model; or time cropping is performed on the target game video frame, that is, a local image including the game time is cropped from the target game video frame, and is inputted into the image recognition model to obtain the game time outputted by the image recognition model.

Operation602. Determine the game time corresponding to the target game video frame based on the image recognition result and use the determined game time as the target game time.

In an example embodiment, the commentary server can directly determine the time obtained from the image recognition result as the target game time corresponding to the target game video frame.

The target game time included in the game video stream is in seconds. However, when the frame number is calculated based on the frame rate, the interframe alignment requires accuracy to the millisecond level. Therefore, in a possible implementation, the commentary server can introduce frequency counting to accumulate frequency of the game time obtained from the image recognition result so as to obtain the target game time in milliseconds.

Performing the image recognition on the target game time in the target game video frame by the image recognition model can increase the accuracy of the target game time recognized. Time alignment between the target commentary audio and the target game video frame is more accurate based on the target game time recognized accurately. In addition, the more accurate time alignment can effectively reduce the modifications needed due to misalignment or low accuracy of alignment and save electricity and computing resources consumed by modifying the commentary video.

In an example embodiment, operation602may include the following operations:

1. Determine a basic game time corresponding to the target game video frame based on the image recognition result.

In an example embodiment, time data obtained from the image recognition result is determined as the basic game time corresponding to the target game video frame, so that the basic game time is corrected subsequently based on the accumulated frequency and a second frame rate.

2. Determine a game time offset based on historical recognition times and the second frame rate.

The second frame rate is a frame rate corresponding to the game video stream. If the second frame rate is 60 FPS, the time interval between two adjacent game video frames is 17 ms.

The second frame rate can provide time in milliseconds. Therefore, in a possible implementation, the commentary server can calculate an offset of an actual game time based on the historical recognition times of the basic game time and the second frame rate. The historical recognition times of the basic game time refer to the number of times that the basic game time is recognized during a historical recognition period. The historical recognition period refers to a period before image recognition is performed on the target game video frame.

In an example embodiment, if the second frame rate is 60 FPS and the basic game time is 13 minutes and 56 seconds, the corresponding game time offset is 17 ms when the basic game time is recognized for the first time; and the corresponding game time offset is 34 ms when the basic game time is recognized for the second time.

3. Determine a sum of the basic game time and the game time offset as the target game time.

The game time offset is in milliseconds. Therefore, the sum of the game time offset and the basic game time can be determined as the target game time to obtain a target game time in the millisecond level.

In an example embodiment, if the basic game time is 13 minutes and 56 seconds, and the game time offset is 34 ms, the corresponding target game time can be 13 minutes 56 seconds and 34 milliseconds.

In an example embodiment, the correspondence between the target game video frame and the target game instruction frame can be shown in Table 1 and Table 2.

According to the correspondence in Table 1 and Table 2, the target game video frame with the video time of 36 minutes and 21 seconds corresponds to the target game time of 13 minutes 56 seconds and 34 milliseconds, the target frame number of the corresponding target game instruction frame is 25334, and the corresponding target game event is “Cheng xx has been slain”.

In this embodiment, by analyzing the historical recognition times of the game time in the game video frame and in combination with the frame rate of the game video stream, the target game time in milliseconds can be correctly calculated, so as to align the target game video frame and the target commentary audio in time. Therefore, not only the accuracy of determining the target game time is increased, but also the accuracy of interframe alignment is increased. In addition, the more accurate time alignment can effectively reduce the modifications needed due to inaccuracy, thereby saving electricity and computing resources consumed by modifying the commentary video.

In some embodiments, in single-round games with a plurality of virtual objects such as multiplayer online game arena, there are a plurality of virtual objects in the game. Different game viewing angles may be included in the commentary video generation process. The different game viewing angles can be focusing on the angle of a virtual object. Therefore, during rendering the game screen and generating the game video stream, the game video stream needs to be generated from the different game viewing angles based on the different game viewing angles.

FIG.8is a flowchart of a commentary video generation method according to some embodiments. The method being applied to the commentary server shown inFIG.1is used as an example for description. The method includes:

Operation801. Obtain a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game.

Operation802. Generate a commentary data stream based on the game instruction frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior.

For implementations of operations801and802, reference may be made to the foregoing embodiment, and details are not described again.

Operation803. Render the game screen based on the game instruction frame to obtain a global game screen;

The game instruction frame can include game operation instructions sent by game clients corresponding to different virtual objects (controlled by users). Therefore, during rendering the game screen according to the game instruction frame, the global rendering is needed, and the global game screen is obtained after recording.

Operation804. Determine a target game viewing angle in game viewing angles; and extract a target game screen from the global game screen based on the target game viewing angle, and generate a game video stream corresponding to the target game viewing angle based on the target game screen, where different game viewing angles correspond to different game video streams.

During commentary, game events occur in different places. For a clear or correct angle for the users to view an ongoing game event, in a possible implementation, the commentary server can obtain the game video streams from the different game viewing angles.

The different game viewing angles can be centered on different virtual objects, where the virtual objects are controlled by the users.

The manner for obtaining the game video streams corresponding to the different game viewing angles can be: extracting the game screens of the needed game viewing angles from the global game screen and recording different game screens to obtain the game video streams corresponding to the different game viewing angles; or distributing the different game viewing angles in different servers that have a sound card device for both rendering and recording to generate the game video streams corresponding to the different game viewing angles.

Operation805. Combine game video streams with the commentary data stream to generate the commentary video streams corresponding to the different game viewing angles.

Based on generating the game video streams corresponding to the different game viewing angles, during generation of the commentary video stream, the different game video streams also need to be combined with the commentary data stream to generate the commentary video streams corresponding to the different game viewing angles.

In the scenario of generating the commentary video streams corresponding to the different game viewing angles, the commentary server can push the commentary video streams corresponding to the different game viewing angles to livestreaming platforms or clients, so that the livestreaming platforms or clients can switch the game viewing angles as needed; or according to the needs of different livestreaming platforms or clients, the commentary server pushes the target commentary data stream corresponding to the game viewing angle needed to the livestreaming platforms or clients.

In some embodiments, different commentary video streams can be generated based on the different game viewing angles. Therefore, different commentary video streams can be accurately pushed to different platforms according to their needs, thereby improving the accuracy of the pushed commentary video streams; or, during playing the commentary video streams, the game viewing angle can be switched, thereby improving the diversity of the commentary video streams. Pushing accurate commentary video streams to different platforms can reduce modifications needed due to inaccurate pushing, thereby saving electricity and computing resources consumed by modifying the pushed commentary video streams.

FIG.9is a schematic process diagram of complete generation of a commentary video stream according to some embodiments. A commentary server receives a game instruction901(a game operation instruction), where one generates a commentary data stream through game information obtaining and TTS speech synthesis, and one generates a game video stream based on the game instruction. The process of generating the commentary data stream includes: game core transfer902(that is, analyzing the game instruction frame), feature commentary903(that is, obtaining attribute information of objects in a game), event generation904(that is, determining at least one candidate game event matching the attribute information based on the attribute information), event selection905(that is, selecting a target game event from a plurality of candidate game events), and TTS speech synthesis906(that is, generating a commentary text based on the target game event and obtaining commentary audio by TTS processing). The process of generating the game video stream includes: game rendering907(that is, rendering the game based on the game instruction frame to generate a game screen), rendering outside broadcast (OB) scheduling908(that is, obtaining game screens corresponding to different game viewing angles by rendering), video recording909(recording the game screen to generate the game video stream), and video pushing910(pushing the game video stream to a server that generates the commentary video stream). After obtained, the game video stream and the commentary data stream can be aligned to generate a commentary video911.

FIG.10is a structural block diagram of a commentary video generation apparatus according to some embodiments. The commentary video generation apparatus may be implemented as part or total of a server. The commentary video generation apparatus may include:

an obtaining module1001, configured to obtain a game instruction frame, the game instruction frame including at least one game operation instruction, and the game operation instruction being used for controlling a virtual object to perform an in-game behavior in a game;

a first generation module1002, configured to generate a commentary data stream based on the game instruction frame, the commentary data stream including at least one piece of commentary audio describing a game event, and the game event being triggered during the virtual object performing the in-game behavior;

a second generation module1003, configured to render a game screen based on the game instruction frame to generate a game video stream, the game video stream including at least one game video frame; and a third generation module1004, configured to combine the commentary data stream with the game video stream to generate a commentary video stream, the game video frame and the commentary audio corresponding to the same game event in the commentary video stream being aligned in time.

The third generation module1004may include:

a first determining unit, configured to determine a target game video frame in the game video stream; where the target game video frame is any one game video frame in the game video stream; and determine a game time corresponding to the target game video frame as a target game time, where the target game time is the time elapsing from the start of the game to the target game video frame;

a second determining unit, configured to determine the game instruction frame generated within the target game time as a target game instruction frame and determine a target frame number of the target game instruction frame; and

a time alignment unit, configured to determine the game event corresponding to the target frame number as a target game event, and use the commentary audio for describing the target game event as target commentary audio; align the target commentary audio with the target game video frame in time; and generate the commentary video stream based on the target commentary audio and the target game video frame that are aligned in time.

The game instruction frame corresponds to a first frame rate; and

the second determining unit may be further configured to:

determine the target frame number of the target game instruction frame based on the target game time and the first frame rate.

The first determining unit may be further configured to:

utilize an image recognition model to perform image recognition on the game time in the target game video frame to obtain an image recognition result; and

determine the game time corresponding to the target game video frame based on the image recognition result and use the determined game time as the target game time.

A frame rate of the game video stream is a second frame rate; and the first determining unit may be further configured to:

determine a basic game time corresponding to the target game video frame based on the image recognition result;

determine a game time offset based on historical recognition times of the basic game time and the second frame rate, where the historical recognition times of the basic game time refer to the number of times that the basic game time is recognized within a historical recognition period; and

determine a sum of the basic game time and the game time offset as the target game time.

The first generating module1002may include:

a third determining unit, configured to: obtain a preset game event set, where the game event set includes a plurality of preset game events; control the virtual object to perform the in-game behavior in the game based on the game instruction frame; and determine attribute information of virtual objects in the game after the in-game behavior is performed;

a fourth determining unit, configured to select at least one candidate game event matching the attribute information from the plurality of preset game events;

a screening unit, configured to select the target game event from at least one candidate game event; and

a first generation unit, configured to generate a commentary text based on the target game event and perform text-to-speech processing on the commentary text to generate the commentary data stream.

The fourth determining unit may be further configured to:

match the attribute information with preset attribute information of the preset game events in the game event set, to obtain target preset attribute information matching the attribute information; and

determine the candidate game event based on the preset game event corresponding to the target preset attribute information.

The fourth determining unit may be further configured to:

determine the preset game event corresponding to the target preset attribute information, and use the preset game event that meets a preset commentary condition in the preset game event corresponding to the target preset attribute information as the candidate game event, where the preset commentary condition includes at least one of a game angle condition or an event repeat condition, the game angle condition means that the preset game event is within a game viewing angle, and the event repeat condition means that the number of times that the preset game event occurs within a preset duration is less than a threshold of times.

The screening unit may be further configured to:

obtain event weights corresponding to the candidate game events;

determine event scores corresponding to the candidate game events based on importance of the candidate game events in the game, where the importance is related to at least one of the following: a location where the candidate game event occurs, a virtual object type that triggers the candidate game event, and the number of virtual objects that trigger the candidate game event;

weight the event scores by the event weights to obtain event weighted scores corresponding to the candidate game events; and

determine the candidate game event with the highest event weighted score as the target game event.

The second generating module1003may include:

a second generation unit, configured to: render the game screen based on the game instruction frame to obtain a global game screen; and determine a target game viewing angle in game viewing angles;

a third generation unit, configured to extract target a game screen from the global game screen based on the target game viewing angle, and generate a game video stream corresponding to the target game viewing angle based on the target game screen, where different game viewing angles correspond to different game video streams.

The third generation module1004may include:

a fourth generation unit, configured to combine game video streams with the commentary data stream to generate the commentary video streams corresponding to the different game viewing angles.

In summary, in some embodiments, through online analysis on the game instruction frame, the commentary audio is generated, the game video is rendered, and the commentary audio and the game video are aligned in time to generate the commentary video. By analyzing the game instruction frame to generate the commentary video, on one hand, the commentary video matching the game is generated during the game. There is no need to wait for the game to be over to generate the commentary video, thereby improving the generation timeliness of the commentary video. On the other hand, instead of manually writing the commentary text to generate the commentary video, the commentary video can be generated automatically, thereby further improving the generation efficiency of the commentary video.

The commentary video generation apparatus provided in the foregoing embodiment is illustrated with an example of division of the foregoing functional modules. In actual application, the functions may be allocated to and completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules, to implement all or some of the functions described above. In addition, the commentary video generation apparatus provided in the foregoing embodiment and the commentary video generation method embodiments belong to the same conception. For the specific implementation process, reference is made to the method embodiments, and details are not described herein again.

FIG.11is a structural block diagram of a server according to some embodiments. The server can be configured to implement a commentary video generation method performed by the server in the foregoing embodiments.

Specifically, the server1100includes a central processing unit (CPU)1101, a system memory1104that includes a random access memory (RAM)1102and a read-only memory (ROM)1103, and a system bus1105that connects the system memory1104and the central processing unit1101. The server1100further includes a basic input/output system (I/O System)1106that helps information transmission by the components in the server, and a mass storage device1107configured to store an operating system1113, an application program1114, and another program module1115.

The basic input/output system1106includes a display1108configured to display information and an input device1109such as a mouse and a keyboard for the user to input information. The display1108and the input device1109are both connected to the central processing unit1101through an input/output controller1110connected to the system bus1105. The basic input/output system1106may further include the input/output controller1110for receiving and processing input from a plurality of other devices such as a keyboard, a mouse, and an electronic stylus. Similarly, the input/output controller1110further provides output to a display screen, a printer, or other types of output devices.

The mass storage device1107is connected to the central processing unit1101through a mass storage controller (not shown) connected to the system bus1105. The mass storage device1107and an associated computer-readable storage medium provide non-volatile storage for the server1100. That is, the mass storage device1107may include a computer-readable medium (not shown) such as a hard disk or compact disc read-only memory (CD-ROM) drive.

Without loss of generality, the computer-readable storage medium may include a computer storage medium and a communication medium. The computer storage medium includes volatile and non-volatile, removable and non-removable media that are configured to store information such as computer-readable storage instructions, data structures, program modules, or other data, and that are implemented by using any method or technology. The computer storage medium includes a RAM, a ROM, an erasable programmable ROM (EPROM), an electrically-erasable programmable ROM (EEPROM), a flash memory or another solid-state memory technology, CD-ROM, a digital versatile disc (DVD) or another optical memory, tape cartridge, magnetic cassette, magnetic disk memory, or other magnetic storage devices. Certainly, those skilled in the art may learn that the computer storage medium is not limited to the above. The foregoing system memory1104and mass storage device1107may be collectively referred to as a memory.

The memory stores one or more programs, and the one or more programs are configured to be executed by one or more CPUs1101. The one or more programs include instructions used for implementing the foregoing method embodiments, and the CPU1101executes the one or more programs to implement the commentary video generation method provided in the foregoing method embodiments.

According to some embodiments, the server1100may further be connected, by using a network such as the Internet, to a remote computer on the network and run. That is, the server1100may be connected to a network1112by using a network interface unit1111connected to the system bus1105, or may be connected to another type of network or a remote server system (not shown) by using the network interface unit1111.

The memory further includes one or more programs that are stored in the memory. The one or more programs include a operation executed by the commentary server in the method provided by some embodiments.

Some embodiments also provides a computer-readable storage medium, the storage medium storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by a processor to implement the commentary video generation method described above.

According to some embodiments, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. a processor of a computer device reads the computer instructions from the computer-readable storage media, and executes the computer instructions, so that the computer device executes the commentary video generation method provided by the foregoing possible implementations.

Other embodiments will be apparent to a person skilled in the art from consideration of the specification and practice of the disclosure here. This disclosure is intended to cover any variation, use, or adaptive change of the disclosure. These variations, uses, or adaptive changes follow the general principles of the disclosure and include common general knowledge or common technical means in the art that are not disclosed herein. The specification and the embodiments are considered as merely exemplary, and the scope and spirit of the disclosure are pointed out in the following claims.

It is to be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope of the disclosure. The scope of the disclosure is subject only to the appended claims.