Method, device, equipment, medium and program product for generating broadcast content
By training a generative model using machine learning, voice broadcast content is generated based on the game state, solving the problem of low generation efficiency in existing technologies and achieving fast and efficient broadcast content generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT DIGITAL TIANJIN
- Filing Date
- 2022-10-08
- Publication Date
- 2026-05-22
AI Technical Summary
Current technologies have low efficiency in generating game voice broadcast content, requiring a large amount of manual production, resulting in a long production cycle.
Using machine learning technology, a broadcast content generation model is trained by pre-training the model and sample data. The model is then pre-trained and its parameters are optimized using sample data from the game domain to generate voice broadcast content that matches the game state.
It improves the efficiency of voice broadcast content generation, reduces the consumption of manual resources, and increases the speed and authenticity of broadcast content generation.
Smart Images

Figure CN116966565B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to a method, apparatus, device, medium, and program product for generating broadcast content. Background Technology
[0002] In the game, to enhance the player's gaming experience, voice broadcasting functionality will be added during gameplay.
[0003] In related technologies, the voice-over content in games needs to incorporate an understanding of the game. Therefore, the voice-over content in games is generated manually, that is, designers create the content according to the needs of different game scenarios. For example, at the start of a virtual match, the message might be "The match is about to begin, are you all ready?"; and when the main virtual character is defeated, the message might be "Oops, you didn't play well, try harder next time!"
[0004] However, the production cycle for content created in the above way is very long, and the content generation efficiency is low. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and program product for generating broadcast content, which can improve the efficiency of content generation during voice broadcasting. The technical solution is as follows:
[0006] On the one hand, a method for generating broadcast content is provided, the method comprising:
[0007] Acquire a first pre-trained model, first sample data, and second sample data. The first pre-trained model is a text generation model pre-trained with sample data from multiple domains. The model parameters of the first pre-trained model include a first parameter. The first sample data and the second sample data are sample data obtained from the game domain. The sample data includes data pairs corresponding to game status and broadcast content materials.
[0008] Configure the second parameter to be trained in the first pre-trained model;
[0009] The first parameters in the first pre-trained model are trained using the first sample data to obtain the second pre-trained model;
[0010] The second parameter in the second pre-trained model is trained using the second sample data to obtain the broadcast content generation model;
[0011] The broadcast content generation model is used to predict the content of the input target game state to obtain the target broadcast content, which is used to broadcast the target game when the target game is in the target game state.
[0012] On the other hand, a device for generating broadcast content is provided, the device comprising:
[0013] The acquisition module is used to acquire a first pre-trained model, first sample data, and second sample data. The first pre-trained model is a text generation model pre-trained with sample data from multiple domains. The model parameters of the first pre-trained model include a first parameter. The first sample data and the second sample data are sample data acquired from the game domain. The sample data includes data pairs corresponding to game status and broadcast content materials.
[0014] The configuration module is used to configure the second parameters to be trained in the first pre-trained model;
[0015] The first training module is used to train the first parameters in the first pre-trained model using the first sample data to obtain the second pre-trained model.
[0016] The second training module is used to train the second parameters in the second pre-trained model using the second sample data to obtain the broadcast content generation model.
[0017] The broadcast content generation model is used to predict the content of the input target game state to obtain the target broadcast content, which is used to broadcast the target game when the target game is in the target game state.
[0018] On the other hand, a computer device is provided, wherein the terminal includes a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, wherein the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the method for generating broadcast content as described in any of the embodiments of this application.
[0019] On the other hand, a computer-readable storage medium is provided, wherein at least one piece of program code is stored in the computer-readable storage medium, the program code being loaded and executed by a processor to implement the method for generating broadcast content as described in any of the embodiments of this application.
[0020] On the other hand, a computer program product or computer program is provided, which includes computer instructions 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, causing the computer device to perform the method for generating broadcast content as described in any of the above embodiments.
[0021] The technical solution provided in this application includes at least the following beneficial effects:
[0022] The method provided in this application generates voice broadcast content that matches the game state of the game application through a trained broadcast content generation model. Specifically, the broadcast content generation model is obtained by performing domain pre-training on a first pre-trained model capable of text generation using first sample data, resulting in a second pre-trained model that meets the prediction requirements of the game domain. Then, the second parameters of the second pre-trained model are fine-tuned using second sample data to train the broadcast content generation model. In other words, this broadcast content generation model is obtained by fine-tuning the pre-trained model using domain data corresponding to the target game, thus quickly obtaining the broadcast content generation model. This model can then be used to generate broadcast content based on the game state, accelerating the overall broadcast content generation process and improving the efficiency of broadcast content generation. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application;
[0025] Figure 2 This is a flowchart of a method for generating broadcast content provided in an exemplary embodiment of this application;
[0026] Figure 3 This is a schematic diagram of the second parameter configuration provided in an exemplary embodiment of this application;
[0027] Figure 4 This is a flowchart of a method for generating broadcast content provided in an exemplary embodiment of this application;
[0028] Figure 5 This is a flowchart illustrating the training process of a broadcast content generation model provided in an exemplary embodiment of this application.
[0029] Figure 6 This is a flowchart of a sample data generation method provided in an exemplary embodiment of this application;
[0030] Figure 7 This is a flowchart of a sample data generation method provided in an exemplary embodiment of this application;
[0031] Figure 8This is a schematic diagram illustrating the influencing factors during voice broadcasting provided in an exemplary embodiment of this application;
[0032] Figure 9 This is a schematic diagram of voice broadcasting of a related technology of this application;
[0033] Figure 10 This is a schematic diagram of a voice broadcast provided in an exemplary embodiment of this application;
[0034] Figure 11 This is a schematic diagram of a voice broadcast provided in an exemplary embodiment of this application;
[0035] Figure 12 This is a structural block diagram of a broadcast content generation device provided in an exemplary embodiment of this application;
[0036] Figure 13 This is a structural block diagram of a broadcast content generation device provided in an exemplary embodiment of this application;
[0037] Figure 14 This is a schematic diagram of the structure of a server provided in an exemplary embodiment of this application. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0039] First, a brief introduction to the terms used in the embodiments of this application:
[0040] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.
[0041] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.
[0042] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.
[0043] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.
[0044] Game voice broadcast: In order to enhance the richness of game content and help players better experience the game, voice broadcast function is added to game applications. This function can increase user stickiness to a certain extent.
[0045] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, smart customer service, vehicle networking, and intelligent transportation. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.
[0046] In this embodiment, machine learning is integrated into the generation process of voice broadcast content in the game, thereby improving the generation efficiency of voice broadcast content and reducing the consumption of manual resources when implementing voice broadcast content.
[0047] The following is an illustrative description of the voice broadcasting scenarios in which the method provided in the embodiments of this application is applied:
[0048] When players control virtual objects to participate in game content through a game application, the application provides a voice broadcast function. In addition to traditional fixed-content broadcasts, the voice broadcast function in this application also provides AI-based voice broadcasts. That is, AI is used to generate the broadcast content within the game application, giving players a sense of "real-life" companionship during gameplay. This improves both the efficiency and realism of the broadcast content production. For example, when a player defeats an enemy virtual object by controlling the main virtual object, the application automatically broadcasts the AI-generated message, "Awesome! Truly an invincible war god!"
[0049] Please refer to Figure 1 This diagram illustrates an implementation environment provided by an exemplary embodiment of this application. The computer system of this implementation environment includes: a terminal 110, a server 120, and a communication network 130.
[0050] Terminal 110 includes various forms of devices such as mobile phones, tablets, desktop computers, laptops, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. Illustratively, a target application runs on terminal 110, which can be a game application. Optionally, the game application can be any of the following: third-person shooter (TPS) games, first-person shooter (FPS) games, multiplayer online battle arena (MOBA) games, massively multiplayer online role-playing games (MMORPGs), strategy games, etc.
[0051] Server 120 is used to provide training and application functions for the broadcast content generation model. It is worth noting that the aforementioned server 120 can be a standalone physical server, 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 security, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0052] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Based on the cloud computing business model, cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0053] In some embodiments, the server 120 can also be implemented as a node in a blockchain system. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0054] Indicatively, terminal 110 and server 120 are connected via communication network 130, which can be a wired network or a wireless network, and is not limited here.
[0055] In some embodiments, server 120 obtains material content through the Internet and organizes it to obtain first sample data, and obtains game record data from terminal 110 corresponding to candidate accounts and organizes it to obtain second sample data.
[0056] In some embodiments, the server 120 trains a broadcast content generation model using a model training service based on the acquired first pre-trained model, first sample data, and second sample data. The training process includes configuring second parameters to be trained on the first pre-trained model, training the first parameters in the first pre-trained model using the first sample data to obtain a second pre-trained model, and training the second parameters in the second pre-trained model using the second sample data to obtain the broadcast content generation model.
[0057] Indicatively, after training the broadcast content generation model, the model training service in server 120 transmits the broadcast content generation model to the content generation service. The content generation service inputs the target game state into the broadcast content generation model and outputs the corresponding target broadcast content. Server 120 transmits the target broadcast content to terminal 110, and terminal 110 broadcasts the corresponding target broadcast content when the target game is in the target game state.
[0058] In other embodiments, server 120 may also transmit the trained broadcast content generation model to terminal 110, and terminal 110 configures the broadcast content generation model in the voice broadcast component of the target game, and uses the voice broadcast component to broadcast the corresponding target broadcast content according to the target game state of the target game.
[0059] Please refer to Figure 2 It illustrates a flowchart of a method for generating broadcast content according to an embodiment of this application. In this embodiment, the method is applied to, for example... Figure 1 In the server shown, the method includes:
[0060] Step 210: Obtain the first pre-trained model, the first sample data, and the second sample data.
[0061] Schematic illustration: The first pre-trained model described above is a text generation model pre-trained using sample data from multiple domains, and the model parameters of the first pre-trained model include a first parameter. In some embodiments, the first pre-trained model may be an open-source model directly obtained via the Internet.
[0062] In illustrative terms, the first and second sample data are sample data obtained from the game domain. In some embodiments, the first and second sample data are sample data adapted to the game domain corresponding to the target game, that is, sample data obtained through data mining of relevant content of the target game. In some embodiments, the sample granularity of the first sample data is lower than that of the second sample data; that is, the first sample data may be sample data obtained through coarse-grained data mining, while the second sample data may be sample data obtained through fine-grained data mining compared to the first sample data.
[0063] In some embodiments, the amount of data corresponding to the first sample data is greater than the amount of data corresponding to the second sample data. That is, the first sample data is sample data from a large-scale first sample set, and the second sample data is sample data from a small-sample second sample set.
[0064] In the embodiments of this application, the sample data used includes data pairs corresponding to game status and broadcast content materials. That is, the sample data is a data pair with game status as prompt and broadcast content materials as answer.
[0065] Step 220: Configure the second parameters to be trained on the first pre-trained model.
[0066] In some embodiments, the first pre-trained model includes at least one layer of Transformer, and for the Transformer, a corresponding prefix parameter is set, that is, a second parameter is set on each Transformer layer in the first pre-trained model.
[0067] Optionally, the second parameter mentioned above can be the second parameter corresponding to discrete prompts, and / or the second parameter mentioned above can be the second parameter corresponding to continuous prompts.
[0068] Indicative, such as Figure 3 The diagram illustrates a schematic of the second parameter configuration provided in an exemplary embodiment of this application. The first pre-trained model's Transformer 300 includes a first parameter 310, and a second parameter 320 is configured for the Transformer 300, including a second parameter 321 corresponding to discrete prompts and a second parameter 322 corresponding to continuous prompts.
[0069] In some embodiments, the first pre-trained model further includes an input layer, in which the second parameter is also configured synchronously.
[0070] Step 230: Train the first parameters in the first pre-trained model using the first sample data to obtain the second pre-trained model.
[0071] In some embodiments, the first sample data includes a first game state and a first broadcast content material corresponding to the first game state. The first game state is input into a first prediction model, and the corresponding predicted content is output. The first parameter is iteratively adjusted based on the difference between the predicted content and the first broadcast content material to obtain a second training model.
[0072] Specifically, when iteratively adjusting the first parameter based on the difference between the predicted content and the first broadcast content material, the first loss function is used to determine the loss value between the predicted content and the first broadcast content material, and the first parameter is adjusted based on the loss value.
[0073] Optionally, the first loss function can be implemented as at least one of the following: cross-entropy loss function, mean squared error loss function, log loss function, etc.
[0074] In this embodiment of the application, the first sample data may be sample data in the game domain corresponding to the target game. Therefore, the first parameters in the first pre-trained model are pre-trained a second time using the first sample data, that is, the first parameters are adapted to the text generation task corresponding to the target game, thereby further enhancing the domain knowledge of the target game expressed by the model.
[0075] In some embodiments, when performing domain pre-training on the first pre-trained model, at least one pre-training method such as GPT, GPT-2, and GPT-3 may be used. The model structure of the first pre-trained model corresponds to the pre-training method used. For example, when using the GPT-2 pre-training method, the first pre-trained model may include at least one Transformer layer.
[0076] Step 240: Train the second parameters in the second pre-trained model using the second sample data to obtain the broadcast content generation model.
[0077] In some embodiments, the second sample data includes a second game state and second broadcast content material corresponding to the second game state. The second game state is input into a second pre-trained model, and the output is a second predicted content. The second parameters are iteratively adjusted based on the difference between the second predicted content and the second broadcast content material to obtain a broadcast content generation model.
[0078] Specifically, when iteratively adjusting the second parameter based on the difference between the second predicted content and the second broadcast content material, the loss value between the predicted content and the second broadcast content material is determined by the second loss function, and the second parameter is adjusted based on the loss value.
[0079] Optionally, the second loss function can be implemented as at least one of the following: cross-entropy loss function, mean squared error loss function, log loss function, etc.
[0080] In this embodiment of the application, the second sample data is sample data in the game domain corresponding to the target game. Therefore, the second parameter in the second prediction model is fine-tuned by using the second sample data, so that the final broadcast content generation model can further explore the knowledge in the game domain corresponding to the target game.
[0081] In some embodiments, the training process of training the second parameters in the second pre-trained model using the second sample data to obtain the broadcast content generation model can be implemented as prefix-tuning the learning paradigm.
[0082] As an illustration, the trained broadcast content generation model is used to predict the content of the input target game state to obtain the target broadcast content, which is then used for voice broadcasting when the target game is in the target game state.
[0083] Optionally, after training, the broadcast content generation model is configured in the content generation service on the server. In one example, the content generation service inputs the game state into the broadcast content generation model, and then sends the output broadcast content to the terminal. When the game application corresponding to the target game on the terminal determines that the game state is matched, it plays the aforementioned broadcast content.
[0084] In some embodiments, the server inputs the generated broadcast content into a manual filtering service, which performs secondary manual filtering to ensure the reliability of the broadcast content used.
[0085] In summary, the broadcast content generation method provided in this application generates voice broadcast content matching the game state corresponding to the game application through a trained broadcast content generation model. Specifically, the broadcast content generation model is obtained by performing domain pre-training on a first pre-trained model capable of text generation using first sample data, resulting in a second pre-trained model that meets the prediction requirements of the game domain. Then, the second parameters in the second pre-trained model are fine-tuned using second sample data to train the broadcast content generation model. In other words, the broadcast content generation model is obtained by fine-tuning the pre-trained model using domain data corresponding to the target game, thus quickly obtaining the broadcast content generation model. This model can then be used to generate broadcast content based on the game state, accelerating the overall broadcast content generation process and improving the efficiency of broadcast content generation.
[0086] Please refer to Figure 4 The diagram illustrates a flowchart of a method for generating broadcast content provided in an exemplary embodiment of this application. In this embodiment, considering that the first pre-trained model, as an open-source pre-trained model, possesses a certain text generation capability, few-shot learning can also be used to mine broadcast content for the first pre-trained model. The method includes:
[0087] Step 410: Obtain the first pre-trained model, the first sample data, and the second sample data.
[0088] In this embodiment of the application, the first pre-trained model can be an open-source model obtained directly from the Internet, and the first pre-trained model can realize the text generation function.
[0089] To illustrate, the first sample data and the second sample data are sample data obtained from the gaming field. In this embodiment, the first sample set corresponding to the first sample data is a large-scale sample set, and the second sample set corresponding to the second sample data is a small-sample sample set.
[0090] Step 420: Configure the second parameters to be trained on the first pre-trained model.
[0091] Optionally, the second parameter mentioned above can be the second parameter corresponding to a discrete prompt, and / or the second parameter mentioned above can be the second parameter corresponding to a continuous prompt.
[0092] Step 431: Train the second parameters of the first pre-trained model using the second sample data to obtain the candidate broadcast content generation model.
[0093] In this embodiment of the application, in order to utilize the rich knowledge contained in the open-source pre-trained model, the second sample data is used to achieve few-sample learning, thereby optimizing the second parameter.
[0094] Schematic illustration: The second sample data includes a second game state and corresponding second broadcast content material. The second game state is input into the first pre-trained model, and the corresponding predicted content is output. Based on the difference between the predicted content and the second broadcast content material, the second parameter is iteratively adjusted to obtain the candidate broadcast content generation model.
[0095] Specifically, when iteratively adjusting the second parameter based on the difference between the predicted content and the second broadcast content material, the loss value between the predicted content and the second broadcast content material is determined by the third loss function, and the second parameter is adjusted based on the loss value.
[0096] Optionally, the third loss function mentioned above can be implemented as at least one of the following: cross-entropy loss function, mean squared error loss function, log loss function, etc.
[0097] In some embodiments, the training process of training the second parameters in the first pre-trained model using the second sample data to obtain the candidate broadcast content generation model can be implemented as prefix-tuning the learning paradigm.
[0098] Step 432: Input the first target game state into the candidate broadcast content generation model to predict the content and obtain the first target broadcast content.
[0099] In some embodiments, when a candidate broadcast content generation model is obtained, the first target game state is input into the candidate broadcast content generation model for content prediction, thereby generating the first target broadcast content.
[0100] In some embodiments, the first target broadcast content can be directly applied to the voice broadcast function in the downstream target game; or, the first target broadcast content can be filtered by a specified filtering method and then applied to the voice broadcast function in the downstream target game.
[0101] In some embodiments, to reduce server resource overhead, after obtaining the candidate broadcast content generation model, the candidate broadcast content generation model can be evaluated. If the candidate broadcast content generation model meets the requirements for broadcast content generation, step 440 is not executed. If the candidate broadcast content generation model does not meet the requirements for broadcast content generation, step 440 is executed.
[0102] In one example, the evaluation is performed by judging the richness of the content generated by the candidate broadcast content generation model on the test set. Illustratively, a test game state set is obtained, which includes multiple test game states; these multiple test game states are input into the candidate broadcast content generation model to obtain a test broadcast content material set, which includes test broadcast content materials corresponding to each test game state; based on the similarity between the test broadcast content materials, the material richness corresponding to the test broadcast content material set is determined; in response to the material richness reaching a preset richness threshold, the candidate broadcast content generation model is determined as the broadcast content generation model; in response to the material richness not reaching the preset richness threshold, step 440 is executed.
[0103] In calculating the similarity between test broadcast content materials, text features can be extracted from the test broadcast content materials to obtain corresponding text feature vectors. The similarity between the test broadcast content materials can then be determined by calculating the vector similarity between these text feature vectors. Optionally, at least one of the following distance data—Euclidean distance, cosine distance, Mahalanobis distance, Hamming distance, etc.—can be used to indicate the similarity between text feature vectors.
[0104] To illustrate, after determining the similarity between test broadcast content materials, test broadcast content materials with a similarity higher than the first similarity threshold are deduplicated, and the material richness is determined based on the proportion of deduplicated test broadcast content materials in all test broadcast content materials.
[0105] In other embodiments, manual review can be used to determine whether the test broadcast content material set meets the test standards, thereby determining whether the candidate broadcast content generation model meets the content generation requirements.
[0106] Step 440: Train the first parameter in the candidate broadcast content generation model using the first sample data to obtain the second pre-trained model.
[0107] One approach is to mine the knowledge contained in open-source pre-trained models. Specifically, as indicated in step 431 above, the second parameters configured in the first pre-trained model are directly tuned using second sample data to adapt to the game domain corresponding to the target game. This method can effectively utilize the knowledge contained in the pre-trained model when data resources are scarce. However, in some cases, due to limitations in the type of training data, the domain-related knowledge contained in the open-source pre-trained model is always limited and cannot meet the demand for continuously producing rich and diverse voice broadcast content. Therefore, a complete data-to-training pathway is constructed to achieve continuous knowledge replenishment. That is, the first parameters in the candidate broadcast content generation model are further pre-trained using the first sample data for domain-specific purposes.
[0108] To illustrate, the first sample data includes a first game state and a first broadcast content material corresponding to the first game state. The first game state is input into the candidate broadcast content generation model, and the output is the first predicted content. Based on the difference between the first predicted content and the first broadcast content material, the first parameters are iteratively adjusted to obtain the second training model.
[0109] Specifically, when iteratively adjusting the first parameter based on the difference between the first predicted content and the first broadcast content material, the loss value between the first predicted content and the first broadcast content material is determined by the fourth loss function, and the first parameter is adjusted based on the loss value.
[0110] Optionally, the fourth loss function mentioned above can be implemented as at least one of the following: cross-entropy loss function, mean squared error loss function, log loss function, etc.
[0111] In other embodiments, when the candidate broadcast content generation model does not meet the requirements for broadcast content generation, the first parameters in the original first pre-trained model can be trained directly using the first sample data to obtain the second pre-trained model.
[0112] Step 451: Train the second parameter in the second pre-trained model using the second sample data to obtain the broadcast content generation model.
[0113] In some embodiments, the second sample data includes a second game state and second broadcast content material corresponding to the second game state. The second game state is input into a second pre-trained model, and the output is a second predicted content. The second parameters are iteratively adjusted based on the difference between the second predicted content and the second broadcast content material to obtain a broadcast content generation model.
[0114] Step 452: Input the second target game state into the broadcast content generation model to predict the content and obtain the second target broadcast content.
[0115] To illustrate, after training the broadcast content generation model, the second target game state is input into the broadcast content generation model for content prediction, thereby generating the second target broadcast content.
[0116] Optionally, the first target game state and the second target game state can be the same target game state; or, the first target game state and the second target game state can be different target game states.
[0117] In some embodiments, the first target game state and the second target game state may be target game states randomly sampled from the same game state library.
[0118] In some embodiments, when both the first target broadcast content and the second target broadcast content are applied to the downstream voice broadcast function, the first target broadcast content and the second target broadcast content can be deduplicated. Illustratively, in response to the content similarity between the first target broadcast content and the second target broadcast content being higher than a second similarity threshold, deduplication processing is performed on the first target broadcast content and the second target broadcast content.
[0119] Indicative, such as Figure 5 The diagram illustrates a training flowchart of a broadcast content generation model provided in an exemplary embodiment of this application. The first pre-trained model 510 first performs a first prefix-tuning 503 using the second sample data 502 to obtain a candidate broadcast content generation model 520. The candidate broadcast content generation model 520 is then pre-trained in the domain using the first sample data 501 to obtain a second pre-trained model 530. The second pre-trained model 530 then performs a second prefix-tuning 504 using the second sample data 502, ultimately obtaining the broadcast content generation model 540.
[0120] In summary, the broadcast content generation method provided in this application generates voice broadcast content matching the game state corresponding to the game application through a trained broadcast content generation model. Specifically, the broadcast content generation model is obtained by performing domain pre-training on a first pre-trained model capable of text generation using first sample data, resulting in a second pre-trained model that meets the prediction requirements of the game domain. Then, the second parameters in the second pre-trained model are fine-tuned using second sample data to train the broadcast content generation model. In other words, the broadcast content generation model is obtained by fine-tuning the pre-trained model using domain data corresponding to the target game, thus quickly obtaining the broadcast content generation model. This model can then be used to generate broadcast content based on the game state, accelerating the overall broadcast content generation process and improving the efficiency of broadcast content generation.
[0121] In this embodiment, a candidate broadcast content generation model is first obtained by optimizing the second parameter of the first pre-trained model. The target broadcast content is then mined using the candidate broadcast content generation model. Next, the candidate broadcast content generation model is further pre-trained in the domain to obtain a second pre-trained model. The second parameter of the second pre-trained model is then optimized to obtain a broadcast content generation model. The target broadcast content is then mined using the broadcast content generation model, thereby improving the diversity of broadcast content generation.
[0122] Please refer to Figure 6 This document illustrates a flowchart of a sample data generation method provided in an exemplary embodiment of this application. In this embodiment, the method for obtaining the first sample data is illustrated; that is, obtaining the first sample data in steps 210 and 410 can be implemented as steps 610 to 630. The method includes:
[0123] Step 610: Obtain the material content corresponding to the target game.
[0124] Optionally, the aforementioned materials include at least one of video materials, text materials, audio materials, and image materials.
[0125] In some embodiments, data strongly related to the target game's domain, such as game videos and strategy articles, from publicly available web pages are collected to serve as the aforementioned content materials. It is worth noting that before acquiring the aforementioned content materials, the server has obtained authorization from the publishing account corresponding to the content materials and has informed the publishing account of the purpose of the content materials.
[0126] Step 620: Convert the source material into text content to be processed.
[0127] In some embodiments, when the content is video material, the audio content in the video material is extracted, and the extracted audio content is processed into speech-to-text to obtain the text content to be processed corresponding to the video material; or, the video material is processed into frames to obtain multiple image frames, and the image frames are processed into optical character recognition (OCR) to obtain the text content to be processed corresponding to the video material.
[0128] In some embodiments, when the content is text, the text can be directly used as the text content to be processed.
[0129] In some embodiments, when the content is audio material, the audio material is processed to convert speech to text, thereby obtaining the text content to be processed corresponding to the audio material.
[0130] In some embodiments, when the content is an image, OCR processing is performed on the image to obtain the corresponding text content to be processed.
[0131] Step 630: Perform content mining on the text to be processed to determine the first game state and the first broadcast content material that make up the first sample data.
[0132] Schematic, the aforementioned first sample data is a data pair consisting of a first game state and a first broadcast content material. Optionally, the aforementioned data pair can be constructed in at least one of the following ways:
[0133] The first method involves segmenting the text content to be processed using punctuation marks to obtain multiple candidate sentences; based on the contextual order among the multiple candidate sentences, the first game state and the first broadcast content material are determined from the multiple candidate sentences.
[0134] Indicatively, during the process of determining the first game state and the first broadcast content material based on the contextual order between candidate sentences, the i-th candidate sentence can be determined as the first game state, and the (i+1)-th candidate sentence can be determined as the first broadcast content material, where the (i+1)-th candidate sentence is the next sentence after the i-th candidate sentence. That is, the prompt-answer pairs in the first sample data are constructed using the preceding and following sentences.
[0135] The second method: In response to the existence of a first text content in the text content to be processed that matches a candidate game state in the game state library, a second text content that has a response relationship with the first text content is identified from the text content to be processed; the first text content is determined as the first game state, and the second text content is determined as the first broadcast content material.
[0136] Among them, the candidate game states in the aforementioned game state library can be high-frequency or common game states that are manually compiled, thereby extracting the first broadcast content material corresponding to the candidate game states from the text content to be processed.
[0137] Indicatively, the process of determining the first text content that matches the candidate game state in the text content to be processed can be implemented by obtaining the candidate feature vector corresponding to the candidate game state and the text content feature vector corresponding to the text content to be processed. When there is a vector segment in the text content feature vector whose feature similarity with the above candidate feature vector is higher than the third similarity threshold, the text content corresponding to the vector segment is determined as the first text content.
[0138] The third method: Based on the semantics corresponding to the text content to be processed, determine at least one third text content as key content; take the third text content as the first game state, and take the fourth text content corresponding to the third text content as the first broadcast content material, and take the fourth text content as the next text content of the third text content.
[0139] In one example, prompt-answer pairs in the first sample data are constructed through key sentence mining. Illustratively, at least one key sentence in the text to be processed is determined based on the semantics corresponding to the text content. This key sentence is used as the first game state, and the next sentence is used as the first broadcast content material.
[0140] In some embodiments, when determining the key sentences corresponding to the text content to be processed based on the semantics of the text content, the text content to be processed can be segmented into sentences according to punctuation to obtain multiple candidate sentences. These candidate sentences are then clustered according to semantics, and the candidate sentences corresponding to the cluster centers of each cluster are taken as the key sentences. Optionally, the above clustering method can be implemented as at least one of K-means, mean-shift clustering, density-based clustering, etc.
[0141] In summary, the sample data generation method provided in this application obtains a large amount of material content corresponding to the target game and performs content mining on the text content corresponding to the material content to obtain data pairs corresponding to the first game state and the first broadcast content material. This allows for the rapid acquisition of a large amount of sample data, which can then be applied to the domain pre-training process of the model described above, thereby further enhancing the model's domain knowledge.
[0142] Please refer to Figure 7 This document illustrates a flowchart of a sample data generation method provided in an exemplary embodiment of this application. In this embodiment, the method for obtaining the second sample data is illustrated; that is, obtaining the second sample data in steps 210 and 410 can be implemented as steps 710 to 730. The method includes:
[0143] Step 710: Obtain the game record data of the candidate account in the target game. The game record data includes voice data and the status data corresponding to the voice data.
[0144] In this embodiment of the application, a second sample data is generated by generating game record data corresponding to the candidate account. That is, a small amount of sample data is obtained by mining the relevant game records of the candidate account during the process of playing the target game, so as to be used for training the second parameter.
[0145] Optionally, when the trained broadcast content generation model is used to generate broadcast content for all accounts in the target game, the above-mentioned candidate accounts can be multiple accounts used as sample accounts; when the trained broadcast content generation model is a personalized model for a specific account, the above-mentioned candidate accounts are the specified target accounts, that is, the broadcast content generation model is used to generate broadcast content corresponding to the target account.
[0146] To illustrate, the aforementioned voice data is used to indicate the voice input by the candidate account during the operation of the target game, and the status data is used to indicate the game status of the target game when the candidate account inputs the voice data.
[0147] It is worth noting that the terminal has obtained authorization from the candidate account before recording the voice input and corresponding game status of the candidate account during the operation of the target game, and before the server obtains the above data.
[0148] Step 720: Convert the voice data into second broadcast content material and convert the status data into a second game status.
[0149] Optionally, the method for generating the second broadcast content material and the second game state can be implemented in at least one of the following ways:
[0150] The first method involves converting the voice data into text to obtain the second broadcast content material; based on the content type corresponding to the second broadcast content material, obtaining a game state construction template that matches the content type; and obtaining the second game state based on the state data and the state construction template.
[0151] That is, by using the text content corresponding to the voice data during the operation of the target game as the second broadcast content material, for example, if the player says "Let's go to the research institute" during the game, the text content corresponding to this sentence can be used as the second broadcast content material (answer), and the state data at that time is used to generate the second game state.
[0152] Furthermore, based on the content type corresponding to the second broadcast content material, a game state construction template corresponding to the content type can be determined, thereby obtaining the second game state through state data and the state construction template.
[0153] In one example, the correspondence between content type and game state construction template can also be implemented as at least one of the following:
[0154] 1. Strategy guidance type, voice data such as "Let's go get the item!"; status construction templates such as "Based on status data, predict the player's next move:";
[0155] 2. Status descriptions, such as voice data like "Someone has already searched this place."; status construction templates like "Based on status data, the current game situation is analyzed as follows:";
[0156] 3. Other types, such as voice data like "Has anyone been to that building ahead?"; and state construction templates like "Based on state data, say anything to the player:".
[0157] The second method involves obtaining candidate state rules, which are preset game states; in response to the existence of a specified game state in the state data that matches the candidate state rules, the specified game state is used as the second game state; and the voice data corresponding to the state data is converted into the second broadcast content material.
[0158] That is, the system determines whether the status data matches the set candidate status rules by matching rules. If it matches, the specified game status corresponding to the status data is taken as the second game status, and the text content converted from the voice data corresponding to the status data is taken as the second broadcast content material.
[0159] For example, when the status data includes a game state indicating that a teammate's virtual object has been knocked down, and this state matches the knocked-down rule in the candidate status rules, then the "teammate's virtual object has been knocked down" game state is taken as the second game state. The corresponding voice content "Number 2 has been knocked down, quickly use smoke!" in the voice data under this game state is taken as the second broadcast content material.
[0160] In some embodiments, the state data can be preprocessed to generate descriptive text that facilitates subsequent processing. In this embodiment, since the generated second sample data is used as a few samples to train the second parameters of the model mentioned above, the second game state corresponding to the second sample data can be represented by fine-grained "events" in the target game. These "events" are represented by structured data, such as the event representing the "lap" state in the target game, as shown in Table 1.
[0161] Table 1
[0162]
[0163] As shown in the table above, the events are represented by structured data at a relatively fine-grained level. Such data featureization typically relies heavily on feature engineering and requires significant human intervention. In this embodiment, we consider describing each event using natural language and allowing the model to learn the information it contains. The advantage of this approach is reduced human intervention while leveraging the representational capabilities of deep learning. Furthermore, considering that the script corresponding to the broadcast content is itself a form of natural language representation, the fact that the player's game state and the broadcast content are in the same form space may be more conducive to learning.
[0164] Therefore, as Figure 8 The diagram illustrates an exemplary embodiment of this application, illustrating 800 influencing factors during voice broadcasting. These influencing factors 800 include: a first factor "who" 810, which refers to characters in the virtual environment of the target game that affect the game state, such as the presence and number of hostile virtual objects; a second factor "what" 820, which refers to what the controlling virtual object possesses, such as skills, health points, virtual item resources, or what happens in the virtual environment, such as attacks, attribute reductions, support virtual objects, or item pickup; a third factor "where" 830, which refers to the location of the controlling virtual object, such as whether it is outside the safe zone or the terrain of its location; and a fourth factor "time" 840, which refers to the current time of the target game, such as the current match time, the current match duration, or real-world time.
[0165] Schematic illustration: Based on the influencing factors summarized above, the game state of an account while playing a target game can be described in natural language using rules. In one example, the game state is generated using predefined state description text. For instance, the predefined state description text can be implemented as follows:
[0166] "The account's highest historical rank is __, current rank this season is __, number of matches played is __, rating is __, and K / D is __. Below is a screenshot of the account's game: Currently in the game __, the center of the __th circle is located __, the character is in __, in the safe zone __. His protective gear is __, items are __, and he has one __ and one __. His status is __. Current situation: __. Based on the above information, predict the account's next move will be:"
[0167] Here, "__" represents the content to be filled in based on the status data. In one example, the description text obtained by filling in the status data is as follows:
[0168] "This account's highest historical rank is Ace 4-star, current rank this season is Crown, with 275 matches played, an S rating, and a K / D ratio of 2.41. Below is a screenshot of this account's game: In the late game, the fourth circle is located in the northeastern wilderness of G Town, and the character is on the west side of the ruins, within the safe zone. His protective gear is decent, and his items are good, including an SKS marksman rifle and another SKS marksman rifle. His condition is acceptable. He has acquired an energy drink. Based on the above information, the player's next move is predicted to be:"
[0169] Step 730: Obtain the second sample data based on the second game state and the second broadcast content material.
[0170] To illustrate, once the second game state and the second broadcast content material are determined, the second game state and its corresponding second broadcast content material are combined to obtain the second sample data.
[0171] In summary, the sample content generation method provided in this application generates a small amount of second sample data that closely matches the actual language used by players through game record data. This second sample data is then applied to the few-shot learning of the second parameter, enabling the model to complete the training of the second parameter through few-shot learning without needing to optimize all parameters of the entire model. This allows the downstream game domain's broadcast content generation task to "accommodate" the pre-trained model, avoiding inconsistencies between the pre-training task and the downstream task, improving the overall training efficiency of the model, and ensuring the content quality and usability of the generated broadcast content.
[0172] In illustrative terms, taking an application in a shooting game as an example, the method in this application embodiment also includes at least the following effects:
[0173] First, the method provided in this application embodiment can increase the semantic content richness of the broadcast content.
[0174] like Figure 9 As shown, this illustrates a schematic diagram of voice broadcasting in related technologies. In the virtual environment interface 900, when the main virtual object is outside the signal circle, the terminal broadcasts the corresponding voice content 910: "The circle is active! You can consider entering the circle!"
[0175] like Figure 10 As shown, this illustrates a schematic diagram of voice broadcasting provided in an exemplary embodiment of this application. In the virtual environment interface 1000, when the main virtual object is outside the signal circle and it is determined that the main virtual object is not wearing any virtual items, the terminal broadcasts the voice content 1010: "I didn't pick up any items while circling, and even if I enter the circle, I'll only be able to move around and collect resources. I suggest you circle around and collect resources. Don't rush to enter the circle!"
[0176] That is, the speech content generated by the broadcast content generation method provided in this application embodiment is richer in semantic content than that expressed by related technologies. It not only provides prompts and suggestions, but also provides corresponding reasons, and the speech content is more complete.
[0177] Second, the method provided in this application embodiment can increase the richness of the broadcast content in different scenarios.
[0178] Since the broadcast content is generated by a trained broadcast content generation model that can automatically generate corresponding broadcast content based on the input game state, in downstream applications, different events in the game scene can be combined to obtain diverse game states, thereby generating corresponding broadcast content. This makes the broadcast content no longer limited to fixed scenarios and increases the scene richness of the broadcast content.
[0179] For example, when a player controls the main virtual character to defeat an enemy virtual character with their fists, the voiceover might say, "One-Punch Man? Looks pretty awesome!" Figure 11 As shown, when the virtual environment interface 1100 displays the main virtual object 1101 in a seaside scene, the voice message 1102 is broadcast: "When you are at the seaside, be sure to listen carefully to the sound of the waves and the footsteps of the enemies on the shore to prevent a sudden attack by the enemy."
[0180] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user-related data (such as game record data of candidate accounts). These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their relevant data is being collected. This ensures that the application only begins the steps related to collecting user-related data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without receiving confirmation from the user), the steps to collect user-related data end, meaning no user-related data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0181] Please refer to Figure 12 The diagram illustrates a structural block diagram of a broadcast content generation apparatus according to an exemplary embodiment of this application. The apparatus includes the following modules:
[0182] The acquisition module 1210 is used to acquire a first pre-trained model, first sample data and second sample data. The first pre-trained model is a text generation model pre-trained with sample data from multiple domains. The model parameters of the first pre-trained model include a first parameter. The first sample data and the second sample data are sample data acquired from the game domain. The sample data includes data pairs corresponding to game status and broadcast content materials.
[0183] Configuration module 1220 is used to configure the second parameters to be trained in the first pre-trained model;
[0184] The first training module 1230 is used to train the first parameters in the first pre-trained model using the first sample data to obtain a second pre-trained model.
[0185] The second training module 1240 is used to train the second parameters in the second pre-trained model using the second sample data to obtain the broadcast content generation model.
[0186] The broadcast content generation model is used to predict the content of the input target game state to obtain the target broadcast content, which is used to broadcast the target game when the target game is in the target game state.
[0187] In some alternative embodiments, such as Figure 13 As shown, the device further includes:
[0188] The third training model 1250 is used to train the second parameters of the first pre-trained model using the second sample data to obtain a candidate broadcast content generation model.
[0189] The first training module 1230 is further configured to train the first parameters in the candidate broadcast content generation model using the first sample data to obtain the second pre-trained model.
[0190] In some optional embodiments, the acquisition module 1210 is further configured to acquire a test game state set, the test game state set including multiple test game states;
[0191] The device further includes:
[0192] The determining module 1260 is used to input the multiple test game states into the candidate broadcast content generation model to obtain a test broadcast content material set, wherein the test broadcast content material set includes test broadcast content materials corresponding to each test game state; based on the similarity between the test broadcast content materials, the material richness corresponding to the test broadcast content material set is determined; in response to the material richness reaching a preset richness threshold, the candidate broadcast content generation model is determined as the broadcast content generation model;
[0193] The first training module 1230 is further configured to, in response to the fact that the richness of the material does not reach a preset richness threshold, train the first parameter in the candidate broadcast content generation model using the first sample data to obtain the second pre-trained model.
[0194] In some optional embodiments, the first sample data includes a first game state and a first broadcast content material corresponding to the first game state;
[0195] The first training module 1230 is further configured to input the first game state into the candidate broadcast content generation model and output the first predicted content; and to iteratively adjust the first parameter based on the difference between the first predicted content and the first broadcast content material to obtain the second pre-trained model.
[0196] In some optional embodiments, the acquisition module 1210 further includes:
[0197] The acquisition unit 1211 is used to acquire the material content corresponding to the target game, wherein the material content includes at least one of video material, text material, audio material, and image material;
[0198] The conversion unit 1212 is used to convert the material content into text content to be processed;
[0199] The determining unit 1213 is used to perform content mining on the text content to be processed, and to determine the first game state and the first broadcast content material that make up the first sample data.
[0200] In some optional embodiments, the determining unit 1213 is further configured to segment the text content to be processed by punctuation to obtain multiple candidate sentences; determine the first game state and the first broadcast content material from the multiple candidate sentences according to the contextual order between the multiple candidate sentences; or, in response to the existence of a first text content in the text content to be processed that matches a candidate game state in the game state library, identify a second text content in the text content to be processed that has a response relationship with the first text content; determine the first text content as the first game state and the second text content as the first broadcast content material; or, based on the semantics corresponding to the text content to be processed, determine at least one third text content in the text content to be processed as key content; determine the third text content as the first game state and the fourth text content corresponding to the third text content as the first broadcast content material, wherein the fourth text content is the next text content of the third text content.
[0201] In some optional embodiments, the second sample data includes a second game state and second broadcast content material corresponding to the second game state;
[0202] The second training module 1240 is further configured to input the second game state into the second pre-trained model and output the second predicted content; and to iteratively adjust the second parameter based on the difference between the second predicted content and the second broadcast content material to obtain the broadcast content generation model.
[0203] In some optional embodiments, the acquisition unit 1211 is further configured to acquire game record data of the candidate account in the target game, the game record data including voice data and status data corresponding to the voice data, the voice data being used to indicate the voice input by the candidate account during the operation of the target game, and the status data being used to indicate the game status of the target game when the candidate account inputs the voice data;
[0204] The conversion unit 1212 is also used to convert the voice data into the second broadcast content material and to convert the status data into the second game status;
[0205] The determining unit 1213 is further configured to obtain the second sample data based on the second game state and the second broadcast content material.
[0206] In some optional embodiments, the conversion unit 1212 is further configured to convert the voice data into text to obtain the second broadcast content material; obtain a game state construction template matching the content type based on the content type corresponding to the second broadcast content material; and obtain the second game state based on the state data and the state construction template.
[0207] In some optional embodiments, the conversion unit 1212 is further configured to acquire candidate state rules, the candidate state rules being preset game states; in response to the existence of a specified game state in the state data that matches the candidate state rules, the specified game state is used as the second game state; and the voice data corresponding to the state data is converted into the second broadcast content material.
[0208] In summary, the broadcast content generation apparatus and method provided in this application generate voice broadcast content matching the game state corresponding to the game application through a trained broadcast content generation model. Specifically, the broadcast content generation model is obtained by performing domain pre-training on a first pre-trained model capable of text generation using first sample data, resulting in a second pre-trained model that meets the prediction requirements of the game domain. Then, the second parameters in the second pre-trained model are fine-tuned using second sample data to train the broadcast content generation model. In other words, the broadcast content generation model is obtained by fine-tuning the pre-trained model using domain data corresponding to the target game, thus quickly obtaining the broadcast content generation model. This allows the broadcast content to be generated based on the game state, accelerating the overall broadcast content generation process and improving the efficiency of broadcast content generation.
[0209] It should be noted that the broadcast content generation device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the broadcast content generation device and the broadcast content generation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0210] Figure 14 This illustration shows a schematic diagram of the structure of a server provided in an exemplary embodiment of this application. Specifically, it includes the following structure.
[0211] Server 1400 includes a Central Processing Unit (CPU) 1401, a system memory 1404 including Random Access Memory (RAM) 1402 and Read Only Memory (ROM) 1403, and a system bus 1405 connecting the system memory 1404 and the CPU 1401. Server 1400 also includes a mass storage device 1406 for storing an operating system 1413, application programs 1414, and other program modules 1415.
[0212] Mass storage device 1406 is connected to central processing unit 1401 via a mass storage controller (not shown) connected to system bus 1405. Mass storage device 1406 and its associated computer-readable media provide non-volatile storage for server 1400. That is, mass storage device 1406 may include computer-readable media (not shown) such as hard disk or compact disc read-only memory (CD-ROM) drives.
[0213] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other solid-state memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the above-mentioned types. The system memory 1404 and mass storage device 1406 described above can be collectively referred to as memory.
[0214] According to various embodiments of this application, server 1400 can also be connected to a remote computer on a network, such as the Internet. That is, server 1400 can be connected to network 1412 via network interface unit 1411 connected to system bus 1405, or it can also use network interface unit 1411 to connect to other types of networks or remote computer systems (not shown).
[0215] The aforementioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.
[0216] Embodiments of this application also provide a computer device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the method for generating broadcast content provided in the above-described method embodiments. Optionally, the computer device may be a terminal or a server.
[0217] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the method for generating broadcast content provided in the above-described method embodiments.
[0218] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions 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, causing the computer device to perform any of the broadcast content generation methods described in the above embodiments.
[0219] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0220] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0221] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for generating broadcast content, characterized in that, The method includes: Acquire a first pre-trained model, first sample data, and second sample data. The first pre-trained model is a text generation model pre-trained with sample data from multiple domains. The model parameters of the first pre-trained model include a first parameter. The first sample data and the second sample data are sample data obtained from the game domain. The sample data includes data pairs corresponding to game status and broadcast content materials. Configure the second parameter to be trained in the first pre-trained model; The second parameters of the first pre-trained model are trained using the second sample data to obtain a candidate broadcast content generation model. Obtain a test game state set, which includes multiple test game states; The multiple test game states are input into the candidate broadcast content generation model to obtain a test broadcast content material set, which includes test broadcast content materials corresponding to each test game state. Based on the similarity between the test broadcast content materials, the richness of the materials corresponding to the test broadcast content material set is determined; In response to the material richness reaching a preset richness threshold, the candidate broadcast content generation model is determined as the broadcast content generation model; In response to the fact that the richness of the material does not reach the preset richness threshold, the first parameter in the candidate broadcast content generation model is trained using the first sample data to obtain a second pre-trained model; The second parameter in the second pre-trained model is trained using the second sample data to obtain the broadcast content generation model; The broadcast content generation model is used to predict the content of the input target game state to obtain the target broadcast content, which is used to broadcast the target game when the target game is in the target game state.
2. The method according to claim 1, characterized in that, The first sample data includes a first game state and a first broadcast content material corresponding to the first game state; The step of training the first parameters in the candidate broadcast content generation model using the first sample data to obtain the second pre-trained model includes: The first game state is input into the candidate broadcast content generation model, and the first predicted content is output. The first parameter is iteratively adjusted based on the difference between the first predicted content and the first broadcast content material to obtain the second pre-trained model.
3. The method according to claim 2, characterized in that, The method further includes: Obtain the material content corresponding to the target game, wherein the material content includes at least one of video material, text material, audio material, and image material; The material content is converted into text content to be processed; Content mining is performed on the text content to be processed to determine the first game state and the first broadcast content material that make up the first sample data.
4. The method according to claim 3, characterized in that, The step of performing content mining on the text content to be processed to determine the first game state and the first broadcast content material that make up the first sample data includes: The text content to be processed is segmented by punctuation marks to obtain multiple candidate sentences; the first game state and the first broadcast content material are determined from the multiple candidate sentences according to the contextual order among them. or, In response to the presence of a first text content in the text content to be processed that matches a candidate game state in the game state database, a second text content that has a response relationship with the first text content is identified from the text content to be processed; the first text content is determined as the first game state, and the second text content is determined as the first broadcast content material; or, Based on the semantics corresponding to the text content to be processed, at least one third text content is determined as key content among the text content to be processed; the third text content is used as the first game state, and the fourth text content corresponding to the third text content is used as the first broadcast content material, and the fourth text content is the next text content of the third text content.
5. The method according to any one of claims 1 to 4, characterized in that, The second sample data includes a second game state and a second broadcast content material corresponding to the second game state; The step of training the second parameters in the second pre-trained model using the second sample data to obtain the broadcast content generation model includes: The second game state is input into the second pre-trained model, and the second predicted content is output. The second parameter is iteratively adjusted based on the difference between the second predicted content and the second broadcast content material to obtain the broadcast content generation model.
6. The method according to claim 5, characterized in that, The method further includes: Obtain game record data of the candidate account in the target game. The game record data includes voice data and status data corresponding to the voice data. The voice data is used to indicate the voice input by the candidate account during the operation of the target game. The status data is used to indicate the game status of the target game when the candidate account inputs the voice data. The voice data is converted into the second broadcast content material, and the status data is converted into the second game status; The second sample data is obtained based on the second game state and the second broadcast content material.
7. The method according to claim 6, characterized in that, The step of converting the voice data into the second broadcast content material and converting the status data into the second game state includes: The voice data is converted to text to obtain the second broadcast content material; Based on the content type corresponding to the second broadcast content material, obtain a game state construction template that matches the content type; The second game state is obtained based on the state data and the state construction template.
8. The method according to claim 6, characterized in that, The step of converting the voice data into the second broadcast content material and converting the status data into the second game state includes: Obtain candidate state rules, wherein the candidate state rules are preset game states; In response to the existence of a specified game state in the state data that matches the candidate state rule, the specified game state is taken as the second game state; The voice data corresponding to the status data is converted into the second broadcast content material.
9. A device for generating broadcast content, characterized in that, The device includes: The acquisition module is used to acquire a first pre-trained model, first sample data, and second sample data. The first pre-trained model is a text generation model pre-trained with sample data from multiple domains. The model parameters of the first pre-trained model include a first parameter. The first sample data and the second sample data are sample data acquired from the game domain. The sample data includes data pairs corresponding to game status and broadcast content materials. The configuration module is used to configure the second parameters to be trained in the first pre-trained model; The third training module is used to train the second parameters of the first pre-trained model using the second sample data to obtain a candidate broadcast content generation model. The acquisition module is also used to acquire a test game state set, which includes multiple test game states; The determination module is used to input the multiple test game states into the candidate broadcast content generation model to obtain a test broadcast content material set, wherein the test broadcast content material set includes test broadcast content materials corresponding to each test game state; Based on the similarity between the test broadcast content materials, the richness of the materials corresponding to the test broadcast content material set is determined; In response to the material richness reaching a preset richness threshold, the candidate broadcast content generation model is determined as the broadcast content generation model; The first training module is used to train the first parameter in the candidate broadcast content generation model using the first sample data in response to the fact that the richness of the material does not reach the preset richness threshold, so as to obtain the second pre-trained model. The second training module is used to train the second parameters in the second pre-trained model using the second sample data to obtain the broadcast content generation model. The broadcast content generation model is used to predict the content of the input target game state to obtain the target broadcast content, which is used to broadcast the target game when the target game is in the target game state.
10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the method for generating broadcast content as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the method for generating broadcast content as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the method for generating broadcast content as described in any one of claims 1 to 8.