Document generation method, device, electronic device and medium

Through a multi-level document generation method, the problems of word limit and low matching degree of generative language models in standard format documents are solved, and high-quality document generation is achieved.

CN119494326BActive Publication Date: 2025-09-19BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411546906.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-09-19
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

When generating standard format documents, existing generative language models have problems such as word count limitations and low matching between document content and topics, resulting in low quality of generated documents.

Method used

A multi-level document generation method is adopted. First, the introduction content is generated based on the first-level title of the standard format document. After the user confirms the match, the next level of text content is generated. The matching degree and word count are gradually improved through the multi-level text generation model until the requirements are met.

Benefits of technology

It breaks the word limit, improves the matching degree between document content and title, and improves the overall quality of generated documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494326B_ABST
    Figure CN119494326B_ABST
Patent Text Reader

Abstract

The present disclosure provides a document generation method, apparatus, electronic device, and medium, relating to the field of natural language processing technology, and in particular, to the field of text generation technology. The implementation scheme is as follows: in response to a user's first generation request for a standard format document, a format template and associated text data of the standard format document are obtained, the associated text data being associated with subject content information, the format template including at least one first part, and each of the at least one first part including at least one second part; and for each first part, based on the associated text data, a first text generation model is used to generate corresponding first text content; and for each second part of the at least one second part included in the first part, in response to a second generation request from the user, a second text generation model is used to generate corresponding second text content based on the associated text data and the first text content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of natural language processing technology, in particular to the field of text generation technology, and specifically to a document generation method, device, electronic device, computer-readable storage medium, and computer program product. Background Art

[0002] With the continuous development of natural language processing technology, generative language models have been widely used in various fields. Therefore, how to effectively improve the quality of text generated by the model has gradually become a key issue of concern to users.

[0003] The approaches described in this section are not necessarily approaches that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any approach described in this section is prior art simply by virtue of its inclusion in this section. Similarly, unless otherwise indicated, the issues raised in this section should not be considered as having been recognized in any prior art. Summary of the Invention

[0004] The present disclosure provides a document generation method, apparatus, electronic device, computer-readable storage medium, and computer program product.

[0005] According to one aspect of the present disclosure, a document generation method is provided, comprising: in response to a first generation request for a standard format document by a user, obtaining a format template and associated text data of the standard format document, wherein the first generation request indicates the document format and subject content of the standard format document, the associated text data is associated with the subject content information, the format template includes at least one first part, and each first part of the at least one first part includes at least one second part; and for each first part, based on the associated text data, generating corresponding first text content using a first text generation model; and for each second part of the at least one second part included in the first part, in response to a second generation request from the user, generating corresponding second text content using a second text generation model based on the associated text data and the first text content, wherein the second generation request instructs the user to confirm that the corresponding first text content matches the second part.

[0006] According to another aspect of the present disclosure, a document generation device is provided, comprising: a first generation module, configured to, in response to a user's first generation request for a standard format document, obtain a format template and associated text data of the standard format document, wherein the first generation request indicates the document format and subject content of the standard format document, the associated text data is associated with the subject content information, the format template includes at least one first part, and each first part of the at least one first part includes at least one second part; and a second generation module, configured to, for each first part, generate corresponding first text content using a first text generation model based on the associated text data; and, for each second part of the at least one second part included in the first part, generate corresponding second text content using a second text generation model based on the associated text data and the first text content in response to the user's second generation request, wherein the second generation request instructs the user to confirm that the corresponding first text content matches the second part.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above method.

[0009] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.

[0010] According to one or more embodiments of the present disclosure, a document generation method is provided that generates a standard-format document using a multi-layered approach. Specifically, a corresponding introduction is first generated based on the first-level headings of the standard-format document. After the user confirms that the introduction matches the first-level headings, a corresponding detailed description is generated for the first-level headings. This overcomes the word count limitation that exists when generating the entire document in one go, while also improving the matching between the text content and the corresponding first-level headings, thereby enhancing the overall quality of the generated document.

[0011] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.

[0013] Figure 1 is a schematic diagram illustrating an example system in which the various methods described herein may be implemented according to an exemplary embodiment.

[0014] Figure 2 A flowchart of a document generation method according to an embodiment of the present disclosure is shown;

[0015] Figure 3 A flowchart of another document generation method according to an embodiment of the present disclosure is shown;

