Content generation method and device, electronic equipment, storage medium and program product

By inserting generative content components into documents and using language models to create data blocks and primary content, the problem of the single method of artificial intelligence content generation in existing technologies is solved, and the effect of simplifying editing operations is achieved.

CN121543557APending Publication Date: 2026-02-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511725098.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing technologies, the methods for generating content based on artificial intelligence are relatively limited, resulting in a cumbersome process for processing the generated content.

Method used

By inserting generative content components into documents, data blocks and primary content are created using a language model, and users can directly edit data blocks to change the primary content, simplifying the editing process.

Benefits of technology

It enriches the ways in which AI generates content and simplifies the editing of generated content, eliminating the need for users to resend modification instructions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543557A_ABST
    Figure CN121543557A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a content generation method and device, electronic equipment, a storage medium and a program product. The method comprises the steps that in response to an editing operation in a document, a generative content component is inserted into the document, and the generative content component serves as a part of document content; in response to a generation instruction received through the generative content component, a data block and first content are created in the document through a language model, the data block comprises a code block, and the content contained in the data block and the first content are both associated with the generation instruction; and in response to a received editing instruction for the data block, changing the first content according to the content of the edited data block. By means of the technical scheme, the content generation mode of artificial intelligence can be enriched, and the operation needing to be executed for editing the content generated by the artificial intelligence is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence-generated content technology, and more particularly to a content generation method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] Currently, Artificial Intelligence Generated Content (AIGC) is becoming increasingly mature, allowing users to generate content through artificial intelligence, such as generating general natural language text content or content in specific fields, and so on.

[0003] However, among related technologies, the content generation methods based on artificial intelligence are relatively simple, making the process of processing the content generated by artificial intelligence quite cumbersome. Summary of the Invention

[0004] This disclosure provides a content generation method, apparatus, electronic device, storage medium, and program product to enrich the ways of generating content based on artificial intelligence and simplify the operations required for subsequent processing of content generated by artificial intelligence.

[0005] In a first aspect, embodiments of this disclosure provide a content generation method, including:

[0006] In response to an editing operation in a document, a generative content component is inserted into the document as part of the document content;

[0007] In response to receiving a generation instruction through the generative content component, a data block and first content are created in the document through a language model. The data block includes a code block, and the content contained in the data block and the first content are both associated with the generation instruction.

[0008] In response to receiving an edit instruction for the data block, the first content is modified according to the content of the edited data block.

[0009] Secondly, embodiments of this disclosure also provide a content generation apparatus, including:

[0010] An insertion module, in response to an editing operation in a document, inserts a generative content component into the document, the generative content component being part of the document content;

[0011] A generation module is configured to, in response to receiving a generation instruction through the generative content component, create a data block and first content in the document through a language model, wherein the data block includes a code block, and the content contained in the data block and the first content are both associated with the generation instruction;

[0012] An editing module is used to respond to receiving an editing instruction for the data block and modify the first content according to the content of the edited data block.

[0013] Thirdly, embodiments of this disclosure also provide an electronic device, including:

[0014] One or more processors;

[0015] Memory, used to store one or more programs.

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the content generation method as described in the embodiments of this disclosure.

[0017] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the content generation method as described in embodiments of this disclosure.

[0018] Fifthly, embodiments of this disclosure also provide a computer program product that, when executed by a computer, enables the computer to implement the content generation method as described in embodiments of this disclosure.

[0019] The content generation method, apparatus, electronic device, storage medium, and program product provided in this disclosure create data blocks and first content in a document based on a generative content component. They also support users in editing the first content created in the document by editing the data blocks created in the document, without having to resend modification instructions to the generative content component. Compared with the technical solution of generating AI-generated content in the form of conversational messages, this can enrich the content generation methods of AI and simplify the operations required to edit the content generated by AI. Attached Figure Description

[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent when taken in conjunction with the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0021] Figure 1 A flowchart illustrating a content generation method provided in an embodiment of this disclosure;

[0022] Figure 2 A schematic diagram illustrating the display of a document provided in an embodiment of this disclosure;

[0023] Figure 3 A schematic diagram showing another document provided for an embodiment of this disclosure;

[0024] Figure 4 A schematic diagram showing a component list provided in an embodiment of this disclosure;

[0025] Figure 5 A schematic diagram illustrating the display of a data block and first content provided in an embodiment of this disclosure;

[0026] Figure 6 A schematic diagram illustrating a second type of content provided in an embodiment of this disclosure;

[0027] Figure 7 A schematic diagram showing another second content provided in an embodiment of this disclosure;

[0028] Figure 8 A flowchart illustrating another content generation method provided in this embodiment of the disclosure;

[0029] Figure 9 A schematic diagram showing a data block provided in an embodiment of this disclosure;

