CN-122006256-A - Game scenario generation method, device, equipment and storage medium
Abstract
The invention provides a method, a device, equipment and a storage medium for generating a game scenario, wherein the method comprises the steps of distributing virtual roles in a game for a target game account, distributing global game strategies applicable to all rounds for the target game account according to the virtual roles, generating real-time simulation situation information for the target game account by calling a generating model in each round of the game, distributing local game strategies applicable to a single round for the target game account according to the simulation situation information and the virtual roles, generating simulation speaking data and simulation operation data according to the global game strategies, the local game strategies and the simulation situation information by calling the generating model, and summarizing the speaking data and the simulation operation data generated by each virtual role in all rounds into the simulation scenario. The embodiment effectively improves the quality of the automatic production game scenario.
Inventors
- HOU JIAWEI
- OU WENJIE
- LIANG RUDONG
- CHEN KEFU
- FU JIAN
- LIN YUE
Assignees
- 网易(杭州)网络有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260203
Claims (16)
- 1. A method for generating a game scenario, comprising: Distributing virtual roles in the game to the target game account; distributing global game strategies applicable to all rounds for the target game account according to the virtual roles; In each turn of the game, calling a generating model to generate real-time simulation situation information for the target game account, distributing a local game strategy applicable to a single turn for the target game account according to the simulation situation information and the virtual character, and calling the generating model to generate simulation speaking data and simulation operation data according to the global game strategy, the local game strategy and the simulation situation information, wherein the simulation speaking data and the simulation operation data are used for driving the behavior of the virtual character in the game; And summarizing the speaking data and the simulation operation data generated by each virtual character in all rounds into a simulation scenario.
- 2. The method of claim 1, wherein the invoking the generative model to generate real-time simulated situation information for the target game account comprises: inquiring simulation speaking data and simulation operation data generated by all target game account histories before the current moment; Calling a generating model to generate simulation speaking key point information from the historical simulation speaking data; Extracting visual simulation operation key point information of the virtual character controlled by the current target game account from the historical simulation operation data; Determining current simulation game process information; and converting the simulation speaking key point information, the simulation operation key point information and the simulation game process information into real-time simulation situation information for the target game account.
- 3. The method of claim 1, wherein assigning a local game strategy for the game account for a single round based on the simulated situation information and the virtual character comprises: Inquiring target information generated by the virtual character in the current turn; Searching a local game strategy configured for the virtual character when the current turn has the target information, wherein the local game strategy is configured with real situation information; And when the simulation situation information is similar to the real situation information, determining that the target game account applies the local game strategy in the current turn.
- 4. The method of claim 1, further comprising, after said assigning a local game strategy applicable to a single round to said target game account based on said simulated situation information and said virtual character: If the virtual character is a target object, distributing a cooperative game strategy for matching all target objects in the current round for the target game account; And calling a generative model to update the local game strategy according to the global game strategy, the cooperative game strategy and the simulation situation information.
- 5. The method of claim 1, wherein the call generation model generates simulated speech data and simulated operation data from the global game policy, the local game policy, and the simulated situation information, comprising: inputting the global game strategy, the local game strategy and the simulation situation information into a generating model to generate control guidance information; And generating simulation speaking data and simulation operation data based on the target game account according to the control instruction information.
- 6. The method as recited in claim 1, further comprising: Generating the game feature information from the simulated scenario; screening the target game account number with significance according to the simulation scenario, and taking the target game account number as a typical account number; Invoking a generated model to calculate a quality value of the simulation scenario according to the game feature information and the typical account number; and checking the validity of the simulation scenario according to the quality value.
- 7. The method of claim 6, wherein the generating of the game feature information from the simulation scenario comprises: inputting the simulation scenario into a generation model to generate game feature information; the screening the target game account number with significance according to the simulation scenario, as a typical account number, comprises the following steps: Determining screening rules for expressing value and errors; and inputting the simulation scenario and the screening rule into the target game account with highest screening value and the target game account with largest error in the generated model, and taking the target game account as a typical account.
- 8. The method of claim 7, wherein the calculating a quality value for the simulated scenario from the pair-wise feature information and the typical account number comprises: determining scoring rules that represent the level of contrast, term accuracy, and floor rationality; Inputting the simulation script, the game feature information, the typical account number and the scoring rule into a generating model to generate a first index value representing the game highlight degree, a second index value representing the term accuracy degree and a third index value representing the speaking rationality; And fusing the first index value, the second index value and the third index value into a quality value of the simulation scenario.
- 9. The method of claim 8, wherein fusing the first, second, and third index values into a quality value of the simulation scenario comprises: Multiplying the first index value by a preset first weight to obtain a first product value representing the contrast level; multiplying the second index value with a preset second weight to obtain a second product value representing the accuracy of the term; multiplying the third index value by a preset third weight to obtain a third multiplication value representing the rationality of speaking; And calculating a sum value among the first product value, the second product value and the third product value as a quality value of the simulation scenario.
- 10. The method according to any one of claims 1-9, further comprising: The method comprises the steps of collecting a real scenario generated when a candidate game account participates in a game, wherein the real scenario comprises real speaking data and real operation data generated when the candidate game account controls a virtual character in each turn; determining the candidate game account numbers winning in the real scenario as sample account numbers; Invoking a generating model to generate a global game strategy applicable to all rounds according to the virtual roles controlled by the real drama on the sample account; in each turn of the real script, a generating model is called to generate real-time real situation information for the sample account, and the generating model is called to generate candidate game strategies of the virtual role by using the real situation information, the real speaking data and the real operation data; and aggregating the candidate game strategies into local game strategies which are applicable to the virtual roles in a single round.
- 11. The method of claim 10, wherein the invoking the generative model to generate real-time real-world situation information for the sample account comprises: inquiring the real speaking data and the real operation data generated by all the candidate game account histories before the current moment; Calling a generating model to generate real speaking key point information from the historical real speaking data; Extracting visual real operation key point information of the virtual character controlled by the current sample account from the historical real operation data; Determining current real game process information; and converting the real speaking key point information, the real operation key point information and the real game process information into real situation information in real time for the sample account.
- 12. The method of claim 10, wherein the aggregating the candidate game policies into a local game policy for which the virtual character applies to a single round comprises: inquiring target information generated in each turn of the virtual character controlled by the sample account; Dividing the candidate game strategies of the same virtual character into the same category when the target information is provided in the same round; clustering the candidate game strategies in the same category to obtain a plurality of clusters; in the same cluster, the candidate game strategies are used to construct local game strategies applicable to each round.
- 13. The method as recited in claim 10, further comprising: and if the virtual role controlled by the sample account is a target object, calling a generative model to generate a cooperative game strategy for cooperation of all target objects in each turn by using the real situation information, the real speaking data and the real operation data.
- 14. A game scenario generation apparatus, comprising: the virtual role distribution module is used for distributing virtual roles in the game for the target game account; The game initialization module is used for distributing global game strategies applicable to all rounds for the target game account according to the virtual character; The game simulation control module is used for calling a generating model to generate real-time simulation situation information for the target game account in each turn of the game, distributing a local game strategy applicable to a single turn for the target game account according to the simulation situation information and the virtual character, and calling the generating model to generate simulation speaking data and simulation operation data according to the global game strategy, the local game strategy and the simulation situation information, wherein the simulation speaking data and the simulation operation data are used for driving the behavior of the virtual character in the game; And the simulation scenario generation module is used for summarizing the speaking data and the simulation operation data generated by each virtual character in all rounds into a simulation scenario.
- 15. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of generating a game scenario according to any one of claims 1-13 when the computer program is executed.
- 16. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the method of generating a game scenario according to any one of claims 1-13.
Description
Game scenario generation method, device, equipment and storage medium Technical Field The invention belongs to the technical field of artificial intelligence, and particularly relates to a method, a device, equipment and a storage medium for generating a game scenario. Background The wolf killing and derivative games and imitation games thereof are taken as a multi-person language game integrating policy reasoning, role playing and social interaction, and the complex game mechanism and rich policy change of the multi-person language game provide an experimental scene for artificial intelligent research. If the script of the game is recorded through an online platform and an offline match, the efficiency of data acquisition, data cleaning, formatting and the like is low, the requirement of artificial intelligence large-scale training is not satisfied, the game level of a real player is uneven, the quality fluctuation of the game data in the script is large, and a large number of low-quality game processes exist. Therefore, at present, a scenario of the game is generated by simulation based on a rule and a template. The rule-based generation method is to construct a game flow through predefined game rules and logic trees, describe the state transition of the game through a finite state machine or a behavior tree, simulate the decision process of a player through setting various condition judgment and action execution rules, and thus construct a script of the game. The template-based generation method is to construct a scenario of a game through a pre-designed dialogue template and a behavior pattern. The method comprises the steps of manually establishing or mining a huge dialogue template, constructing a speech library, wherein typical speech of various roles under different conditions is contained, and generating office data by means of template matching and parameter replacement. However, the rules and templates are manually defined, so that the cost is high, the scenario presentation of the game is patterned, the operation is single and the language expression is single, namely, the operation repetition rate is high and the language expression repetition rate is high, and the scenario quality of the game is low. Disclosure of Invention In view of the above, the present invention provides a method, apparatus, device and storage medium for generating a game scenario, so as to improve the quality of automatically generating the game scenario. The first aspect of the present invention provides a method for generating a game scenario, including: Distributing virtual roles in the game to the target game account; distributing global game strategies applicable to all rounds for the target game account according to the virtual roles; In each turn of the game, calling a generating model to generate real-time simulation situation information for the target game account, distributing a local game strategy applicable to a single turn for the target game account according to the simulation situation information and the virtual character, and calling the generating model to generate simulation speaking data and simulation operation data according to the global game strategy, the local game strategy and the simulation situation information, wherein the simulation speaking data and the simulation operation data are used for driving the behavior of the virtual character in the game; And summarizing the speaking data and the simulation operation data generated by each virtual character in all rounds into a simulation scenario. A second aspect of the present invention provides a game scenario generation apparatus, including: the virtual role distribution module is used for distributing virtual roles in the game for the target game account; The game initialization module is used for distributing global game strategies applicable to all rounds for the target game account according to the virtual character; The game simulation control module is used for calling a generating model to generate real-time simulation situation information for the target game account in each turn of the game, distributing a local game strategy applicable to a single turn for the target game account according to the simulation situation information and the virtual character, and calling the generating model to generate simulation speaking data and simulation operation data according to the global game strategy, the local game strategy and the simulation situation information, wherein the simulation speaking data and the simulation operation data are used for driving the behavior of the virtual character in the game; And the simulation scenario generation module is used for summarizing the speaking data and the simulation operation data generated by each virtual character in all rounds into a simulation scenario. A third aspect of the present invention provides an electronic device comprising a memory, a processor and a computer program stored in the m