Article generation method and device, electronic equipment and storage medium

CN116468009BActive Publication Date: 2026-06-26BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING BAIDU NETCOM SCI & TECH CO LTD
Filing Date
2023-04-11
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing editors are inefficient in generating articles, fail to meet users' personalized needs, and are complex in integrating multimedia information and handling logical relationships, resulting in a poor user experience.

Method used

The system uses deep learning technology to generate text fragments that match the editing intent, queries semantically matching multimedia information, and combines logical relationships for layout and rendering to achieve automatic article generation.

Benefits of technology

It improves article editing efficiency, enhances the richness and logic of article content, meets users' personalized needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468009B_ABST
    Figure CN116468009B_ABST
Patent Text Reader

Abstract

The disclosure provides an article generation method and device, electronic equipment and storage medium, relating to the technical fields of deep learning, natural language processing and the like. The specific implementation scheme is: analyzing an article editing requirement to obtain an editing intention; generating a plurality of text segments matched with the editing intention; querying multimedia information matched with the semantics of a first text segment in the plurality of text segments, and fusing the multimedia information with the first text segment to obtain a second text segment; and according to a logical relationship between a third text segment and the second text segment in the plurality of text segments, performing layout and rendering on the third text segment and the second text segment to obtain a first article. Thus, the article can be automatically generated according to the editing intention of the user, the editing operation of the user can be reduced, and the editing efficiency of the article can be improved. Moreover, the automatically generated article not only contains character information, but also includes multimedia information, which can improve the richness of the content of the article.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, specifically deep learning, natural language processing, and other technical fields, and particularly to methods, apparatuses, electronic devices, and storage media for generating articles. Background Technology

[0002] Editors include linear editors, rich text editors, etc. Among them, linear editors are the most basic type of editor. Users can enter, edit, and delete text content in the order in which the text or characters appear. Compared with linear editors, rich text editors add and support various text styles, such as bold, italics, colors, and fonts, on the basis of text editing.

[0003] Currently, users can generate articles by entering text in the editor, or by copying and pasting text into the editor.

[0004] The above-mentioned method of manually editing articles in an editor is inefficient. Therefore, in order to improve the efficiency of article editing, it is very important to automatically generate the articles needed by users. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, and storage medium for generating articles.

[0006] According to one aspect of this disclosure, an article generation method is provided, comprising:

[0007] Obtain the article editing requirements and parse them to determine the editing intent;

[0008] Generate multiple text fragments that match the editing intent;

[0009] Query multimedia information that semantically matches at least one first text fragment among the plurality of text fragments, and fuse the multimedia information with the first text fragment to obtain a second text fragment;

[0010] Based on the logical relationship between the third text segment (excluding the first text segment) and the second text segment among the plurality of text segments, the third text segment and the second text segment are typed and rendered to obtain the first article.

[0011] According to another aspect of this disclosure, an article generation apparatus is provided, comprising:

[0012] The first processing module is used to obtain the article editing requirements and parse the article editing requirements to obtain the editing intent;

[0013] A generation module is used to generate multiple text fragments that match the editing intent;

[0014] The query module is used to query multimedia information that semantically matches at least one first text fragment among the plurality of text fragments;

[0015] A fusion module is used to fuse the multimedia information with the first text segment to obtain a second text segment;

[0016] The second processing module is used to type and render the third text segment and the second text segment according to the logical relationship between the third text segment (excluding the first text segment) and the second text segment among the plurality of text segments, so as to obtain the first article.

[0017] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0018] At least one processor; and

[0019] A memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the article generation method proposed in the foregoing aspect of this disclosure.

[0021] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided for computer instructions used to cause the computer to perform the article generation method proposed in the foregoing aspect of this disclosure.

[0022] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the article generation method proposed in the above aspect of this disclosure.

[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0024] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0025] Figure 1 This is a flowchart illustrating the article generation method provided in Embodiment 1 of this disclosure;

[0026] Figure 2This is a flowchart illustrating the article generation method provided in Embodiment 2 of this disclosure;

[0027] Figure 3 This is a flowchart illustrating the article generation method provided in Embodiment 3 of this disclosure;

[0028] Figure 4 This is a schematic flowchart of the article generation method provided in Embodiment 4 of this disclosure;

[0029] Figure 5 A schematic diagram illustrating the transformation process of the knowledge production process provided in this embodiment of the disclosure;

[0030] Figure 6 A schematic diagram illustrating the transition process of the multi-user editing mode provided in the embodiments of this disclosure;

[0031] Figure 7 This is a schematic diagram of the composition structure of the intelligent editor provided in the embodiments of this disclosure;

[0032] Figure 8 This is a schematic diagram of the structure of the article generation device provided in Embodiment 5 of this disclosure;

[0033] Figure 9 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0034] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0035] Currently, editors are typically implemented using technologies from computer science, natural language processing, and human-computer interaction, employing various algorithms and techniques to achieve diverse text editing and processing functions. Below are some common editor implementation schemes:

[0036] First, the linear editor.

[0037] A linear editor is the most basic type of editor. Users can input, edit, and delete text content sequentially according to the order in which words or characters appear. This type of editor is usually relatively simple to implement, requiring only basic text input and deletion functions. In other words, its implementation is relatively simple, mainly involving the implementation of text input and deletion functions.

[0038] Linear editors are basic text editors, relatively simple in implementation but with limited functionality, unable to support various rich text formats and advanced features such as autocorrect. As editor technology continues to develop, users' demands for editor functionality and performance are increasing, gradually leading to the evolution of various types of editors, including rich text editors, code editors, and collaborative editors.

[0039] Second, rich text editors.

[0040] Compared to linear editors, rich text editors add and support various text styles, such as bold, italics, colors, and fonts, on top of text editing. These editors are typically implemented using front-end technologies such as HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets), and also need to support the conversion and storage of rich text in various formats.

[0041] The specific implementation scheme of the rich text editor is as follows:

[0042] 1. Editing Area: Rich text editors typically include an editing area for displaying and editing text content. This editing area can be implemented using the browser's contenteditable property, or it can be implemented using a third-party rich text editor library.

[0043] 2. Rich Text Formatting: Rich text editors support the input and editing of various text formats, such as font, color, font size, bold, italic, underline, links, and images. Rich text formatting can be implemented through the browser's contenteditable API (Application Programming Interface), or it can be implemented using the API of a rich text editor library.

[0044] 3. Images and Multimedia: The rich text editor supports inserting multimedia content such as images, audio, and video. Images can be uploaded via the browser's file upload function, or they can be implemented using the rich text editor library's API; audio and video can be implemented using the HTML5 video and audio elements.

[0045] 4. Automatic Formatting: Rich text editors support automatic formatting, which can automatically format the input text content according to specified styles. Automatic formatting can be achieved through the browser's contenteditable API, or it can be implemented using CSS styles and JavaScript (a lightweight, interpreted or just-in-time compiled programming language with a function-first approach).

[0046] 5. History: Rich text editors support undo and redo functionality, recording the user's operation history. This history can be implemented using the browser's UndoManager API, or alternatively, using the rich text editor library's API.

[0047] 6. Compatibility: Rich text editors need to consider compatibility between different browsers. Compatibility issues can be resolved using polyfills (code to implement native APIs that browsers do not support) or shiv and other technologies.

[0048] Third, it provides auxiliary automatic error correction and automatic completion.

[0049] Autocorrection and autocomplete are common features in existing editors. They achieve these functions by analyzing and processing the user's input text. These editors typically rely on natural language processing technologies, including those based on vocabularies, statistical models, and machine learning.