[0030] Figure 10 A structural block diagram of a content generation apparatus provided in an embodiment of this disclosure;

[0031] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0032] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0033] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0034] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0035] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0036] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0037] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0038] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0039] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0040] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0041] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0042] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0043] Figure 1This is a flowchart illustrating a content generation method provided in an embodiment of this disclosure. The method can be executed by a content generation device, which can be implemented in software and / or hardware and can be configured in an electronic device, typically a computer, mobile phone, or tablet. The content generation method provided in this disclosure is applicable to scenarios where content is generated from documents based on artificial intelligence. Figure 1 As shown, the content generation method provided in this embodiment may include:

[0044] S101. In response to an editing operation in a document, a generative content component is inserted into the document as part of the document content.

[0045] In this context, a document can be understood as an information carrier that supports the generation of document content based on generative content components. The type of document is not limited; for example, the aforementioned document could be an online document that supports collaborative editing by multiple users. Users with reading permissions can read the document's content; users with editing permissions can collaboratively edit the document's content, such as adding content, modifying added content, and / or deleting at least some content from the document, etc. The document's content includes, but is not limited to, content entered into the document via character input and / or content created within the document based on generative content components inserted into the document, etc.

[0046] Generative content components can be understood as modular tools or systems that automatically generate text, images, audio, video, or other content using artificial intelligence technology. For example, generative content components can dynamically generate personalized and diverse content based on user input or preset conditions. In some examples, generative content components can generate content that meets the user's input content generation requirements. The presentation form of generative content components is not limited. Optionally, the generative content components include conversational components. This conversational component can be understood as a component that generates content based on conversational content input by the user. For example, this conversational component may include, but is not limited to, artificial intelligence (AI) components, such as AI dialogue components. The following explanation uses an AI dialogue component as an example of a generative content component.

[0047] Editing operations can be understood as triggering actions used to instruct the insertion of generative content components into a document. The execution method of editing operations is not limited; for example, editing operations may include actions that trigger the component identifier of the generative content component and / or the insertion of a control corresponding to the generative content component, etc.

[0048] Specifically, upon receiving an editing operation in document 20, the generator content component can be inserted into document 20 in response to this operation. This inserted generator content component can be displayed as part of the content of document 20. For example, after inserting this generator content component, it can be displayed in document 20 as an input area 21, such as the input area 21 containing this generator content component being displayed in document 20. Figure 2 As shown.

[0049] For example, such as Figure 3 As shown, when document 20 is initially created, it may not contain any generative content components, such as the input area 21 corresponding to the generative content component not being displayed in document 20. Figure 4 As shown, upon receiving a user's component display operation on document 20, such as when the user triggers the component display control corresponding to document 20, or when the user enters a preset character 30 in document 20 (…), Figure 4 Taking the default character 30 as " / " as an example, a component list 31 can be displayed. This component list 31 includes component identifiers for at least one component that the user can insert into the document 20. Upon detecting a user's addition operation on a generative content component, such as when the user triggers the component identifier 32 of a generative content component in the component list 31, this generative content component can be inserted into the document 20. For example, an input area 21 corresponding to this generative content component can be added to the document 20. Figure 2 As shown.

[0050] S102. In response to receiving a generation instruction through the generative content component, a data block and first content are created in the document through a language model. The data block includes a code block, and the content contained in the data block and the first content are both associated with the generation instruction.

[0051] The generation instruction can be understood as an instruction used to instruct the generative content component to generate content. This generation can be based on a user's triggering action, such as the user sending input content to the generative content component; it can also be generated automatically when preset conditions are met, which is not limited in this embodiment. These preset conditions may include, but are not limited to, the input of a set character or a set string in the document content. The language model can be pre-trained, and its specific type is not limited.

[0052] The data block and the first content can be understood as content generated in response to a generation instruction. For example, the first content can be the content instructed to be generated by the generation instruction, and the data block can be intermediate content used to edit the first content; alternatively, the data block can be the content instructed to be generated by the generation instruction, and the first content can be a preview of the data block while it is performing its function. The content of the data block is associated with the first content. For instance, a user can edit this generated data block based on a document, and can edit the first content by editing this data block, without needing to resend modification instructions for the data block or the first content to the generative content component.

[0053] The data block and the initial content can be displayed in the document as part of the document content. In some examples, the document content can support multi-user collaborative editing; in this case, the data block also supports multi-user collaborative editing. For example, users with document editing permissions can collaboratively edit the data block created by the generative content component in the document.