[0016] Figure 4 A partial flow chart of another document generation method according to an embodiment of the present disclosure is shown;

[0017] Figure 5 A partial flow chart of another document generation method according to an embodiment of the present disclosure is shown;

[0018] Figure 6 A partial flow chart of yet another document generation method according to an embodiment of the present disclosure is shown;

[0019] Figure 7 A structural block diagram of a document generation device according to an embodiment of the present disclosure is shown; and

[0020] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0021] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0022] In this disclosure, unless otherwise specified, the use of terms such as "first" and "second" to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, while in some cases, based on the context of the description, they may also refer to different instances.

[0023] The terms used in the descriptions of the various examples described in this disclosure are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in this disclosure encompasses any one and all possible combinations of the listed items.

[0024] In related technologies, generative language models usually generate an entire standard format document at one time. However, this approach not only greatly limits the number of words in the generated standard format document, but also easily leads to a low degree of match between the document content and the topic, resulting in low quality of the generated standard format document.

[0025] To address the aforementioned issues, the present disclosure provides a document generation method that uses a multi-level approach to generate standard-format documents. Specifically, a corresponding introduction is first generated based on the first-level title of the standard-format document. After the user confirms that the introduction matches the first-level title, the corresponding text content is generated for the first-level title. This overcomes the word count limitation that exists when generating the entire document in one go, while also improving the consistency between the text content of each section and the corresponding title, thereby enhancing the overall quality of the generated document.

[0026] It should be noted that the "standard format document" referred to in this disclosure refers to a document type with a uniformly written format, such as a standard format file. Specifically, such a document includes at least one first-level heading and text describing that first-level heading. Furthermore, each first-level heading can be further subdivided into at least one second-level heading and corresponding text, at least one third-level heading and corresponding text, and so on.

[0027] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0028] Figure 1 FIG2 is a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.

[0029] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the document generation method to be performed.

[0030] In some embodiments, server 120 may also provide other services or software applications that may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0031] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may, in turn, utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is an example of a system for implementing the document generation method described herein and is not intended to be limiting.

[0032] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to perform the document generation method. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure can support any number of client devices.

[0033] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing a variety of different applications, such as various internet-related applications, communication applications (such as email applications), and short message service (SMS) applications, and may use various communication protocols.

[0034] The network 110 may be any type of network known to those skilled in the art that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0035] Server 120 may include one or more general-purpose computers, specialized server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0036] The computing units in the server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.

[0037] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0038] In some embodiments, server 120 may be a distributed system server or a server integrated with blockchain. Server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product within the cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and virtual private servers (VPS) services.

[0039] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as text files. The databases 130 may reside in a variety of locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0040] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0041] Figure 1 The system 100 may be configured and operated in various ways to enable application of the various methods and apparatuses described in accordance with the present disclosure.

[0042] Figure 2 A flowchart of a document generation method according to an embodiment of the present disclosure is shown.

[0043] like Figure 2 As shown, the document generation method 200 includes:

[0044] Step 210: In response to a first user request for generating a standard format document, obtaining a format template and associated text data of the standard format document, wherein the first request indicates a document format and subject content of the standard format document, the associated text data is associated with the subject content information, the format template includes at least one first part, and each of the at least one first part includes at least one second part;

[0045] Step 220: For each first part, step 220 includes:

[0046] Step 221: Generate corresponding first text content using a first text generation model based on the associated text data;

[0047] Step 222: For each second part of at least one second part included in the first part, in response to the user's second generation request, generate corresponding second text content using a second text generation model based on the associated text data and the first text content, wherein the second generation request instructs the user to confirm that the corresponding first text content matches the second part.

[0048] The multi-level document generation method solves the word limit problem that exists when generating the entire document at one time. In addition, since the user confirms the content matching degree after each level of text content is generated, and then continues to generate the text content of the next level, the consistency between the text content generated in each part and the corresponding title is effectively improved, thereby improving the overall quality of the generated standard format document.

[0049] It should be noted that the process of user confirmation of content matching follows relatively objective standards and does not rely too much on the user's subjective cognitive skills. The objective standard here can be, for example, when there are keywords associated with the subject content of the standard format document in the hierarchical title, the generated text content includes one or more keywords or synonyms of keywords associated with the subject content in the corresponding hierarchical title (the synonym determination here can be based on a dictionary), then it is determined that the text content matches the corresponding hierarchical title; or, when there are no keywords associated with the subject content of the standard format document in the hierarchical title, the generated text content includes one or more keywords or synonyms of keywords in the subject content in the first generation request, then it is determined that the text content matches the corresponding hierarchical title.