[0050] Automatic error correction and automatic completion are mainly achieved through the following methods:

[0051] 1. Rule-based approach: The rule-based approach involves first establishing some language rules, and then using these rules to detect and correct misspelled characters (such as words), or to automatically complete the input of characters (such as words). For example, if a user inputs "teh", the system can detect through language rules that the correct form of this word should be "the".

[0052] The advantage of this method is its simplicity, but it requires manual setting of relevant language rules, and the error correction effect is not good for newly emerging characters (such as words) or languages ​​that change rapidly.

[0053] 2. Statistical methods: Statistical methods refer to using large corpora and machine learning algorithms to detect and correct misspelled characters (such as words) or automatically complete the input of characters (such as words) by analyzing the frequency and patterns of language.

[0054] The advantage of this method is that it can adapt to newly emerging characters (such as words) and languages ​​that change rapidly, but it requires a large dataset and algorithm model to support it.

[0055] 3. Neural Network-Based Methods: Neural network-based methods refer to using deep learning algorithms to train neural network models to detect and correct misspelled characters (such as words), or to automatically complete the input of characters (such as words).

[0056] The advantage of this method is that it can adaptively learn language rules and changes, and it works well in complex language scenarios, but it requires a large amount of training data and computing resources.

[0057] 4. Combining multiple methods: In order to overcome the shortcomings of various methods, some editors now use a combination of multiple methods to achieve automatic error correction and automatic completion functions.

[0058] For example, rule-based methods can be used to initially detect and correct misspelled characters (such as words), and then statistical and neural network methods can be combined for optimization and refinement. The advantage of this method is that it combines the strengths of various methods, resulting in more accurate and reliable results.

[0059] Fourth, real-time collaborative editing.

[0060] Real-time collaborative editing is a technology that allows multiple users to edit and collaborate on the same article or document simultaneously. This type of editor is typically implemented using network protocols and real-time communication technologies, including WebSocket (a full-duplex communication protocol based on TCP (Transmission Control Protocol)), real-time databases, and broadcast communication.

[0061] However, the technologies mentioned above have at least the following drawbacks:

[0062] The drawbacks of rich text editors include:

[0063] 1. High complexity: Rich text editors need to implement a large number of functions, including formatting, inserting images, tables, etc., which leads to high complexity and high maintenance costs.

[0064] 2. Compatibility issues: The implementation of rich text editors differs between different browsers, and different versions of browsers support different functions of rich text editors. Therefore, different adaptation solutions are needed for different browsers.

[0065] 3. Security issues: Rich text editors have risks when parsing HTML and CSS. Attackers may inject malicious code into the text to carry out attacks.

[0066] The disadvantages of automatic error correction and automatic completion include:

[0067] 1) Inaccuracy: The accuracy of automatic error correction and automatic completion is affected by the corpus and algorithm, and there may be problems such as missing words and misjudgment;

[0068] 2) Context issues: Automatic error correction and autocomplete algorithms often only consider the currently input text and do not take the context into account, which may lead to inaccurate results;

[0069] 3) Speed ​​issues: Automatic error correction and automatic completion require real-time calculations during input. If the algorithm complexity is too high, it may lead to a large input delay, affecting the user experience.

[0070] In response to at least one of the aforementioned problems, this disclosure proposes an article generation method, apparatus, electronic device, and storage medium.

[0071] The article generation method, apparatus, electronic device, and storage medium of this disclosure are described below with reference to the accompanying drawings.

[0072] Figure 1 This is a flowchart illustrating the article generation method provided in Embodiment 1 of this disclosure.

[0073] This disclosure illustrates the example of the article generation method being configured in an article generation device, which can be applied to any electronic device to enable the electronic device to perform the article generation function.

[0074] Among them, electronic devices can be any device with computing capabilities, such as personal computers (PCs), mobile terminals, servers, etc. Mobile terminals can be hardware devices with various operating systems, touch screens and / or displays, such as in-vehicle devices, mobile phones, tablets, personal digital assistants, wearable devices, etc.

[0075] like Figure 1 As shown, the article generation method may include the following steps:

[0076] Step 101: Obtain the article editing requirements and analyze them to obtain the editing intent.

[0077] In this embodiment of the disclosure, the article editing request can be input by the user. For example, taking the method as an example when applied to an editor, the user can input the article editing request on the editor side. For example, the article editing request can be "Help me write an article about recommendation systems".

[0078] In this embodiment of the disclosure, the article editing requirements can be parsed to obtain the editing intent. Using the example above, the editing intent could be "editing articles related to the recommendation system".

[0079] Step 102: Generate multiple text fragments that match the editing intent.

[0080] In this embodiment of the disclosure, multiple text fragments matching the editing intent can be generated based on deep learning technology.

[0081] As an example, a trained writing model can be used to generate multiple text fragments that match the editor's intent.

[0082] The training process of the writing model may include: acquiring training data, which includes sample editing intentions and sample articles (or sample text fragments); using an initial writing model to generate a predicted article (or predicted text fragment) that matches the sample editing intention based on the sample editing intention; and thus training the initial writing model based on the difference between the sample article (or sample text fragment) and the predicted article (or predicted text fragment).

[0083] Step 103: Query multimedia information that semantically matches at least one of the multiple text fragments, and fuse the multimedia information with the first text fragment to obtain the second text fragment.

[0084] The first text segment can be any one of multiple text segments.

[0085] Multimedia information can also be referred to as multimedia resources, including but not limited to images, audio, and video.

[0086] In this embodiment of the disclosure, multimedia information that semantically matches at least one first text fragment among multiple text fragments can be queried from a database or resource pool, or multimedia information that semantically matches the first text fragment can be queried or searched online using web crawler technology.

[0087] In this embodiment of the disclosure, multimedia information can be fused with a first text fragment to obtain a second text fragment.

[0088] As an example, multimedia information can be inserted at the end of the first text segment to obtain the second text segment.

[0089] As another example, multimedia information can be inserted into the header of the first text segment to obtain the second text segment.

[0090] As another example, multimedia information can be inserted in the middle of a first text segment to obtain a second text segment.

[0091] Step 104: Based on the logical relationship between the third and second text fragments (excluding the first text fragment), the third and second text fragments are formatted and rendered to obtain the first article.