[0054] Data blocks may include code blocks; they may also include other data blocks besides code blocks, such as text blocks and / or musical score blocks. Optionally, in this case, the data blocks may also include text blocks and / or musical score blocks. The code block, when parsed by the corresponding processing component, can be used for data processing, generating web pages, generating charts, and / or generating documents (such as generating Typst documents for publishing and academic writing), etc. The text block, when processed by the corresponding processing component, can be converted into message content for session messages (such as card-type session messages and / or non-card-type session messages) and sent to one or more sessions. The musical score block, when processed by the corresponding processing tool, can be converted into other types of musical scores and / or corresponding music data. For example, if the musical score block is an ABC score, this ABC score can be processed by the corresponding processing tool into staff notation and / or generate corresponding music content.

[0055] The first content can be associated with a generation instruction. For example, the first content can be the content that the generation instruction indicates to be generated and / or the content obtained based on the data block. The first content can include, but is not limited to, visual content such as web pages, images, animations, flowcharts and / or tables, data results, message content, or music content, etc.

[0056] Specifically, upon receiving a generation instruction through the content generation component, the component can respond to this instruction by creating data content 50, comprising one or more data blocks, and first content 51 in document 20 using a language model. For example, after receiving the generation instruction, the content generation component can generate data content 50 and / or first content 51, comprising one or more data blocks, using a language model as feedback content for this generation instruction, and can display this feedback content as part of the content in document 20, such as... Figure 5 As shown.

[0057] It should be noted that both the data block and the first content are associated with the generation instructions received by the generative content component. Both the data block and the first content can be generated by the generative content component through a language model; or, one of the data block and the first content can be generated by the generative content component through a language model, and the other of the data block and the first content can be generated based on one of the above, etc. This embodiment does not limit this.

[0058] In some implementations, the generation instruction can be generated based on a corresponding triggering operation by the user. The execution method of this triggering operation is not limited. Optionally, before creating a data block and first content in the document through a language model in response to receiving the generation instruction through the generative content component, the method further includes: displaying second content entered by the input operation in the input area of ​​the generative content component in response to an input operation based on the generative content component; and generating a generation instruction corresponding to the second content in response to a sending operation for the second content.

[0059] The input area of ​​the generative content component can be used for users to input content to be sent to the generative content component. The second content can be understood as the content entered by the user in the input area. Taking a session component as an example, the second content input by the session component may optionally include session content to be sent. For example, this second content can be sent to the generative content component as the session content of a session message to instruct the generative content component to generate and return a response to this session message. The sending operation can be understood as a triggering operation used to instruct the sending of the second content entered in the input area to the generative content component. The execution method of the sending operation is not limited; for example, the sending operation may include triggering an operation of a sending control corresponding to the input area, etc. This sending control can be a virtual button displayed in association with the input area, or a physical button on a content input device (such as a keyboard); this embodiment does not limit this.

