The application discloses a
text generation method and device, equipment, storage medium and program product. The method represents input data as a graph structure, uses a graph neural network to perform embedding learning on the graph structure, captures
global information (i.e., global latent variables) and local information (i.e., local latent variables) between the input data, can more effectively organize and utilize
complex data structures, can extract information at different levels, and improves the logical coherence and structure of the model when generating text. A
global planning module is used to generate
sentence topics and main content representations, and a refinement generation module is used to generate content representations of the sentences, which can capture and integrate information at different levels, significantly improving the inter-
sentence coherence and consistency of the generated text. The expression mode of each
sentence is adjusted according to the local latent variables, realizing diversified expression of the sentences, and a text that is both coherent and consistent and has various styles can be generated, meeting the demand for diversified text in actual applications.