[0092] In this disclosed embodiment, the logical relationships include, but are not limited to: parallel relationships (for example, four text fragments represent four viewpoints, and the viewpoints are parallel to each other), general-to-specific relationships (for example, a text fragment mentions "the scope of production and processing is very broad, and the following paragraphs will provide examples to illustrate it, that is, to list the field of grain production for illustration), and it can be seen that the text fragment and the subsequent paragraphs are in a general-to-specific relationship), causal relationships, and adversative relationships.

[0093] In this embodiment of the disclosure, the logical relationship between a third text segment (excluding the first text segment) and a second text segment can be identified based on natural language processing technology. Based on the above logical relationship, the third text segment and the second text segment are typed and rendered to obtain a first article.

[0094] In one possible implementation of this disclosure, the third text segment and the second text segment can be typed and rendered according to the logical relationship and semantic structure between them to obtain the first article.

[0095] The article generation method of this disclosure analyzes the article editing requirements to obtain the editing intent and generates multiple text fragments matching the editing intent. It then queries multimedia information that semantically matches at least one first text fragment among the multiple text fragments and merges the multimedia information with the first text fragments to obtain a second text fragment. Based on the logical relationship between the third text fragment (excluding the first text fragment) and the second text fragment, it typesets and renders the third and second text fragments to obtain a first article. Therefore, it can automatically generate articles based on the user's editing intent, reducing user editing operations and improving article editing efficiency. Furthermore, the automatically generated articles include not only character information but also multimedia information, which can enhance the richness of the article content, meet the user's article editing needs, and improve the user experience.

[0096] It should be noted that the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution disclosed herein are all carried out with the consent of the user, and all comply with the provisions of relevant laws and regulations, and do not violate public order and good morals.

[0097] To clearly illustrate any embodiment of this disclosure, a method for generating an article is also proposed.

[0098] Figure 2 This is a flowchart illustrating the article generation method provided in Embodiment 2 of this disclosure.

[0099] like Figure 2 As shown, the article generation method may include the following steps:

[0100] Step 201: Obtain the article editing requirements and analyze them to obtain the editing intent.

[0101] Step 202: Generate multiple text fragments that match the editing intent.

[0102] The explanation of steps 201 to 202 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.

[0103] In any embodiment of this disclosure, multiple text fragments matching the editing intent can be generated based on deep learning technology to improve the quality of the generated article.

[0104] As an example, the article editing requirement can also include article description information. For instance, if the article editing requirement is "Help me write an article about recommendation systems, and the article needs to contain A, B, and C," then the editing intent can be "Edit an article related to recommendation systems," and the article description information can be "The article contains A, B, and C." In this disclosure, the compilation intent and article description information can be input into the first prediction network in a trained writing model to obtain multiple text fragments output by the first prediction network.

[0105] The training process of the writing model may include: acquiring training data, which includes sample editing intent, sample description information and sample articles (or sample text fragments); using the first prediction network in the initial writing model to generate or predict a predicted article (or predicted text fragment) that matches the sample editing intent and sample description information based on the sample editing intent and sample description information; thereby, the initial writing model can be trained based on the difference between the sample article (or sample text fragment) and the predicted article (or predicted text fragment).

[0106] Therefore, by using deep learning technology to predict multiple text fragments that match the editing intent and article description information, the quality of article generation can be improved. Furthermore, since the article is predicted based on both the user's input editing intent and article description information, it can meet the user's article editing needs and improve the user experience.

[0107] Step 203: Query multimedia information that semantically matches at least one of the multiple text fragments (first text fragment), and fuse the multimedia information with the first text fragment to obtain the second text fragment.

[0108] Step 204: Based on the logical relationship between the third and second text fragments (excluding the first text fragment), the third and second text fragments are typed and rendered to obtain the first article.

[0109] The explanation of steps 203 to 204 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.

[0110] Step 205: Obtain the update request for the first article from the input of the first object.

[0111] The first object can be a user. For example, if this method is applied to an editor, the first object can be a user using the editor.

[0112] In this embodiment of the disclosure, the update request for the first article input by the first object can be obtained. For example, the update request can be "bold the article title", "increase or decrease the font size", "adjust the article's total-to-part structure to a causal structure", etc.

[0113] Step 206: parse the update requirements to obtain at least one object to be updated and an update command that matches each object to be updated.

[0114] In this embodiment of the disclosure, the update command is used to update the font, font size, article format, semantic structure, etc. of the article, and can also be used to bold, italicize, etc. some or all of the characters in the article.

[0115] The update command can be the smallest granular command or instruction. For example, taking the update requirement as "bold the article title and increase the font size of the last paragraph of the article" as an example, the objects to be updated can include the "article title" and the "last paragraph of the article". The update command matching the "article title" is "bold" and the update command matching the "last paragraph of the article" is "increase font size".

[0116] In this embodiment of the disclosure, update requests can be parsed based on natural language processing technology to obtain at least one object to be updated and update commands matching each object to be updated.

[0117] Step 207: Input each update command into the second prediction network of the writing model to obtain the target code output by the second prediction network that matches each update command.

[0118] In this embodiment of the disclosure, each update command can be input into the second prediction network of the writing model so that the second prediction network can predict the target code (or code logic) that matches each update command.

[0119] In this model, the second prediction network has learned the correspondence between commands and code (or code logic).

[0120] Step 208: For each object to be updated in the first article, execute the target code that matches the corresponding update command to update the first article and obtain the second article.

[0121] In this embodiment of the disclosure, for any object to be updated in the first article, the target code corresponding to the update command matching the object to be updated can be executed to update the object to be updated in the first article, thereby obtaining the second article.

[0122] In one possible implementation of this disclosure, when the article generation method is applied to an editor, since different editors may be adapted to different programming languages, for example, editor A is developed based on the C language, editor B is developed based on the Go language, and editor C is developed based on the Java language, in order to enable the writing model to adapt to various editors, the second prediction network in the writing model can learn in advance the correspondence between the code and commands of different programming languages. Thus, in this disclosure, the target programming language adapted to the editor to which the article editing method is applied can be obtained, and each update command and the target programming language can be input into the second prediction network to obtain the target code output by the second prediction network that matches each update command and the target programming language.

[0123] In summary, each target code not only matches the update command but also the target programming language that the editor is compatible with, which can improve the success rate of the editor in executing target code and solve the compatibility issues between different editors and writing models.

[0124] The article generation method disclosed in this embodiment allows users to update the generated articles according to their own needs, thus meeting the personalized editing needs of different users.

[0125] To clearly illustrate the above embodiments, this disclosure also proposes an article generation method.

[0126] Figure 3 This is a flowchart illustrating the article generation method provided in Embodiment 3 of this disclosure.

[0127] like Figure 3 As shown, the article generation method may include the following steps:

[0128] Step 301: Obtain the article editing requirements and analyze them to obtain the editing intent.

[0129] Step 302: Generate multiple text fragments that match the editing intent.

[0130] Step 303: Query multimedia information that semantically matches at least one of the multiple text fragments, and fuse the multimedia information with the first text fragment to obtain the second text fragment.

[0131] Step 304: Based on the logical relationship between the third and second text fragments (excluding the first text fragment), the third and second text fragments are typed and rendered to obtain the first article.

[0132] Step 305: Obtain the update requirements for the first article from multiple first object inputs.

[0133] Step 306: parse any update request to obtain at least one object to be updated and an update command that matches each object to be updated.

[0134] Step 307: Input each update command into the second prediction network of the writing model to obtain the target code output by the second prediction network that matches each update command.

[0135] The explanation of steps 301 to 307 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.

[0136] Step 308: When multiple update requests triggered by the first object contain different objects to be updated, for each object to be updated in the first article, execute the target code that matches the corresponding update command to update the first article and obtain the second article.

[0137] In this embodiment of the disclosure, when multiple first objects trigger update requests containing different objects to be updated, no conflicts or errors will occur during collaborative editing or modification by multiple people. Therefore, target code matching the corresponding update command can be executed for all objects to be updated in the first article to update the first article and obtain the second article. For example, the target code corresponding to each update command can be executed in parallel to update the first article and obtain the second article.

[0138] Step 309: When at least two update requests triggered by the first object contain the same object to be updated, execute the first target code for the same object to be updated and update the same object to be updated to a locked state.

[0139] The first target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by the target object among multiple first objects. The locked state does not allow other objects among multiple first objects besides the target object to edit the same object to be updated.

[0140] In this embodiment of the disclosure, when at least two first objects trigger update requests that include the same object to be updated, for the other objects to be updated in each object other than the same object to be updated, the target code matching the corresponding update command can be executed on the other objects to be updated in the first article.

[0141] Regarding the same object to be updated, conflicts and errors may occur during collaborative editing or modification by multiple people. Therefore, in this disclosure, a first target code can be executed on the same object to be updated in the first article. The first target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by the target object. The target object is one of multiple first objects. For example, the target object can be the first object that triggered the update request earliest.

[0142] In this embodiment of the disclosure, when executing the first target code on the same object to be updated in the first article, the same object to be updated can also be updated to a locked state, wherein the locked state does not allow other objects among the multiple first objects, except for the target object, to edit or update the same object to be updated in the first article.

[0143] Step 310: In response to the completion of the first target code execution, update the same object to be updated to the unlocked state.

[0144] The unlocked state allows other objects to edit the same object that is to be updated.

[0145] In this embodiment of the disclosure, when the first target code is executed, the same object to be updated in the first article can be updated to an unlocked state, wherein the unlocked state allows other objects to edit or update the same object to be updated in the first article.

[0146] Step 311: For the same object to be updated, execute the second target code to obtain the second article.

[0147] The second target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by other objects.

[0148] In this embodiment of the disclosure, when the same object to be updated is in an unlocked state, a second target code can be executed on the same object to be updated to obtain a second article. The second target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by other objects.

[0149] The article generation method of this disclosure can, when multiple first objects want to update the same object to be updated, first update the same object to be updated in the first article according to the target code corresponding to the update command of the same object to be updated in the update request triggered by one object. Furthermore, during the update process, the same object to be updated is locked to prevent other objects from updating the same object to be updated. Only when the same object to be updated is updated is other objects allowed to update the same object to be updated. This can avoid conflict problems when multiple users collaborate on editing.

[0150] To clearly illustrate any embodiment of this disclosure, a method for generating an article is also proposed.

[0151] Figure 4 This is a flowchart illustrating the article generation method provided in Embodiment 4 of this disclosure.

[0152] like Figure 4 As shown, the article generation method may include the following steps:

[0153] Step 401: Obtain the article editing requirements and analyze them to obtain the editing intent.

[0154] Step 402: Generate multiple text fragments that match the editing intent.

[0155] Step 403: Query multimedia information that semantically matches at least one of the multiple text fragments, specifically a first text fragment.

[0156] The explanations of steps 401 to 403 can be found in the relevant descriptions in any embodiment of this disclosure, and will not be repeated here.

[0157] Step 404: Preprocess the multimedia information, wherein the preprocessing includes at least one of cropping, resizing, sharpness adjustment and noise reduction.

[0158] In this embodiment of the disclosure, in order to improve the quality of multimedia information, the multimedia information can be preprocessed, wherein the preprocessing includes, but is not limited to, cropping, size adjustment (including size enlargement and size reduction), sharpness adjustment, noise reduction, and quality optimization.

[0159] As an example, when the size of multimedia information is large, it can be cropped and / or its size reduced.

[0160] As an example, when the clarity of multimedia information is low, clarity adjustment, noise reduction, or quality optimization can be performed on the multimedia information to improve its quality.

[0161] Step 405: The preprocessed multimedia information is fused with the first text fragment to obtain the second text fragment.

[0162] In this embodiment of the disclosure, the preprocessed multimedia information can be fused with the first text segment to obtain the second text segment.

[0163] As an example, multimedia information can be inserted at the end of the first text segment to obtain the second text segment.

[0164] As another example, multimedia information can be inserted into the header of the first text segment to obtain the second text segment.

[0165] As another example, multimedia information can be inserted in the middle of a first text segment to obtain a second text segment.

[0166] Step 406: Based on the logical relationship between the third and second text fragments (excluding the first text fragment), the third and second text fragments are typed and rendered to obtain the first article.

[0167] The explanation of step 406 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.

[0168] In any embodiment of this disclosure, at least one of the following can be performed on the first article to further improve the quality of the generated article and meet the user's personalized article generation needs:

[0169] The first step is to perform error correction on the characters and grammar in the first article based on the context information of the first article.

[0170] As an example, deep learning technology can be used to correct characters and grammar in the first article based on the context information of the first article.

[0171] For example, writing models can also have automatic error correction capabilities. They can use writing models (such as the GPT (Generative Pre-trained Transformer) model) to correct characters and grammar in the first article based on the context information of the first article.

[0172] The second step is to extract a summary from the first article and generate the article title based on the extracted summary.

[0173] As an example, a summary can be extracted from the first article using abstract extraction technology, and the article title can be generated based on the extracted summary.

[0174] For example, a summary of the first article can be extracted using a writing model, and the article title of the first article can be generated based on the extracted summary.

[0175] The third step is to identify whether there is sensitive information in the first article. If there is sensitive information in the first article, the sensitive information in the first article will be deleted or replaced.

[0176] As an example, a writing model can be used to identify whether there is sensitive information in the first article. If sensitive information is found in the first article, it can be deleted or replaced.

[0177] As another example, a sensitive word database can be queried to determine whether each word in the first article is located in the database. The sensitive word database includes multiple sensitive words. If a word in the first article is located in the database, that word is treated as sensitive information (i.e., a sensitive word), and that sensitive information in the first article is deleted or replaced.

[0178] As another example, a sensitive information database can be queried to determine whether there is sensitive information in the first article. The sensitive information database includes multiple sensitive information items. If the first article contains sensitive information located in the sensitive information database, then the sensitive information in the first article will be deleted or replaced.

[0179] The fourth step involves identifying at least one fourth text segment in the first article to be translated and the target language to which it is to be translated, and translating the fourth text segment in the first article into a fifth text segment in the target language.

[0180] In this embodiment of the disclosure, the user can select at least one fourth text segment to be translated from the first article according to their own needs, and select the target language to which the translation is to be made (such as English, French, etc.). Accordingly, based on the selection operation triggered by the user, at least one fourth text segment to be translated from the first article and the target language can be determined, and the fourth text segment in the first article can be translated into a fifth text segment in the target language.

[0181] The fifth step involves querying whether there is a second article among multiple candidate articles that has a semantic similarity to the first article that is higher than a set threshold. If a second article exists, the article is regenerated according to the editor's intention, so that the semantic similarity between the regenerated article and multiple candidate articles is lower than the set threshold.

[0182] In this embodiment of the disclosure, the candidate articles can be articles from a resource pool or database, or they can be articles from the Internet.

[0183] In this embodiment of the disclosure, the semantic similarity between the first article and multiple candidate articles can be calculated, and it can be determined whether the semantic similarity of the multiple candidate articles is higher than a set threshold. If the semantic similarity of the multiple candidate articles is lower than the set threshold, no processing is required. If there is a second article among the multiple candidate articles with a semantic similarity higher than the set threshold, the article can be regenerated according to the editing intention so that the semantic similarity between the regenerated article and the multiple candidate articles is lower than the set threshold.

[0184] In summary, this system can perform error correction on automatically generated articles, generate article titles, delete or replace sensitive information in articles, automatically translate articles, and perform plagiarism checks to improve the quality of generated articles and meet users' personalized article generation needs.

[0185] In any embodiment of this disclosure, target content can also be identified from the first article, wherein the target content includes keywords and / or knowledge points, and the target content in the first article is annotated.

[0186] The annotations include, but are not limited to: bolding the target content, adjusting the font of the target content, adjusting the font size of the target content, and adjusting the color of the target content.

[0187] This allows for the highlighting of important content within the first article, enabling users to quickly grasp the key information and improving the user experience.

[0188] In any embodiment of this disclosure, the user can also manually modify or update the first article. Accordingly, an update request can be obtained, wherein the update request is generated based on the update operation triggered by the second object on the first article, and in response to the update request, the article content and / or layout format of the first article are updated.

[0189] The second object and the first object can be the same object or they can be different objects; this disclosure does not impose any restrictions on this.

[0190] Therefore, it is possible to update the content and / or formatting of the first article based on the update operation triggered by the user, so as to meet the user's personalized update needs.

[0191] The article generation method of this disclosure can preprocess multimedia information to improve its quality, thereby improving the quality of subsequent article generation.

[0192] In any embodiment of this disclosure, the editor can be an AIGC (AI (Artificial Intelligence) Generated Content) intelligent editor that can use artificial intelligence technology to achieve automated text analysis and processing, thereby solving the problem of low processing efficiency caused by multiple manual processes in traditional editors.

[0193] In other words, AIGC-based intelligent editors (or intelligent editing engines) can solve at least the following problems:

[0194] First, the editing efficiency is low: traditional text editors usually rely on users to manually input or copy and paste text, which is inefficient and prone to errors.

[0195] The intelligent editor provided in this disclosure can utilize artificial intelligence and graph computing technologies to automatically analyze and understand text content, and automatically complete various editing tasks according to user needs, thereby improving the efficiency of article editing.

[0196] Second, the editing error rate is high: traditional text editors are prone to typos, grammatical errors, and other problems, especially when editing long articles, these errors will greatly reduce the quality of the article.

[0197] The intelligent editor provided in this publication can automatically detect and correct errors in text using artificial intelligence technology, thereby reducing the error rate.

[0198] Third, editing quality is difficult to guarantee: Traditional text editors struggle to ensure text quality, especially in collaborative editing scenarios where different editors' styles and standards can affect the final article's quality.

[0199] The intelligent editor provided in this disclosure can automatically analyze and optimize the structure and content of text through artificial intelligence and graph computing technologies, thereby improving editing quality and ensuring consistency.

[0200] Furthermore, the intelligent editor can automatically generate text content such as article summaries, keywords, and titles to reduce editing time and effort.

[0201] Traditional text editors require manual reading and analysis of text to extract summaries and keywords, which is time-consuming, labor-intensive, and prone to errors. The intelligent editor disclosed herein, however, can automatically extract article summaries and keywords and generate compliant titles through technologies such as natural language processing and machine learning, thereby achieving automated text or article generation.

[0202] The intelligent editor disclosed herein, which is primarily machine-based and supplemented by human intervention, has the following advantages over traditional human-based editors, and solves several problems existing in traditional editors:

[0203] 1. Improve editing efficiency: Machine-based editors, utilizing artificial intelligence technology and automated algorithms, can quickly complete a large number of text analysis and processing tasks, thereby improving editing efficiency and reducing the degree of human intervention.

[0204] 2. Reduce human error: Traditional editors require manual checking and correction of text errors one by one, which is time-consuming, labor-intensive, and prone to errors. Machine-based editors can use technologies such as natural language processing and machine learning to automatically detect and correct errors in text, thereby reducing the possibility of human editing errors.

[0205] 3. Improve text or article quality: Machine-based editors can automatically complete various text generation tasks, including but not limited to text classification, keyword extraction, and article summary generation, thereby improving the quality and accuracy of text or articles.

[0206] 4. Handling large-scale data: Traditional editors require a significant amount of time and effort when dealing with large-scale data. Machine-based editors, on the other hand, can utilize technologies such as distributed computing and graph computing to quickly process large-scale data and provide efficient editing tools.

[0207] In summary, machine-based editors, by utilizing artificial intelligence technology to automate text analysis and processing, improve editing efficiency, reduce human error, and enhance the quality of generated text or articles. They solve many problems existing in traditional editors, providing users with a more intelligent, efficient, and accurate text editing tool.

[0208] Among them, the AIGC-based intelligent editor can be applied to various text editing-related products and projects, including but not limited to:

[0209] 1) Text editing software: This type of software is typically used to handle various text editing tasks, such as writing, typesetting, editing, and proofreading. AIGC-based intelligent editors can provide these software programs with intelligent text processing functions, such as automatically correcting typos, automatically analyzing article structure, and automatically extracting keywords.