[0050] In step 210, exemplarily, the standard format document includes two levels, therefore, the first part in the format template corresponds to the first-level title, and the first text content can be a brief description text for the first-level title; the second part corresponds to the specific text content under the first-level title, and the second text content can be a specific description text for the first-level title.

[0051] According to some embodiments, the standard format document may further include two or more levels, i.e., each second part of the at least one second part includes at least one third part. Specifically, the second part in the format template may correspond to a sub-heading, the second text content may be a brief description of the sub-heading, and the third part may correspond to the specific text content under the sub-heading, and the third text content may be a detailed description of the sub-heading.

[0052] Based on this, Figure 3 FIG. 1 shows a flow chart of another document generation method according to an embodiment of the present disclosure. Figure 3 As described above, in addition to steps 210, 221, and 222 of method 200, document generation method 300 further includes:

[0053] Step 223: For each third part of at least one third part, in response to the user's third generation request, generate corresponding third text content using a third text generation model based on the associated text data and the second text content, wherein the third generation request instructs the user to confirm that the corresponding second text content matches the third part.

[0054] Therefore, by dividing the generated text into multiple levels greater than two, we can further break through the word limit of the generated content on the basis of ensuring that the generated text content matches the corresponding level title, and effectively deal with the situation where high-quality ultra-long text needs to be generated.

[0055] It should be understood that, based on the user's demand for standard format documents, the above-mentioned third part can be further refined to include at least one fourth part, and each fourth part can be further refined to include at least one fifth part, and so on.

[0056] In an example, the first text generation model in step 221 and the second text generation model in step 222 are the same or different.

[0057] In the example, the generated first text content, second text content, and third text content are returned as training data to the first text generation model and the second text generation model for training to further improve the text generation quality of the models.

[0058] In the example, the number of words in the generated text content of each part in each level can be set, and the total number of words in the final generated standard format document and the storage format used by the document data can also be set.

[0059] Figure 4 A partial flow chart of another document generation method according to an embodiment of the present disclosure is shown.

[0060] like Figure 4 As shown, according to some embodiments, method 200 further includes:

[0061] Step 401: Obtain user input data;

[0062] Step 402: Use the pre-trained first language model to perform semantic analysis on the input data to generate a first generation request.

[0063] The user's input data can be words, sentences, paragraphs or entire articles. Therefore, by performing semantic analysis on the input data, we can more accurately understand the user's intention and generate a standard format document that meets the user's needs.

[0064] According to some embodiments, the semantic analysis in step 402 includes at least one of text analysis, intent recognition, and sentiment analysis.

[0065] By identifying and processing user input data from multiple perspectives, we can more fully analyze the input data, providing users with more intelligent and efficient document generation services. In addition, for input data involving specific subject matter (for example, humanities and arts), by introducing sentiment analysis, we can more accurately understand user needs and further enhance the user experience.

[0066] According to some embodiments, the user input may be meaningless, such as pure punctuation marks or garbled characters, etc. Therefore, the first generation request in step 210 further indicates whether the input data is text data, and the method 200 further includes:

[0067] Step 211 : In response to the first generation request indicating that the input data is non-text data, an error message is generated to prompt the user.

[0068] By reporting an error when input data that cannot be understood by the language is identified, subsequent calls to the text generation model are avoided, saving a large amount of resources required to run the model, effectively saving costs and improving efficiency.

[0069] Figure 5 A partial flow chart of another document generation method according to an embodiment of the present disclosure is shown.

[0070] like Figure 5As shown, according to some embodiments, method 200 further includes:

[0071] Step 501: Use a pre-trained second language model to perform language analysis on the input data to generate a language recognition result, wherein the language recognition result indicates the language types included in the input data and the data proportion of each language type;

[0072] Step 502: Determine the language types used by the first text content and the second text content based on the language recognition result.

[0073] The user's input data may contain a mixture of multiple languages. By identifying and analyzing the language types and their proportions, and selecting the language with a proportion higher than the target threshold as the language for generating documents, users can experience a more intelligent document generation service.