[0060] For example, such as Figure 2As shown, document 20 may include an input area 21, which can be used by the user to input content to be sent to the generative content component, instructing the generative content component to generate content. The user can input the content they wish to send to the generative content component in the input area 21 of document 20, such as inputting their requirements for the content to be generated, for example... Figure 6 As shown ( Figure 6 Taking the user's input as "Please generate an XX greeting card using HTML, reflecting XXXX traditional elements" as an example, the application can perform a sending operation after input, such as triggering the sending control corresponding to input area 21, to trigger the sending of a generation instruction to the generative content component. Correspondingly, the current application can respond to receiving the generation instruction through the generative content component by creating at least one data block and first content 51 associated with this generation instruction in document 20 through the language model. For example, it can obtain the second content 52 input in input area 21 and input this second content 52 as a prompt to the language model corresponding to the generative content component, so that the language model creates content in document 20 that matches the second content 52. For example, the language model can create data content 50 including at least one data block and / or first content 51 in document 20 based on the second content 52. Figure 5 As shown.

[0061] In this embodiment, after the second content 52 entered in the input area 21 is sent to the generative content component in response to a send operation, the second content 52 entered in the input area 21 may no longer be displayed in the document 20, such as no longer being displayed within or outside the input area 21 of the document 20; alternatively, the second content 52 may continue to be displayed in the document 20. For example, in response to a send operation, the second content 52 may be displayed within the input area 21 of the document 20 (e.g., ...). Figure 6 (As shown) is adjusted to be displayed outside the input area 21 as part of the content of document 20, such as... Figure 7 As shown, this is to facilitate subsequent viewing and / or editing of the second content 52 by the user, or to associate and display a corresponding data block and / or the first content 51 with the second content 52, etc. In this case, optionally, the content generation method further includes: displaying the second content 52 outside the input area 21 in response to a sending operation for the second content 52, wherein the second content 52 is displayed as part of the content of the document 20.

[0062] S103. In response to receiving an editing instruction for the data block, change the first content according to the content of the edited data block.

[0063] In this context, editing instructions can be understood as commands to instruct the editing of data blocks generated by generative content components. These instructions can be generated in response to editing operations performed by the current user within the current client, or they can be sent by users other than the current user based on their respective clients, thus enabling collaborative editing of data blocks created within this document by multiple users.

[0064] In this embodiment, since the data blocks and first content created based on the generative content component are displayed in the document in the form of document content, it is also possible for users to directly edit the secondary data blocks and / or first content in the document based on this document. For example, users can edit the data blocks in the document as needed to modify the first content corresponding to the data block, without having to send modification instructions to the generative content component again. This satisfies the user's editing needs for the content generated by the generative content component and simplifies the operations required to edit the content generated by the generative content component.

[0065] For example, in response to an editing instruction on a data block, the data block can be edited, and based on the content of the edited data block, the first content in the document corresponding to this data block can be updated, such as regenerating the first content based on the content of the edited data block, and switching the first content in the document corresponding to this data block to this regenerated first content, and so on.

[0066] In some implementations, after identifying a data block in a document, such as after creating a data block in the document and / or after editing a data block created in the document, the user can further apply the created or edited data block. For example, based on a user's first application operation on a data block in the document, the data block can be added to the corresponding integrated development environment to implement the function of the data block. In this case, optionally, the content generation method further includes: adding the code block to the corresponding integrated development environment in response to a first application operation on the code block. The first application operation can be understood as a triggering operation to instruct the application to have a data block with a specific function, such as triggering an operation of an application control corresponding to the data block or adding the data block to the corresponding function implementation file (such as a code file).

[0067] In some implementations, after determining the first content in the document, such as after creating the first content in the document and / or after updating the first content in the document, the user can further apply the created or updated first content. For example, based on a second application operation by the user targeting the first content in the document, the first content can be applied in an application environment corresponding to the first content, such as displaying the first content in a corresponding interface, sending the first content to one or more sessions, and / or playing the first content in a corresponding interface, etc. In this case, optionally, the content generation method further includes: in response to a second application operation targeting the first content, applying the first content in an application scenario corresponding to the first content. The second application operation can be understood as a triggering operation to indicate the application of the first content, such as triggering an operation of an application control corresponding to the first content or adding the first content to a corresponding application scenario, etc.

[0068] The content generation method provided in this embodiment, in response to an editing operation in a document, inserts a generative content component into the document, which is part of the document content; in response to receiving a generation instruction through the generative content component, it creates a data block and first content in the document using a language model, the data block including a code block, the content contained in the data block and the first content being associated with the generation instruction; in response to receiving an editing instruction for the data block, it modifies the first content according to the content of the edited data block. This embodiment utilizes the above technical solution to create a data block and first content in a document based on a generative content component, and supports users to edit the first content created in the document by editing the data block created in the document, without needing to resend modification instructions to the generative content component. Compared to technical solutions that generate AI-generated content in the form of conversational messages, this method enriches the content generation methods of AI and simplifies the operations required to edit AI-generated content.

[0069] Figure 8 This is a flowchart illustrating another content generation method provided in this embodiment. The solution in this embodiment can be combined with one or more optional solutions in the above embodiments. Optionally, creating code blocks and first content in the document through a language model includes: creating data blocks in the document through a language model; and creating first content in the document based on the data blocks in response to the creation of the data blocks. Correspondingly, as... Figure 8 As shown, the content generation method provided in this embodiment may include:

[0070] S201. In response to an editing operation in a document, a generative content component is inserted into the document as part of the document content.

[0071] S202. In response to receiving a generation instruction through the generative content component, a data block is created in the document through a language model. The data block includes a code block, and the content contained in the data block is associated with the generation instruction.

[0072] In this step, after receiving a generation instruction, the generative content component can create data blocks in document 20 using a language model. For example, the generative content component can respond to the received generation instruction by inputting it into its associated language model, which then generates data content 50 corresponding to the instruction. This data content 50 may include at least one data block. The current application can then obtain the data content 50 generated by the generative content component and display it as part of the content of document 20. Figure 9 As shown ( Figure 9 For example, data content 50 includes a code block that matches the generation instruction and at least one descriptive text for that code block.

[0073] The data content can be understood as content generated based on generative content components. Part of this data content can be used solely to respond to a second set of user-inputted content (such as…). Figure 9 The data content shown may contain descriptions of code blocks, such as those that do not have a specific function; and / or, at least a portion of this data content (such as data blocks) may be used to implement the corresponding function (such as...). Figure 9 The code blocks in the data content shown can perform specific functions when processed by their corresponding components.

[0074] In this embodiment, the display position of the data content in the document can be flexibly set as needed. For example, the display position of the data content in the document can be preset; or it can be determined based on the display position of its corresponding second content in the document, so that the data content can be displayed in a position associated with this second content, such as... Figure 9 As shown ( Figure 9 (Taking the example of displaying data content below its corresponding second content) to facilitate the user's identification of the correspondence between the data content and the second content. The position associated with the second content can be, for example, a position within a preset distance range from the second content, such as below, to the left, or to the right of the second content's display position; this embodiment does not limit this.

[0075] S203. In response to the creation of the data block, first content is created in the document based on the data block, the first content being associated with the generation instruction.

[0076] Specifically, after the data block is created, the first content 51 associated with the generation instruction can be created in the document based on the created data block, such as... Figure 5 As shown.

[0077] In this embodiment, the method of creating the first content based on the data block is not limited. Optionally, creating the first content in the document based on the data block includes: inserting a processing component that matches the attribute characteristics of the data block into the document; processing the data block using the processing component; and displaying the processed first content in the document.

[0078] The attribute characteristics of a data block can be used to indicate its quantifiable or categorizable properties. These characteristics may include, but are not limited to, type attribute characteristics and / or content attribute characteristics. For example, when a data block has different type attribute characteristics and / or content attribute characteristics, different processing components can be used to process it. The type attribute characteristic can be used to indicate the features of the data block's type attribute, such as indicating what type of data block it is. The content attribute characteristic can be used to indicate the features of the data block's content, such as indicating the characteristics presented by the data block's own content.

[0079] A processing component that matches the attribute characteristics of a data block can be understood as a post-processing tool that performs subsequent processing on the generated data block. Data blocks with different attribute characteristics can correspond to different processing components. For example, the processing component corresponding to different types of code blocks can be a different code execution tool or code parsing tool that matches its type; the processing component corresponding to text blocks can be a conversion tool that corresponds to its attribute characteristics, such as a message conversion tool; the processing component corresponding to musical scores can be a music processing tool that corresponds to its attribute characteristics, and so on.

[0080] The first content may correspond to a code block. Optionally, the first content includes at least one of the following: visual content or data results obtained based on the code block; message content generated based on the text block; and music content generated based on the music score block. For example, for a code block with visual element generation functionality, the first content may be visual content, which can be understood as the screen content of visual elements generated when the code block is processed by a corresponding code execution tool or code parsing tool. These visual elements may include, for example, web pages, images, animations, flowcharts, and / or tables. For a code block with data processing capabilities, the first content may be the content of data results, which can be understood as the processing results generated when the code block is run and processed by a corresponding code execution tool. For a text block that supports conversion into a conversational message and sending, the first content may be message content, which can be understood as the content of the conversational message when the text content is converted into a conversational message by a corresponding processing tool. For sheet music blocks that support type conversion and / or support conversion to corresponding music data, the first content can be understood as the music content obtained when the sheet music block is processed using the corresponding processing tools. This music content can be understood as music-related content, such as the sheet music content after type conversion based on this sheet music block and / or the music audio content obtained after processing, etc.

[0081] Specifically, after obtaining the data content generated by the generative content component, the data block that can perform the corresponding function can be obtained from the data content. A processing component that matches the attribute characteristics of this data block is inserted into the document, and the inserted processing component is used to process this data block to obtain the first content corresponding to this data block.

[0082] For example, the content segments in the data content can be traversed sequentially. For the currently traversed content segment, it is determined whether this content segment is a data block with a specific function. If so, the processing component corresponding to this data block is used to process the data block to obtain the first content corresponding to this data block. The next content segment in the data content is then traversed, and the operation of determining whether this content segment is a data block with a specific function is returned, until all content segments in the data content have been traversed. If not, the next content segment in the data content is then traversed, and the operation of determining whether this content segment is a data block with a specific function is returned, until all content segments in the data content have been traversed.

[0083] The method for obtaining processing components that match the attribute characteristics of the data block can be configured as needed. Optionally, before inserting a processing component that matches the attribute characteristics of the data block into the document, at least one of the following is included: obtaining a processing component that matches the attribute characteristics of the data block from a pre-set component library; generating a processing component that matches the attribute characteristics of the data block in response to a component generation operation.

[0084] For example, a component library can be pre-configured, containing multiple processing components and recording the attribute characteristics of the data blocks that each processing component supports processing. Therefore, when it is necessary to obtain a processing component that matches the attribute characteristics of a certain data block, a processing component that supports processing data blocks with that attribute characteristic can be retrieved from the component library and used as the matching processing component.

[0085] For example, processing components that match the attribute characteristics of the data block to be processed can be generated based on the attribute characteristics of the data block to be processed. For example, processing components that match the attribute characteristics of the data block can be constructed by the user. Alternatively, processing components that match the attribute characteristics of the data block can be generated through generative content components inserted in the document or other generative content components other than those inserted in the document, and so on.

[0086] In this embodiment, after obtaining the data content, the processing components corresponding to one or more data blocks in the data content can be automatically obtained. For example, in response to obtaining the data content, the processing components corresponding to at least some data blocks in the first document can be obtained. Alternatively, after obtaining the data content, the processing components corresponding to the data blocks in the data content may not be automatically obtained. Instead, after receiving a user's operation to obtain the processing components for the data blocks in the data content, the processing components corresponding to at least some data blocks in the data content can be obtained. For example, in response to an operation to obtain the processing components for a certain data block in the data content, the processing component corresponding to that data block can be obtained, etc. This embodiment does not limit this.

[0087] In this embodiment, after inserting the processing component corresponding to the data block into the document, the processing component can be used automatically to process the data block and display the first content obtained by processing the data block. For example, in response to the processing component that inserts the data block, the processing component is used to process the data block. Alternatively, the processing component can not be used automatically to process the data block, but rather it can be used to process the data block after receiving a user's processing operation on the data block. For example, in response to a processing operation on a data block in the data content, the processing component corresponding to the data block is used to process the data block and display the first view content obtained by processing the data block. This embodiment does not limit this.

[0088] In this embodiment, after obtaining the first content 51 corresponding to a certain data block in the data content, this first content 51 can be displayed as part of the document 20 content, such as... Figure 5 As shown ( Figure 5 (Taking the first content 51 as an example of a greeting card generated based on a code block).

[0089] The display position of the first content in the document is not limited. For example, the display position of the first content in the document can be preset; it can also be determined based on the display position of its corresponding data block in the document. For example, the first content can be displayed in the position associated with its corresponding data block. Figure 5 As shown ( Figure 5 (Taking the first content displayed below its corresponding data block as an example) to facilitate the user's determination of the correspondence between the first content and the data block. The position associated with a data block can be, for example, a position within a preset distance range from the data block, such as above, below, to the left, or to the right of the data block's display position, etc., which is not limited in this embodiment.

[0090] S204. In response to receiving an editing instruction for the data block, change the first content according to the content of the edited data block.

[0091] The content generation method provided in this embodiment supports the creation of first content in the document based on the data block after the generative content component creates a data block in the document. It can meet the user's needs for processing and previewing the data block generated by the generative content component, and simplify the operations required for processing and previewing the data block generated by the generative content component.

[0092] Figure 10 This is a structural block diagram of a content generation apparatus provided in an embodiment of this disclosure. The apparatus can be implemented by software and / or hardware, and can be configured in an electronic device, typically a computer, mobile phone, or tablet computer. It can generate content from a document based on artificial intelligence by executing a content generation method. Figure 10 As shown, the content generation device provided in this embodiment may include: an insertion module 1001, a generation module 1002, and an editing module 1003, wherein,

[0093] Insertion module 1001, in response to an editing operation in a document, inserts a generative content component into the document, the generative content component being part of the document content;

[0094] A generation module 1002 is configured to, in response to receiving a generation instruction through the generative content component, create a data block and first content in the document through a language model, wherein the data block includes a code block, and the content contained in the data block and the first content are both associated with the generation instruction;

[0095] The editing module 1003 is used to respond to receiving an editing instruction for the data block and change the first content according to the content of the edited data block.

[0096] The content generation apparatus provided in this embodiment, in response to an editing operation in a document, inserts a generative content component into the document, which is part of the document content; in response to receiving a generation instruction through the generative content component, the generation module creates a data block and first content in the document using a language model. This data block includes a code block, and both the content contained in the data block and the first content are associated with the generation instruction; in response to receiving an editing instruction for the data block, the editing module modifies the first content according to the content of the edited data block. This embodiment utilizes the above technical solution to create data blocks and first content in a document based on generative content components, and supports users to edit the first content created in the document by editing the data blocks created in the document, without needing to resend modification instructions to the generative content component. Compared to technical solutions that generate AI-generated content in the form of conversational messages, this enriches the content generation methods of AI and simplifies the operations required to edit AI-generated content.

[0097] Furthermore, the content generation apparatus may further include: a content input module, configured to, in response to an input operation based on the generative content component, display second content input by the input operation in the input area of ​​the generative content component before creating data blocks and first content in the document through a language model in response to receiving a generation instruction through the generative content component; and an instruction generation module, configured to, in response to a sending operation for the second content, generate a generation instruction corresponding to the second content.

[0098] Furthermore, the content generation apparatus may further include: a content display module, configured to display the second content outside the input area in response to a sending operation for the second content, wherein the second content is displayed as part of the document content.

[0099] Optionally, the generation module 1002 includes: a data block creation unit, configured to create data blocks in the document using a language model; and a content creation unit, configured to create first content in the document based on the data blocks in response to their creation.

[0100] Optionally, the content creation unit may be specifically used to: insert a processing component that matches the attribute characteristics of the data block into the document; process the data block using the processing component; and display the processed first content in the document.

[0101] Furthermore, the content generation apparatus may further include at least one of the following: a first component acquisition module, configured to acquire a processing component matching the attribute characteristics of the data block from a pre-set component library before inserting a processing component matching the attribute characteristics of the data block into the document; and a second component acquisition module, configured to generate a processing component matching the attribute characteristics of the data block in response to a component generation operation before inserting a processing component matching the attribute characteristics of the data block into the document.

[0102] Optionally, the data block further includes a text block and / or a musical score block, wherein the first content includes at least one of the following: visual content or data results obtained based on the code block; message content generated based on the text block; and music content generated based on the musical score block.

[0103] Furthermore, the content generation device may further include at least one of the following: a first application module, configured to add the code block to a corresponding integrated development environment in response to a first application operation on the code block; and a second application module, configured to apply the first content in an application scenario corresponding to the first content in response to a second application operation on the first content.

[0104] Optionally, the generative content component includes a session component, wherein the second content input by the session component includes session content to be sent, and the data block and / or the first content are generated based on the session component's response to the session content; and / or, the data block supports multi-user collaborative editing.

[0105] The content generation apparatus provided in this disclosure can execute the content generation method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the content generation method. Technical details not described in detail in this embodiment can be found in the content generation method provided in any embodiment of this disclosure.

[0106] The following is for reference. Figure 11The diagram illustrates a structural schematic of an electronic device (e.g., a computer or terminal device) 1100 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0107] like Figure 11 As shown, electronic device 1100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1102 or a program loaded from storage device 1108 into random access memory (RAM) 1103. The RAM 1103 also stores various programs and data required for the operation of electronic device 1100. The processing device 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. Input / output (I / O) interface 1105 is also connected to bus 1104.

[0108] Typically, the following devices can be connected to I / O interface 1105: input devices 1106 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1107 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1108 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1109. Communication device 1109 allows electronic device 1100 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 11 An electronic device 1100 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0109] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1109, or installed from storage device 1108, or installed from ROM 1102. When the computer program is executed by processing device 1101, it performs the functions defined in the methods of embodiments of this disclosure.

[0110] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0111] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0112] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0113] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to an editing operation in a document, insert a generative content component into the document, the generative content component being part of the document content; in response to receiving a generation instruction through the generative content component, create a data block and first content in the document using a language model, the data block including a code block, the content contained in the data block and the first content both being associated with the generation instruction; and in response to receiving an editing instruction for the data block, modify the first content according to the content of the edited data block.