[0210] 2) Content Management Systems: These systems are primarily used to manage the content of websites or applications, including articles, pages, images, videos, etc. AIGC-based intelligent editors can provide these systems with intelligent text processing functions, such as automatically tagging article topics, automatically extracting image descriptions, and automatically identifying similar articles.

[0211] 3) Knowledge Management System: These systems are primarily used to manage the knowledge, experience, and information resources within an enterprise, providing a platform for employees to learn and conduct research. AIGC-based intelligent editors can provide these systems with intelligent text processing functions, such as automatically classifying documents, automatically annotating knowledge points, and automatically extracting key information.

[0212] 4) Natural Language Processing Tools: These tools are primarily used for various processing and analysis of natural language text, such as sentiment analysis, text classification, and keyword extraction. AIGC-based intelligent editors can provide these tools with more accurate, efficient, and intelligent text analysis and processing capabilities, thereby improving their performance and effectiveness.

[0213] 5) Intelligent Text Services: These services are primarily used to automatically generate text content such as articles, summaries, and translations for users. AIGC-based intelligent editors can provide intelligent text generation functions for these services, such as automatic article summarization, automatic article translation, and automatic text completion.

[0214] 6) Intelligent Writing Assistance Tools: These tools are primarily used to assist users in completing various writing tasks, such as proofreading, grammar checking, and automatic switching of language styles. AIGC-based intelligent editors can provide these tools with intelligent text processing functions, such as automatic error correction, automatic vocabulary recommendation, and automatic translation of language styles.