[0074] In the example, the language with the highest proportion may be selected as the language for generating the document, or multiple languages ​​with proportions higher than a target threshold may be selected as candidate languages ​​for generating the document for the user to select.

[0075] Figure 6 A partial flow chart of yet another document generation method according to an embodiment of the present disclosure is shown.

[0076] like Figure 6 As shown, according to some embodiments, for each first portion, method 200 further includes:

[0077] Step 601: In response to a second generation request, instructing the user to confirm that the first portion does not match the corresponding first text content, and allowing the user to edit the unmatched first text content;

[0078] Step 602: Generate corresponding second text content using a second text generation model based on the associated text data and the edited first text content.

[0079] After generating the corresponding text content for each level, there may be a situation where the generated text content does not match the level title of the corresponding part. At this time, the user is allowed to directly edit the mismatched content, thereby further improving the matching degree between the generated text content and the level titles of each level of the document, and improving the overall quality of the standard format document.

[0080] In the example, a document outline can be generated based on the hierarchical titles in the format template and displayed to the user, so that the user can locate the corresponding hierarchical position in the document at any time to confirm or edit the text content, thereby improving the user experience.

[0081] According to another aspect of the present disclosure, a document generation device is provided. Figure 7As shown, the document generation device 700 includes: a first generation module 710, which is configured to obtain a format template and associated text data of a standard format document in response to a first generation request of a user for a standard format document, wherein the first generation request indicates the document format and subject content of the standard format document, the associated text data is associated with the subject content information, the format template includes at least one first part, and each first part of the at least one first part includes at least one second part; and a second generation module 720, which is configured to generate corresponding first text content for each first part based on the associated text data using a first text generation model; and generate corresponding second text content for each second part of the at least one second part included in the first part based on the associated text data and the first text content using a second text generation model in response to a second generation request of the user, wherein the second generation request indicates that the user confirms that the corresponding first text content matches the second part.

[0082] According to some embodiments, the document generation apparatus 700 further includes: a data acquisition module configured to acquire user input data; and a semantic analysis module configured to perform semantic analysis on the input data using a pre-trained first language model to generate a first generation request.

[0083] According to some embodiments, the above-mentioned semantic analysis includes at least one of text analysis, intent recognition and sentiment analysis.

[0084] According to some embodiments, the first generation request further indicates whether the input data is text data, and the text generation device 700 also includes: a data error reporting module, which is configured to generate an error message to prompt the user in response to the first generation request indicating that the input data is non-text data.

[0085] According to some embodiments, the document generation device 700 further includes: a language identification module configured to perform language analysis on the input data using a pre-trained second language model to generate a language identification result, wherein the language identification result indicates the language types included in the input data and the data proportion of each language type; and a language determination module configured to determine the language types used in the first text content and the second text content based on the language identification result.

[0086] According to some embodiments, the document generation device 700 also includes: a third generation module, configured to, for each first part, in response to the second generation request, instruct the user to confirm that the first part does not match the corresponding first text content, and allow the user to edit the unmatched first text content; and generate the corresponding second text content using the second text generation model based on the associated text data and the edited first text content.

[0087] According to some implementations, each of the at least one second part mentioned above includes at least one third part, and the document generation device 700 also includes: a third generation module, configured to generate corresponding third text content for each third part of the at least one third part in response to a third generation request from the user, based on the associated text data and the second text content, using a third text generation model, wherein the third generation request instructs the user to confirm that the corresponding second text content matches the third part.

[0088] According to another aspect of the present disclosure, an electronic device is also provided, comprising: 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, and the instructions are executed by the at least one processor to enable the at least one processor to execute the aforementioned method.

[0089] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided, wherein the computer instructions are used to enable the computer to execute the aforementioned method.

[0090] According to another aspect of the present disclosure, a computer program product is further provided, including a computer program, wherein the computer program implements the aforementioned method when executed by a processor.

[0091] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0092] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 can be any type of device that can input information to the electronic device 800. The input unit 806 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone and / or a remote control. The output unit 807 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator and / or a printer. The storage unit 808 can include but is not limited to a magnetic disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as Bluetooth TM devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0093] The computing unit 801 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the document generation method. For example, in some embodiments, the document generation method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the document generation method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the document generation method by any other appropriate means (e.g., by means of firmware).

[0094] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0095] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

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

[0097] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).

[0098] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0099] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0100] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0101] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only limited by the claims after authorization and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. In addition, the steps may be performed in an order different from that described in this disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after this disclosure.

