CN-117149971-B - Scenario generation method and related device
Abstract
The application provides a scenario generation method and a related device, wherein the method comprises the steps of receiving first user input content from terminal equipment, generating a story outline of a target scenario according to the first user input content, generating first scenario nodes according to the story outline, determining a plurality of role intents, generating second scenario nodes of the target scenario according to the first role intents, and generating target text content associated with the first role intents. The embodiment of the application can generate a plurality of scenario nodes of the scenario according to the input content of the user, realizes automatic scenario generation, is beneficial to improving scenario creation efficiency and is beneficial to saving scenario creation cost.
Inventors
- HU SHANGFENG
- ZHOU JUNQIANG
Assignees
- 深圳市人马互动科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230829
Claims (7)
- 1. The scenario generation method is characterized by being applied to a server, wherein the server is in communication connection with terminal equipment, and the method comprises the following steps: Receiving first user input content from the terminal device; Determining story type, story theme, character information, story background and story line information according to the first user input content; screening target parameters from a plurality of preset parameters according to the story type and the story theme; generating a story outline of the target scenario according to the target parameters, the story background, the role information and the story line information; generating first scenario content of a first scenario node according to the story background; Determining a target scenario event according to the story outline, wherein the target scenario event is an event for leading out a role of the target scenario; Generating second scenario content of the first scenario node according to the target scenario event; determining a plurality of story conflicts of the target scenario according to the story outline; Screening at least one target story conflict associated with the first scenario node from the plurality of story conflicts; Determining a plurality of character intentions according to the at least one target story conflict and the first scenario node, wherein the character intentions are intentions for guiding the first scenario node to move towards a fixed scenario development direction; Generating a second scenario node of the target scenario according to a first character intention and the first scenario node, wherein the first character intention is any one of the character intents; And generating target text content associated with the first character intention according to the first scenario node, the second scenario node and the first character intention.
- 2. The method of claim 1, wherein after the generating the second scenario node of the target scenario from the first character intent and the first scenario node, the method further comprises: Scoring the reasonable degree of taking the second scenario node as a third scenario node to be generated according to second character intention, the first scenario node and the second scenario node to obtain a target score, wherein the second character intention is any one of the character intentions except the first character intention; Judging whether the target score is larger than a preset score threshold value or not; If the target score is judged to be larger than the preset score threshold value, the second scenario node is used as the third scenario node; and if the target score is less than or equal to the preset score threshold, generating the third scenario node of the target scenario according to the second character intention and the first scenario node.
- 3. The method of claim 2, wherein after the generating the third scenario node of the target scenario, the method further comprises: Judging whether the third scenario node is the end of the scenario; if the third scenario node is judged to be the end of the scenario, generating a fourth scenario node of the target scenario according to a third character intention and the first scenario node, wherein the third character intention is any one of the plurality of character intents except the first character intention and the second character intention; If the third scenario node is judged not to be the end of the scenario, determining a target role intention according to the third scenario node and the story outline, wherein the target role intention is an intention for guiding the scenario development direction of the third scenario node; and generating a fifth scenario node associated with the third scenario node according to the target character intention and the third scenario node.
- 4. The method of claim 1, wherein after the generating the target text content associated with the first persona intention from the first scenario node, the second scenario node, and the first persona intention, the method further comprises: receiving second user input content from the terminal device; determining scenario keywords according to the second user input content; and adjusting the first scenario node according to the scenario keywords to obtain the adjusted first scenario node.
- 5. A scenario generation device is characterized by being applied to a server, wherein the server is in communication connection with a terminal device, and comprises a receiving unit, a generation unit and a determination unit, The receiving unit is used for receiving first user input content from the terminal equipment; the generation unit is used for determining a story type, a story theme, role information, a story background and story plot information according to the first user input content, screening target parameters from a plurality of preset parameters according to the story type and the story theme, and generating a story outline of the target scenario according to the target parameters, the story background, the role information and the story plot information; the generation unit is also used for generating first scenario content of a first scenario node according to the story background, determining a target scenario event according to the story outline, wherein the target scenario event is an event for leading out a role of the target scenario; The determining unit is used for determining a plurality of story conflicts of the target scenario according to the story outline, screening at least one target story conflict associated with the first scenario node from the plurality of story conflicts, and determining a plurality of role intents according to the at least one target story conflict and the first scenario node, wherein the role intents are intents for guiding the first scenario node to move towards a fixed scenario development direction; the generating unit is further configured to generate a second scenario node of the target scenario according to a first character intention and the first scenario node, where the first character intention is any one of the plurality of character intents; The generating unit is further configured to generate target text content associated with the first character intention according to the first scenario node, the second scenario node, and the first character intention.
- 6. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-4.
- 7. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any of claims 1-4.
Description
Scenario generation method and related device Technical Field The application belongs to the technical field of computers, and particularly relates to a scenario generation method and a related device. Background With the development of technology, people can help themselves to finish work creation work by means of various intelligent devices, but in each link of scenario creation, manual creation and arrangement are still needed, a large amount of manpower and material resources are needed to be consumed, creation efficiency is low, and a scenario creation process is long. Disclosure of Invention The embodiment of the application provides a scenario generation method and a related device, which can generate a plurality of scenario nodes of a scenario according to user input content, realize automatic scenario generation, are beneficial to improving scenario creation efficiency and are beneficial to saving scenario creation cost. In a first aspect, an embodiment of the present application provides a scenario generation method, which is applied to a server, where the server is communicatively connected to a terminal device, and the method includes: Receiving first user input content from the terminal device; generating a story outline of the target scenario according to the first user input content; Generating a first scenario node of the target scenario according to the story outline; determining a plurality of character intentions according to the first scenario node and the story outline, wherein the character intentions are intentions for guiding the first scenario node to move towards a fixed scenario development direction; Generating a second scenario node of the target scenario according to a first character intention and the first scenario node, wherein the first character intention is any one of the character intents; And generating target text content associated with the first character intention according to the first scenario node, the second scenario node and the first character intention. In a second aspect, an embodiment of the present application provides a scenario generation apparatus, which is applied to a server, where the server is in communication connection with a terminal device, and the scenario generation apparatus includes an acquisition unit, a determination unit, and a control unit, The receiving unit is used for receiving first user input content from the terminal equipment; the generation unit is used for generating a story outline of the target scenario according to the first user input content; The generation unit is further used for generating a first scenario node of the target scenario according to the story outline; the determining unit is used for determining a plurality of character intentions according to the first plot node and the story outline, wherein the character intentions are intentions for guiding the first plot node to move towards a fixed plot development direction; the generating unit is further configured to generate a second scenario node of the target scenario according to a first character intention and the first scenario node, where the first character intention is any one of the plurality of character intents; The generating unit is further configured to generate target text content associated with the first character intention according to the first scenario node, the second scenario node, and the first character intention. In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the first aspect of the embodiment of the present application. In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program/instruction which when executed by a processor performs the steps of the first aspect of embodiments of the present application. In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. It can be seen that, in the embodiment of the present application, the server receives the first user input content from the terminal device, generates the story outline of the target scenario according to the first user input content, generates the first scenario node of the target scenario according to the story outline, further determines, according to the first scenario node and the story outline, a plurality of character intentions, the character intentions being intentions for guiding the first scenario node to a fixed scenario development direction, generates the se