[0215] In other words, AIGC-based intelligent editors can be applied to various text editing and processing fields, providing users with more intelligent, efficient, and accurate text editing and processing tools, and providing strong support for enterprises to improve work efficiency and reduce costs.

[0216] With the continuous development and application of artificial intelligence technology, the role of knowledge production within enterprises will undergo a fundamental transformation. Machines will gradually replace human work and become the main actors, while humans will become assistants to machines. This transformation will greatly improve the efficiency and quality of knowledge production within enterprises, thereby enhancing their operational efficiency.

[0217] Intelligent editors are a key technology for transforming knowledge production within enterprises. Compared to traditional, primarily manual editing methods, intelligent editors, through AI-based algorithms and models, place machines in a dominant position, thereby achieving efficient and high-quality knowledge production. Intelligent editors can solve the problems of cumbersome manual operations, error-proneness, and inefficiency inherent in traditional editors. Furthermore, through semantic analysis and natural language generation technologies, intelligent editors can provide a more intelligent and personalized editing experience, meeting the knowledge production needs of enterprises across different fields.

[0218] The transformation of the role of knowledge production within enterprises will become more apparent through intelligent editors. Intelligent editors can place machines in a dominant position, achieving efficient and high-quality knowledge production. Human intervention will become an aid to the intelligent editor, optimizing editing results and improving the efficiency and quality of knowledge production through manual intervention and guidance. This transformation will powerfully promote the transformation and upgrading of knowledge production within enterprises, improving operational efficiency and competitiveness.

[0219] As an example, the traditional knowledge production process can be transformed into something like... Figure 5 The knowledge production process is shown.

[0220] Among them, the intelligent editor based on AIGC technology will provide a more efficient and convenient way for multi-person collaboration, realizing a knowledge production mode that is machine-driven and human-assisted. The intelligent editor can learn users' editing habits and behaviors and automatically provide editing suggestions, such as automatic completion and automatic error correction, reducing the editing burden on users.