Claims

1. A document generation method, comprising: In response to a first generation request for a standard format document from a user, obtaining a format template and associated text data of the standard format document, wherein the first generation request indicates a document format and subject content of the standard format document, the associated text data is associated with the subject content information, the format template includes at least one first part, and each of the at least one first part includes at least one second part; and For each of the first parts, Based on the associated text data, generating corresponding first text content using a first text generation model; and For each second part of the at least one second part included in the first part, in response to a second generation request by the user, generating corresponding second text content using a second text generation model based on the associated text data and the first text content, wherein the second generation request instructs the user to confirm that the corresponding first text content matches the second part, Wherein, each second part of the at least one second part includes at least one third part, and the method further includes: For each third part of the at least one third part, in response to the user's third generation request, corresponding third text content is generated using a third text generation model based on the associated text data and the second text content, wherein the third generation request instructs the user to confirm that the corresponding second text content matches the third part.

2. The method according to claim 1, further comprising: Obtaining input data from the user; as well as The input data is semantically analyzed using a pre-trained first language model to generate the first generation request.

3. The method according to claim 2, wherein: The semantic analysis includes at least one of text analysis, intent recognition and sentiment analysis.

4. The method according to claim 2, wherein: The first generation request further indicates whether the input data is text data, and the method further includes: In response to the first generation request indicating that the input data is non-text data, an error message is generated to prompt the user.

5. The method according to claim 2, further comprising: Performing language analysis on the input data using a pre-trained second language model to generate a language recognition result, wherein the language recognition result indicates the language types included in the input data and the data proportion of each language type; and The language types used by the first text content and the second text content are determined based on the language recognition result.

6. The method according to any one of claims 1 to 5, further comprising: For each of the first parts, In response to the second generation request instructing the user to confirm that the first portion does not match the corresponding first text content, allowing the user to edit the unmatched first text content; as well as Based on the associated text data and the edited first text content, the corresponding second text content is generated using the second text generation model.

7. A document generation device comprising: a first generating module configured to, in response to a first generating request from a user for a standard format document, obtain a format template and associated text data of the standard format document, wherein the first generating request indicates a document format and subject content of the standard format document, the associated text data is associated with the subject content information, the format template includes at least one first part, and each of the at least one first part includes at least one second part; and The second generating module is configured to, for each of the first parts, Based on the associated text data, generating corresponding first text content using a first text generation model; and For each second part of the at least one second part included in the first part, in response to a second generation request by the user, generating corresponding second text content using a second text generation model based on the associated text data and the first text content, wherein the second generation request instructs the user to confirm that the corresponding first text content matches the second part, Wherein, each second part of the at least one second part includes at least one third part, and the device further includes: A third generation module is configured to generate corresponding third text content for each third part of the at least one third part in response to the user's third generation request, based on the associated text data and the second text content, using a third text generation model, wherein the third generation request instructs the user to confirm that the corresponding second text content matches the third part.

8. The apparatus according to claim 7, further comprising: A data acquisition module is configured to acquire input data of the user; as well as The semantic analysis module is configured to perform semantic analysis on the input data using a pre-trained first language model to generate the first generation request.

9. The device according to claim 8, wherein The semantic analysis includes at least one of text analysis, intent recognition and sentiment analysis.

10. The device according to claim 8, wherein The first generation request further indicates whether the input data is text data, and the apparatus further includes: The data error reporting module is configured to generate an error message to prompt the user in response to the first generation request indicating that the input data is non-text data.

11. The apparatus according to claim 8, further comprising: a language identification module configured to perform language analysis on the input data using a pre-trained second language model to generate a language identification result, wherein the language identification result indicates the language types included in the input data and the data proportion of each language type; and The language determination module is configured to determine the language type used by the first text content and the second text content based on the language recognition result.

12. The apparatus according to any one of claims 7 to 11, further comprising: A third generating module is configured to, for each of the first parts, In response to the second generation request instructing the user to confirm that the first portion does not match the corresponding first text content, allowing the user to edit the unmatched first text content; as well as Based on the associated text data and the edited first text content, the corresponding second text content is generated using the second text generation model.

13. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

15. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Medical information abstract automatic generation method and system, terminal and medium

    CN117497115A

  • Article generation method and device, equipment and storage medium

    CN118550997A