Document generation method and device, electronic equipment and medium

Generating standard format documents through multi-level methods solves the problems of word limit and low matching in the prior art, and achieves high-quality document generation.

CN119494326AActive Publication Date: 2025-02-21BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

When the prior art generates standard format documents at one time, it is susceptible to word limits, resulting in low matching of text content with topics and low quality of generated documents.

Method used

A standard format document is generated by a multi-level method. First, the introduction content is generated based on the first-level title. After the user confirms, the specific description text is generated, and the matching confirmation is carried out layer by layer to ensure that the content of each layer of text matches the corresponding title.

Benefits of technology

Break through the word limit, improve the matching degree between text content and title, and improve the overall quality of generated documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494326A_ABST
    Figure CN119494326A_ABST
Patent Text Reader

Abstract

The invention provides a document generation method and device, electronic equipment and a medium, and relates to the technical field of natural language processing, in particular to the technical field of text generation. According to the implementation scheme, in response to a first generation request of a user for a standard format document, a format template and associated text data of the standard format document are obtained, the associated text data are associated with theme content information, and the format template comprises at least one first part; and each of the at least one first portion includes at least one second portion; for each first part, based on the associated text data, generating corresponding first text content by using a first text generation model; and for each second part in at least one second part included in the first part, in response to a second generation request of the user, generating corresponding second text content by using a second text generation model 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 methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have 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 from a user for a standard format document, 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 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 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 indicates that the user confirms 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 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 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 a second generation module, configured to generate corresponding first text content using a first text generation model based on the associated text data for each first part; and to generate corresponding second text content using a second text generation model based on the associated text data and the first text content for each of the at least one second part included in the first part 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.

[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 so that the at least one processor can execute 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, which generates a standard format document in a multi-level manner. Specifically, firstly, a corresponding introduction content is generated based on the first-level title of the standard format document, and after the user determines that the introduction content matches the first-level title, a corresponding specific description text is generated for the first-level title. In this way, the word limit problem existing when the full text of the document is generated at one time is broken through, and at the same time, the matching degree between the text content and the corresponding first-level title is improved, thereby improving the overall quality of the generated document.

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

[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to 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 is a description of exemplary embodiments of the present disclosure 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 recognized by those of ordinary skill 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 the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

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

[0024] In the related art, the generative language model usually generates a full standard format document at one time. However, this method not only greatly limits the number of words in the generated standard format document, but also easily leads to a situation where the document content has a low match with the topic, resulting in the generated standard format document of low quality.

[0025] In order to solve the above problems, the present disclosure provides a document generation method, which generates a standard format document in a multi-level manner. Specifically, firstly, a corresponding introduction is generated based on the first-level title of the standard format document, and after the user determines that the introduction content matches the first-level title, the corresponding text content is generated for the first-level title. In this way, the word limit problem existing when the full text of the document is generated at one time is broken through, and at the same time, the consistency between the text content of each part and the corresponding title is improved, thereby improving the overall quality of the generated document.

[0026] It should be noted that the "standard format document" involved in the present disclosure refers to a document type with a unified standard writing format, such as a standard format file. Specifically, such a document includes at least one first-level title and text content used to describe the first-level title. Furthermore, each first-level title can be further subdivided into at least one second-level title and corresponding text content, at least one third-level title and corresponding text content, 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 FIG. 1 is a schematic diagram of an exemplary system 100 in which 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 may 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 may 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 laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game 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, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), 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 may 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, dedicated 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 above operating systems and 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, etc.

[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 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, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in 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 various 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 may 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 the application of various methods and apparatuses described in 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 generation request of a user for a standard format document, a format template and associated text data of the standard format document are obtained, 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;

[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 a second generation request from the user, 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 when generating the entire document at one time. In addition, since the user will confirm the content matching degree after each level of text content is generated, and then continue 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 pointed out 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, one or more keywords or synonyms of keywords associated with the subject content in the corresponding hierarchical title are included in the generated text content (the synonym determination here can be based on the dictionary as the standard), 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, one or more keywords or synonyms of keywords in the subject content in the first generation request are included in the generated text content, 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 more than two levels, that is, each second part of at least one second part includes at least one third part. Specifically, the second part in the format template may correspond to a sub-title, the second text content may be a brief description text for the sub-title, the third part corresponds to the specific text content under the sub-title, and the third text content may be a specific description text for the sub-title.

[0052] Based on this, Figure 3 FIG. 4 is a flowchart 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 a third generation request from the user, 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, it is possible to further break through the word limit of the generated content while 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, according to the user's demand for standard format documents, the above third part can be further refined to include at least one fourth part, 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 adopted 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, the 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, the user's intention can be understood more accurately to 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 the user's input data from multiple aspects and angles, the input data can be analyzed more fully, thereby providing users with more intelligent and efficient document generation services. In addition, for input data involving specific subject content (for example, humanities and arts topics), by introducing sentiment analysis, user needs can be understood more accurately, further improving the user experience.

[0066] According to some embodiments, the user's input may also be meaningless, for example, 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 a 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 lot of resources required to run the model, effectively saving costs and improving efficiency.

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

[0070] like Figure 5As shown, according to some embodiments, the 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 type 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, the method 200 further includes:

[0077] Step 601: In response to a second generation request, instructing the user to confirm that the first part does not match the corresponding first text content, 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 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, configured to obtain a format template and associated text data of a standard format document in response to a first generation request from 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, configured to generate corresponding first text content for each first part based on the associated text data using a first text generation model; 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 a second generation request from 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 device 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, 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 also includes: a language identification module, configured to use a pre-trained second language model to perform language analysis on the input data to generate a language identification result, wherein the language identification result indicates the language type included in the input data and the data proportion of each language type; and a language determination module, configured to determine the language type used by 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, allowing the user to edit the mismatched first text content; and generate corresponding second text content using a 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, which is 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 a 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 so that the at least one processor can 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 also 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 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 may be a variety of general and / or special 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 running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a document generation method. For example, in some embodiments, the document generation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the document generation method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the document generation method in any other appropriate manner (e.g., by means of firmware).

[0094] Various implementations of the systems and techniques described above herein 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), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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 may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0096] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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 may 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 with 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 may 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 the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0100] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded 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, and this document is not limited here.