[0221] For multi-user collaboration, the intelligent editor also enables real-time collaborative editing, allowing multiple users to edit and modify the same article or document simultaneously. This avoids the communication and waiting time inherent in traditional manual collaboration, thus improving editing efficiency. Furthermore, the intelligent editor can use AIGC technology to identify and resolve potential conflicts and errors during multi-user collaboration, reducing the need for human intervention.

[0222] As an example, the human collaboration model can be transformed into something like... Figure 6 The multi-user collaborative editing mode shown.

[0223] This disclosure allows for the deep integration of rich text editor capabilities, rich text formatting, images and multimedia, automatic typesetting, and deep learning technologies (such as GPT technology) to create a more efficient, intelligent, and automated text editor. The implementation steps are as follows:

[0224] The first step uses a writing model as an example of the GPT model. By combining a rich text editor with GPT technology, more intelligent automatic error correction and auto-completion functions can be achieved. Specifically, GPT technology can learn from a large corpus of data to automatically determine the user's input or editing intent, helping users automatically complete common sentences, paragraphs, and even entire articles.

[0225] The second step is to combine GPT technology to achieve more intelligent typesetting functions. For example, it can automatically typeset the article according to its semantic structure and paragraph logic, making the article more readable and aesthetically pleasing.

[0226] The third step is to add image and multimedia processing functions to the rich text editor. By combining GPT technology, more intelligent image and multimedia processing can be achieved, such as automatic image cropping, automatic image quality optimization, and automatic matching of multimedia resources.

[0227] The fourth step is to combine GPT technology to achieve more intelligent text formatting functions, such as automatically identifying key content in text or articles, and automatically adjusting titles, fonts, and styles.

[0228] The fifth step involves combining GPT technology with the collaborative features of a rich text editor to achieve more efficient multi-user collaborative editing. For example, when multiple users are editing an article or document simultaneously, the system can automatically identify their intentions and intelligently handle conflicts and merge content, thereby improving the efficiency and quality of collaborative editing.

[0229] As an example, a smart editor may include, for example, Figure 7 The two components shown are the editor symbol learning engine and the editor logic learning engine. The editor symbol learning engine is one of the core components of the intelligent editor. It enables the machine to learn from large amounts of raw code data, extracting various symbols and identifiers required by the intelligent editor for automatic error correction, automatic completion, and other editing operations. Its implementation process includes the following parts:

[0230] 1. Raw Code Data Collection: Collect source code data for various programming languages, including but not limited to code repositories, public repositories, and academic paper code. This code data can be obtained through web crawlers, API interfaces, or uploaded by users.

[0231] 2. GPT Learning: Using natural language processing algorithms such as GPT, the original code data is learned to extract various code symbols and identifiers, as well as the correspondence between various commands and code logic (for example, different commands can be labeled with their corresponding code logic, and the model can learn this correspondence). Symbols and identifiers include, but are not limited to, variable names, function names, keywords, comments, and spaces.

[0232] 3. Symbol Identification: Classify and label the various symbols and identifiers learned to facilitate subsequent editing operations. For example, different colors or icons can be assigned to symbols such as variable names and function names to distinguish them from other symbols.

[0233] 4. Basic Editor: Based on the learned symbols and identifiers, a basic editor supporting multiple programming languages ​​is built, allowing users to perform code editing, automatic error correction, and auto-completion within the intelligent editor. For example, when a user enters a variable name, the intelligent editor can automatically complete the variable name and add an appropriate semicolon after it.

[0234] 5. Image and Multimedia Engine: In addition to supporting code editing, the intelligent editor also supports the editing of multimedia information such as images, audio, and video. By using various learned symbols and identifiers, the intelligent editor can automatically recognize multimedia information and integrate it with the code content.

[0235] 6. Automatic Layout and Rendering Engine: Supports automatic layout and rendering. For example, when a user enters Markdown text, the intelligent editor can automatically convert it to HTML format and perform layout and rendering to provide a better reading experience.

[0236] The editor logic learning engine is an algorithm that automates the logical thinking and knowledge processing of the editor. Its main purpose is to automate document or article generation, minimizing human intervention and improving the quality and efficiency of document or article generation. This process mainly includes the following steps:

[0237] 1. Raw Input Data: The raw input data of the intelligent editor includes various types of data such as commands, text, images, and tables. Before being input, this data is processed into a unified data format or data structure and then passed into the logic learning engine as input data.

[0238] 2. GPT Learning: The logic learning engine uses GPT technology and other methods to learn and analyze input data. It can automatically encode and decode text to generate new text or articles that conform to grammatical and semantic rules. Through GPT learning, the intelligent editor can learn the grammatical and semantic structure of articles, thereby generating articles that meet the requirements.

[0239] 3. Document Generator: After GPT learning, the intelligent editor will automatically generate the basic framework and structure of the article. At this time, the logic learning engine will automatically adjust the document structure according to preset rules and user input requirements, such as adding chapter titles and adjusting text formatting. Simultaneously, the logic learning engine will also automatically validate the article's grammar and semantics, checking and correcting errors and content that does not conform to the rules (such as sensitive information).

[0240] 4. Combining a basic editor, image and multimedia engine, and automatic layout rendering engine: The intelligent editor's basic editor, image and multimedia engine, and automatic layout rendering engine modules interact with the logic learning engine to generate complete articles or documents.

[0241] For example, the logic learning engine guides the basic editor to implement the text markdown function, while inserting elements such as images, audio and video through the image and multimedia engine, and finally combining with the automatic typesetting and rendering engine to automatically type and present the article.

[0242] Through the above process, the editor's logic learning engine can achieve highly automated article generation, improving article quality and production efficiency while reducing labor and time costs.

[0243] In summary, intelligent editors have at least the following advantages:

[0244] 1. Improve productivity: The intelligent editor can help users automate some tedious tasks, such as automatic error correction, automatic completion, and automatic formatting, thereby reducing the time and effort of manual operation and improving the productivity of articles.

[0245] 2. Improve production quality: The intelligent editor, through the application of artificial intelligence technology, can automatically identify and correct errors, improving the accuracy and quality of articles.

[0246] 3. Increased convenience for multi-person collaboration: The multi-person collaborative intelligent editor enables multiple people to edit, modify, and view articles in real time, and can automatically save and synchronize updates, thereby greatly improving the efficiency and convenience of collaboration.

[0247] 4. Achieve full automation: Through the application of automation technology and GPT technology in intelligent editors, future editors, documents, and office products will be able to achieve full automation, thereby significantly improving the efficiency and accuracy of article production.

[0248] With the above Figures 1 to 4 Corresponding to the article generation method provided in the embodiments, this disclosure also provides an article generation apparatus. Since the article generation apparatus provided in the embodiments of this disclosure is similar to the one described above... Figures 1 to 4 The article generation method provided in the embodiments corresponds to the article generation method provided in the embodiments of this disclosure, and therefore the implementation of the article generation method is also applicable to the article generation apparatus provided in the embodiments of this disclosure, and will not be described in detail in the embodiments of this disclosure.

[0249] Figure 8 This is a schematic diagram of the article generation device provided in Embodiment 5 of this disclosure.

[0250] like Figure 8 As shown, the article generation device 800 may include: a first processing module 801, a generation module 802, a query module 803, a fusion module 804, and a second processing module 805.

[0251] The first processing module 801 is used to obtain the article editing requirements and parse the article editing requirements to obtain the editing intent.