[0114] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to component-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0116] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of modules do not, in some cases, constitute a limitation on the unit itself.

[0117] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0118] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0119] According to one or more embodiments of this disclosure, Example 1 provides a content generation method, including:

[0120] In response to an editing operation in a document, a generative content component is inserted into the document as part of the document content;

[0121] In response to receiving a generation instruction through the generative content component, a data block and first content are created in the document through a language model. The data block includes a code block, and the content contained in the data block and the first content are both associated with the generation instruction.

[0122] In response to receiving an edit instruction for the data block, the first content is modified according to the content of the edited data block.

[0123] According to one or more embodiments of this disclosure, Example 2, based on the method of Example 1, further includes, prior to the step of creating data blocks and first content in the document via a language model in response to receiving a generation instruction through the generative content component:

[0124] In response to an input operation based on the generative content component, the second content entered by the input operation is displayed in the input area of ​​the generative content component;

[0125] In response to the sending operation for the second content, a generation instruction corresponding to the second content is generated.

[0126] According to one or more embodiments of this disclosure, Example 3 describes the method according to Example 2, the method further comprising:

[0127] In response to a sending operation for the second content, the second content is displayed outside the input area, wherein the second content is displayed as part of the document content.

[0128] According to one or more embodiments of this disclosure, Example 4, based on the method described in Example 1, the creation of code blocks and first content in the document via a language model includes:

[0129] Data blocks are created in the document using a language model;

[0130] In response to the creation of the data block, first content is created in the document based on the data block.

[0131] According to one or more embodiments of this disclosure, Example 5 describes the method described in Example 4, wherein creating first content in the document based on the data block includes:

[0132] Insert a processing component into the document that matches the attribute characteristics of the data block;

[0133] The data block is processed using the processing component, and the resulting first content is displayed in the document.

[0134] According to one or more embodiments of this disclosure, Example 6, based on the method of Example 5, further includes at least one of the following before inserting a processing component in the document that matches the attribute characteristics of the data block:

[0135] Retrieve processing components that match the attribute characteristics of the data block from a pre-set component library;

[0136] In response to the component generation operation, a processing component that matches the attribute characteristics of the data block is generated.

[0137] According to one or more embodiments of this disclosure, Example 7, based on the method described in Example 4, further includes a text block and / or a musical score block, wherein the first content includes at least one of the following:

[0138] Visual content or data results obtained based on the code block;

[0139] Message content generated based on the text block;

[0140] Music content generated based on the musical score blocks.

[0141] According to one or more embodiments of this disclosure, Example 8 describes the method according to any one of Examples 1-7, wherein the method further includes at least one of the following:

[0142] In response to a first application operation on the code block, the code block is added to the corresponding integrated development environment;