[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 only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A document generation method, comprising: In response to a first generation request of a user for a standard format document, 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, using a first text generation model 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 the user's second generation request, based on the associated text data and the first text content, a second text generation model is used to generate corresponding second text content, wherein the second generation request instructs the user to confirm that the corresponding first text content matches the second 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 or 3, 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 any one of claims 2 to 4, 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 type 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 first text content that does not match; 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. The method according to any one of claims 1 to 6, wherein: Each of the at least one second portion comprises at least one third portion, the method further comprising: For each 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.

8. A document generation device, comprising: a first generating module configured to obtain, in response to a first generating request of a user for a standard format document, 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 A second generating module is configured to, for each of the first parts, Based on the associated text data, using a first text generation model 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 the user's second generation request, based on the associated text data and the first text content, a second text generation model is used to generate corresponding second text content, wherein the second generation request instructs the user to confirm that the corresponding first text content matches the second part.

9. The apparatus according to claim 8, further comprising: A data acquisition module, 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.

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

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

12. The apparatus according to any one of claims 9 to 11, 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 type 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.

13. The apparatus according to any one of claims 9 to 12, 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 first text content that does not match; 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.

14. The device according to any one of claims 9 to 13, wherein: Each of the at least one second part comprises at least one third part, and the apparatus further comprises: The third generation module is configured to generate corresponding third text content using a third text generation model based on the associated text data and the second text content for each third part of the at least one third part in response to the user's third generation request, wherein the third generation request instructs the user to confirm that the corresponding second text content matches the third part.

15. 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 7.

16. 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-7.

17. 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 7 is implemented.

Citation Information

Patent Citations

  • Text processing method and device, computer equipment and readable storage medium

    CN113705164A

  • Language recognition model training method and device, language recognition method and device and electronic equipment

    CN114462397A

  • Man-machine conversation and pre-training language model training method and system and electronic equipment

    CN115587175A

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

    CN117497115A

  • Article generation method and device, equipment and storage medium

    CN118550997A

Cited By

  • Restful application programming model service generation

    US20260228440A1