[0252] The generation module 802 is used to generate multiple text fragments that match the editing intent.

[0253] The query module 803 is used to query multimedia information that semantically matches at least one first text fragment among a plurality of text fragments.

[0254] The fusion module 804 is used to fuse multimedia information with the first text fragment to obtain the second text fragment.

[0255] The second processing module 805 is used to type and render the third text fragment and the second text fragment according to the logical relationship between the third text fragment and the second text fragment, which are other than the first text fragment, in order to obtain the first article.

[0256] In one possible implementation of this disclosure, the article editing requirements also include article description information; the generation module 802 is used to: input the editing intent and article description information into a first prediction network in a trained writing model to obtain multiple text fragments output by the first prediction network.

[0257] In one possible implementation of this disclosure, the writing model further includes a second prediction network, and the article generation device 800 may further include:

[0258] The first acquisition module is used to acquire the update requirements for the first article from the first object input.

[0259] The parsing module is used to parse the update request to obtain at least one object to be updated and an update command that matches each object to be updated.

[0260] The input module is used to input each update command into the second prediction network to obtain the target code output by the second prediction network that matches each update command.

[0261] The execution module is used to execute target code matching the corresponding update command on each object to be updated in the first article, so as to update the first article and obtain the second article.

[0262] In one possible implementation of this disclosure, the article generation device 800 is applied to an editor, and the input module is used to: obtain the target programming language adapted to the editor; input each update command and the target programming language into a second prediction network to obtain the target code output by the second prediction network that matches each update command and the target programming language.

[0263] In one possible implementation of this disclosure, there are multiple first objects. The execution module is configured to: when the update requests triggered by the multiple first objects contain different objects to be updated, execute target code matching the corresponding update command for each object to be updated in the first article to update the first article and obtain a second article; when the update requests triggered by at least two first objects contain the same object to be updated, execute first target code for the same object to be updated and update the same object to be updated to a locked state; wherein, the first target code is the target code corresponding to the update command matching the same object to be updated in the update requests triggered by the target objects among the multiple first objects, and the locked state does not allow other objects among the multiple first objects besides the target objects to edit the same object to be updated; in response to the completion of the execution of the first target code, update the same object to be updated to an unlocked state, wherein the unlocked state allows other objects to edit the same object to be updated; execute second target code for the same object to be updated to obtain a second article; wherein, the second target code is the target code corresponding to the update command matching the same object to be updated in the update requests triggered by other objects.

[0264] In one possible implementation of this disclosure, the fusion module 804 is configured to: preprocess multimedia information, wherein the preprocessing includes at least one of cropping, resizing, sharpness adjustment, and noise reduction; and fuse the preprocessed multimedia information with a first text segment to obtain a second text segment.

[0265] In one possible implementation of this disclosure, the article generation apparatus 800 may further include:

[0266] The third processing module is configured to perform at least one of the following:

[0267] Based on the contextual information of the first article, perform error correction on the characters and grammar in the first article; or,

[0268] Extract an abstract from the first article and generate the article title based on the extracted abstract; or,

[0269] Identify whether sensitive information exists in the first article; if so, delete or replace the sensitive information in the first article; or,

[0270] Identify at least one fourth text segment in the first article to be translated and the target language to which it is translated; then translate the fourth text segment in the first article into a fifth text segment in the target language; or,

[0271] The algorithm queries whether there is a second article with a semantic similarity higher than a set threshold with the first article among multiple candidate articles. If a second article exists, the algorithm regenerates the article according to the editor's intention, so that the semantic similarity between the regenerated article and the multiple candidate articles is lower than the set threshold.

[0272] In one possible implementation of this disclosure, the article generation apparatus 800 may further include:

[0273] The identification module is used to identify target content from the first article, where the target content includes keywords and / or knowledge points.

[0274] The annotation module is used to annotate the target content in the first article.

[0275] In one possible implementation of this disclosure, the article generation apparatus 800 may further include:

[0276] The second acquisition module is used to acquire update requests; wherein, the update request is generated based on the update operation triggered by the second object on the first article;

[0277] The update module is used to update the content and / or formatting of the first article in response to an update request.

[0278] The article generation apparatus of this disclosure analyzes the article editing requirements to obtain the editing intent and generates multiple text fragments matching the editing intent. It then queries multimedia information that semantically matches at least one first text fragment among the multiple text fragments and merges the multimedia information with the first text fragments to obtain a second text fragment. Based on the logical relationship between the third text fragment (excluding the first text fragment) and the second text fragment, it typesets and renders the third and second text fragments to obtain a first article. Therefore, it can automatically generate articles according to the user's editing intent, reducing user editing operations and improving article editing efficiency. Furthermore, the automatically generated articles include not only character information but also multimedia information, which can enhance the richness of the article content, meet the user's article editing needs, and improve the user experience.

[0279] To implement the above embodiments, this disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the article generation method proposed in any of the above embodiments of this disclosure.

[0280] To implement the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the article generation method proposed in any of the above embodiments of this disclosure.

[0281] To implement the above embodiments, this disclosure also provides a computer program product, which includes a computer program that, when executed by a processor, implements the article generation method proposed in any of the above embodiments of this disclosure.

[0282] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0283] Figure 9 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown.

[0284] The electronic device may include the server and client components described in the above embodiments. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0285] like Figure 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 902 or a computer program loaded from storage unit 908 into RAM (Random Access Memory) 903. The RAM 903 can also store various programs and data required for the operation of the electronic device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An I / O (Input / Output) interface 905 is also connected to the bus 904.

[0286] Multiple components in electronic device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of displays, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows electronic device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0287] The computing unit 901 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the article generation method described above. For example, in some embodiments, the article generation method described above can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the article generation method described above can be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the above-described article generation method by any other suitable means (e.g., by means of firmware).

[0288] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0289] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0290] 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, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0291] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0292] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0293] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers integrated with blockchain technology.

[0294] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0295] Deep learning is a new research direction in the field of machine learning. It learns the inherent patterns and hierarchical representations of sample data. The information gained during this learning process is very helpful in interpreting data such as text, images, and sound. Its ultimate goal is to enable machines to have analytical and learning capabilities like humans, and to recognize data such as text, images, and sound.

[0296] According to the technical solution of this disclosure, by parsing the article editing requirements, the editing intent is obtained, and multiple text fragments matching the editing intent are generated. Multimedia information that semantically matches at least one first text fragment among the multiple text fragments is queried, and the multimedia information is fused with the first text fragments to obtain a second text fragment. Based on the logical relationship between the third text fragment (excluding the first text fragment) and the second text fragment among the multiple text fragments, the third text fragment and the second text fragment are formatted and rendered to obtain a first article. Thus, articles can be automatically generated according to the user's editing intent, reducing user editing operations and improving article editing efficiency. Furthermore, the automatically generated article includes not only character information but also multimedia information, which can enhance the richness of the article content, meet the user's article editing needs, and improve the user experience.

[0297] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution proposed in this disclosure can be achieved, and this is not limited herein.

[0298] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for generating an article, comprising: Obtain the article editing requirements and parse them to determine the editing intent; A trained writing model is used to generate multiple text fragments that match the editing intent. Query multimedia information that semantically matches at least one first text fragment among the plurality of text fragments, and fuse the multimedia information with the first text fragment to obtain a second text fragment; Based on the logical relationship between the third text segment (excluding the first text segment) and the second text segment among the plurality of text segments, the third text segment and the second text segment are typed and rendered to obtain the first article.