[0143] In response to a second application operation on the first content, the first content is applied in the application scenario corresponding to the first content.

[0144] According to one or more embodiments of this disclosure, Example 9 describes the method according to any one of Examples 1-7, wherein the generative content component includes a session component, wherein the second content input to the session component includes session content to be sent, and the data block and / or the first content is generated based on the session component's response to the session content; and / or

[0145] The data block supports collaborative editing by multiple users.

[0146] According to one or more embodiments of this disclosure, Example 10 provides a content generation apparatus, including:

[0147] An insertion module, in response to an editing operation in a document, inserts a generative content component into the document, the generative content component being part of the document content;

[0148] A generation module is configured to, in response to receiving a generation instruction through the generative content component, create a data block and first content in the document through a language model, wherein the data block includes a code block, and the content contained in the data block and the first content are both associated with the generation instruction;

[0149] An editing module is used to respond to receiving an editing instruction for the data block and modify the first content according to the content of the edited data block.

[0150] According to one or more embodiments of this disclosure, Example 11 provides an electronic device, including:

[0151] One or more processors;

[0152] Memory, used to store one or more programs.

[0153] When the one or more programs are executed by the one or more processors, the one or more processors implement the content generation method as described in any of Examples 1-9.

[0154] According to one or more embodiments of the present disclosure, Example 12 provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the content generation method as described in any of Examples 1-9.