2. The method according to claim 1, wherein, The article editing requirements also include article description information; The process of generating multiple text fragments that match the editing intent using a trained writing model includes: The editing intent and the article description information are input into the first prediction network of the trained writing model to obtain the plurality of text fragments output by the first prediction network.

3. The method according to claim 2, wherein, The writing model further includes a second prediction network, and the method further includes: Obtain the update request for the first article from the input of the first object; The update request is parsed to obtain at least one object to be updated and an update command that matches each of the objects to be updated; Each of the update commands is input into the second prediction network to obtain the target code output by the second prediction network that matches each of the update commands; For each object to be updated in the first article, execute the target code that matches the corresponding update command to update the first article and obtain the second article.

4. The method according to claim 3, wherein, The method is applied to the editor. The step of inputting the update command into the second prediction network to obtain the target code output by the second prediction network that matches each of the update commands includes: Obtain the target programming language that the editor is compatible with; Each of the update commands and the target programming language is input into the second prediction network to obtain target code output by the second prediction network that matches each of the update commands and the target programming language.

5. The method according to claim 3, wherein, The first object is multiple, and the step of executing target code matching the corresponding update command on each of the objects to be updated in the first article to update the first article and obtain the second article includes: When multiple update requests triggered by the first object contain different objects to be updated, for each of the objects to be updated in the first article, target code matching the corresponding update command is executed to update the first article and obtain the second article; When at least two update requests triggered by the first object contain the same object to be updated, the first target code is executed on the same object to be updated, and the same object to be updated is updated to a locked state; wherein, the first target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by the target object among the plurality of first objects, and the locked state does not allow other objects among the plurality of first objects besides the target object to edit the same object to be updated; In response to the completion of the first target code execution, the same object to be updated is updated to an unlocked state, wherein the unlocked state allows the other objects to edit the same object to be updated; For the same object to be updated, execute the second target code to obtain the second article; wherein the second target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by the other objects.

6. The method according to claim 1, wherein, The step of fusing the multimedia information with the first text segment to obtain the second text segment includes: The multimedia information is preprocessed, wherein the preprocessing includes at least one of cropping, resizing, sharpness adjustment, and noise reduction. The preprocessed multimedia information is then fused with the first text segment to obtain the second text segment.

7. The method according to any one of claims 1-6, wherein, The method further includes: For the first article, perform at least one of the following: Based on the context information of the first article, error correction processing is performed on the characters and grammar in the first article; or, Extract a summary from the first article, and generate the article title based on the extracted summary; or, Identify whether sensitive information exists in the first article; if the sensitive information exists in the first article, delete or replace the sensitive information in the first article; or, Identify at least one fourth text segment in the first article to be translated and the target language to which it is to be translated; then translate the fourth text segment in the first article into a fifth text segment in the target language; or, The system queries whether there exists a second article whose semantic similarity to the first article is higher than a set threshold among the multiple candidate articles. If the second article exists, the system regenerates the article according to the editing intent, so that the semantic similarity between the regenerated article and the multiple candidate articles is lower than the set threshold.

8. The method according to any one of claims 1-6, wherein, The method further includes: Identify target content from the first article, wherein the target content includes keywords and / or knowledge points; The target content described in the first article is annotated.

9. The method according to any one of claims 1-6, wherein, The method further includes: Obtain an update request; wherein the update request is generated based on the update operation triggered by the second object on the first article; In response to the update request, the article content and / or formatting of the first article are updated.

10. An article generation device, comprising: The first processing module is used to obtain the article editing requirements and parse the article editing requirements to obtain the editing intent; The generation module is used to generate multiple text fragments that match the editing intent based on the editing intent using a trained writing model. The query module is used to query multimedia information that semantically matches at least one first text fragment among the plurality of text fragments; A fusion module is used to fuse the multimedia information with the first text segment to obtain a second text segment; The second processing module is used to type and render the third text segment and the second text segment according to the logical relationship between the third text segment (excluding the first text segment) and the second text segment among the plurality of text segments, so as to obtain the first article.

11. The apparatus according to claim 10, wherein, The article editing requirements also include article description information; The generation module is used for: The editing intent and the article description information are input into the first prediction network of the trained writing model to obtain the plurality of text fragments output by the first prediction network.

12. The apparatus according to claim 11, wherein, The writing model further includes a second prediction network, and the device further includes: The first acquisition module is used to acquire the update request for the first article input by the first object; The parsing module is used to parse the update request to obtain at least one object to be updated and an update command that matches each of the objects to be updated; An input module is used to input each of the update commands into the second prediction network to obtain the target code output by the second prediction network that matches each of the update commands; The execution module is used to execute target code matching the corresponding update command on each of the objects to be updated in the first article, so as to update the first article and obtain the second article.

13. The apparatus according to claim 12, wherein, The device is used in an editor. The input module is used for: Obtain the target programming language that the editor is compatible with; Each of the update commands and the target programming language is input into the second prediction network to obtain target code output by the second prediction network that matches each of the update commands and the target programming language.

14. The apparatus according to claim 12, wherein, The first object may be multiple, and the execution module is used for: When multiple update requests triggered by the first object contain different objects to be updated, for each of the objects to be updated in the first article, target code matching the corresponding update command is executed to update the first article and obtain the second article; When at least two update requests triggered by the first object contain the same object to be updated, the first target code is executed on the same object to be updated, and the same object to be updated is updated to a locked state; wherein, the first target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by the target object among the plurality of first objects, and the locked state does not allow other objects among the plurality of first objects besides the target object to edit the same object to be updated; In response to the completion of the first target code execution, the same object to be updated is updated to an unlocked state, wherein the unlocked state allows the other objects to edit the same object to be updated; For the same object to be updated, execute the second target code to obtain the second article; wherein the second target code is the target code corresponding to the update command that matches the same object to be updated in the update request triggered by the other objects.

15. The apparatus according to claim 10, wherein, The fusion module is used for: The multimedia information is preprocessed, wherein the preprocessing includes at least one of cropping, resizing, sharpness adjustment, and noise reduction. The preprocessed multimedia information is then fused with the first text segment to obtain the second text segment.

16. The apparatus according to any one of claims 10-15, wherein, The device further includes: The third processing module is configured to perform at least one of the following: Based on the context information of the first article, error correction processing is performed on the characters and grammar in the first article; or, Extract a summary from the first article, and generate the article title based on the extracted summary; or, Identify whether sensitive information exists in the first article; if the sensitive information exists in the first article, delete or replace the sensitive information in the first article; or, Identify at least one fourth text segment in the first article to be translated and the target language to which it is to be translated; then translate the fourth text segment in the first article into a fifth text segment in the target language; or, The system queries whether there exists a second article whose semantic similarity to the first article is higher than a set threshold among the multiple candidate articles. If the second article exists, the system regenerates the article according to the editing intent, so that the semantic similarity between the regenerated article and the multiple candidate articles is lower than the set threshold.

17. The apparatus according to any one of claims 10-15, wherein, The device further includes: The identification module is used to identify target content from the first article, wherein the target content includes keywords and / or knowledge points; The annotation module is used to annotate the target content in the first article.

18. The apparatus according to any one of claims 10-15, wherein, The device further includes: The second acquisition module is used to acquire an update request; wherein the update request is generated based on the update operation triggered by the second object on the first article; The update module is used to update the article content and / or layout format of the first article in response to an update request.

19. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the article generation method according to any one of claims 1-9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the article generation method according to any one of claims 1-9.

21. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the article generation method according to any one of claims 1-9.