[0155] According to one or more embodiments of this disclosure, Example 13 provides a computer program product that, when executed by a computer, causes the computer to implement the content generation method as described in any of Examples 1-9.

[0156] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0157] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0158] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A content generation method characterized by, The method comprises: in response to an editing operation in a document, inserting a generative content component in the document, the generative content component being part of the document content; in response to receiving a generation instruction through the generative content component, creating a data block and first content in the document through a language model, the data block comprising a code block, the data block containing content and the first content both associated with the generation instruction; in response to receiving an editing instruction for the data block, changing the first content according to the content of the edited data block.

2. The method of claim 1, wherein, Before the response to receiving a generation instruction through the generative content component, the method further comprises: in response to an input operation based on the generative content component, displaying second content input by the input operation in an input area of the generative content component; in response to a sending operation for the second content, generating a generation instruction corresponding to the second content.

3. The method of claim 2, wherein, The method further comprises: in response to a sending operation for the second content, displaying the second content outside the input area, wherein the second content is displayed as part of the document content.

4. The method of claim 1, wherein, The method further comprises: in response to an editing operation in a document, inserting a generative content component in the document, the generative content component being part of the document content; in response to an editing operation in a document, inserting a generative content component in the document, the generative content component being part of the document content; 5. The method of claim 4, wherein, in response to the creation of the data block, creating first content in the document based on the data block. The method further comprises: inserting a processing component matching the attribute characteristics of the data block in the document; 6. The method of claim 5, wherein, processing the data block with the processing component and displaying the first content obtained by processing in the document. Before the insertion of the processing component matching the attribute characteristics of the data block in the document, the method further comprises at least one of: obtaining the processing component matching the attribute characteristics of the data block from a pre-set component library; 7. The method of claim 4, wherein, in response to a component generation operation, generating a processing component matching the attribute characteristics of the data block. The data block further comprises a text block and / or a music score block, and the first content comprises at least one of: visual content or data results based on the code block; message content generated based on the text block; 8. The method according to any one of claims 1 to 7, characterized in that, music content generated based on the music score block. The method further comprises at least one of: in response to a first application operation for the code block, adding the code block to a corresponding integrated development environment; 9. The method according to any of claims 1 to 7, characterized in that in response to a second application operation for the first content, applying the first content in an application scenario corresponding to the first content. The generative content component comprises a conversation component, wherein the second content input by the conversation component comprises conversation content to be sent, and the data block and / or the first content are generated based on reply content of the conversation component to the conversation content; and / or 10. A content generation apparatus characterized by comprising: The data block supports multi-user collaborative editing. The method comprises: inserting a generative content component in the document in response to an editing operation in a document, the generative content component being part of the document content; The generating module is configured to, in response to receiving a generation instruction through the generative content component, create a data block and first content in the document through a language model, the data block comprising a code block, and the data block and the first content both being associated with the generation instruction; The editing module is configured to, in response to receiving an editing instruction for the data block, change the first content according to the content of the edited data block.

11. An electronic device, comprising: The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor.

12. A computer-readable storage medium, characterized in that, The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor.

13. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor. The computer program product comprises a computer program, and the computer program is configured to implement the content generation method in any one of claims 1-9 when executed by the processor