Large model-based document processing method, device and equipment and storage medium
By using a large-model document processing method, a user interface is provided to determine the format requirements. The document format is automatically adjusted using the format setting interface, which solves the problem that traditional document editing software is difficult to adapt to documents generated from large models, and achieves efficient and accurate document format setting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional document editing software struggles to adapt to documents generated from large models, especially plain text or HTML documents, as formatting is complex, time-consuming, and prone to errors.
By employing a large-model-based document processing approach, we provide target interface operations to determine format requirements, automatically adjust document format using a format setting interface, support format requirements for various document identifiers, and improve efficiency through segmentation processing.
It simplifies the document formatting process, reduces human error, improves the quality and speed of document processing, adapts to the formatting needs of different documents, and supports rapid formatting of large batches of documents.
Smart Images

Figure CN119647418B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to the fields of large models, computer vision, voice technology, and intelligent search. Background Technology
[0002] With the development of artificial intelligence technology, simple human-computer dialogue and voice control technologies have become relatively mature. The development of large-scale models not only enables the completion of complex tasks but also further enhances the intelligence level of document analysis and processing. Document processing is developing towards a more intelligent, personalized, and efficient direction. Summary of the Invention
[0003] This disclosure provides a document processing method, apparatus, device, and storage medium based on a large model.
[0004] According to one aspect of this disclosure, a document processing method based on a large model is provided, comprising:
[0005] In response to the target object's interface operations on the target interface, the format requirements of the target document are determined; the target document is obtained based on the processing of the large model.
[0006] Based on the format requirements of the target document, set the format setting interface in the target document editor;
[0007] Based on the format setting interface, the document format of the target document is set according to the format requirements.
[0008] According to another aspect of this disclosure, a document processing apparatus based on a large model is provided, comprising:
[0009] The determination module is used to determine the format requirements of the target document in response to the interface operations of the target object on the target interface; wherein, the target document is obtained based on the processing of the large model;
[0010] The settings module is used to set the formatting interface in the target document editor based on the formatting requirements of the target document.
[0011] The processing module is used to set the document format of the target document according to the format requirements based on the format setting interface.
[0012] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0013] At least one processor; and
[0014] The memory is communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.
[0016] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of this disclosure.
[0017] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of this disclosure.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0019] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0020] Figure 1 This is a flowchart illustrating a document processing method based on a large model according to an embodiment of the present disclosure;
[0021] Figure 2 This is a flowchart illustrating the process of determining the format requirements of a target document according to an embodiment of this disclosure;
[0022] Figure 3 This is a schematic diagram of a process for formatting a target document according to an embodiment of the present disclosure;
[0023] Figure 4 This is a schematic diagram of the sequential processing of fragments according to an embodiment of the present disclosure;
[0024] Figure 5 This is a schematic diagram of the backend of a document processing method based on a large model according to an embodiment of the present disclosure;
[0025] Figure 6 This is a schematic diagram of the structure of a document processing apparatus based on a large model according to an embodiment of the present disclosure;
[0026] Figure 7 This is a block diagram of an electronic device used to implement the document processing method based on a large model according to embodiments of the present disclosure. Detailed Implementation
[0027] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0028] The terms “first,” “second,” etc., used in this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion, such as including a series of steps or units. A method, system, product, or apparatus is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0029] With the rapid development of internet technology and social media, large models can help generate and rewrite documents. Large models support diverse document formats, such as plain text documents and PDF (Portable Document Format) documents. However, some documents generated by large models contain only text information without corresponding formatting, such as plain text documents. Other documents generated by large models, while possessing corresponding text formatting and capable of combining text and images, are complex to modify, such as HTML (Hypertext Markup Language) format documents.
[0030] Currently, some documents generated from large models face the problem that traditional document editing methods are either unsuitable or inefficient. For example, with the development of artificial intelligence technology, many large models support interaction with users through browsers, and the documents also need to be displayed in browser pages such as HTML. Users often need to edit the documents displayed in the browser, and traditional document editing software is difficult to adapt to browsers. In addition, large model applications also generate long plain text documents without formatting. In this case, traditional text editing software cannot meet the formatting requirements of documents generated by large models. For some long documents with a lot of content, setting the format one by one is very time-consuming, laborious, and prone to errors.
[0031] In view of this, embodiments of this disclosure provide a document processing method based on a large model, which can automatically adjust the document format, simplify the process of setting document format, reduce human error, and thereby improve the quality and speed of document processing. Figure 1 As shown, it mainly includes the following:
[0032] S101, in response to the interface operation of the target object on the target interface, determine the format requirements of the target document; wherein, the target document is obtained based on the large model processing.
[0033] In this embodiment of the disclosure, the target document obtained by the large model can be understood as a document obtained by the large model performing a text generation task, or a document obtained by the large model performing a rewriting task on the original document. In short, any document obtained relying on the powerful generation and reasoning capabilities of the large model can be used as a target document. When it is desired to set the format of the target document, the target object can perform corresponding operations on the target interface to set its desired document format requirements, such as setting the font style, paragraph spacing, alignment, etc. of the target document.
[0034] In this embodiment, the target interface refers to an operation interface independent of the target document editor, designed to provide a functional interface for document formatting. In implementation, the target interface can be presented in independent application software, such as an app (application) that relies on a large model for service, or it can be provided to the target user as a webpage to suit different usage scenarios and personal preferences. For example, if the large model service is provided through a browser, the target interface can be set within the browser. When the large model service is provided as an app, the target interface is provided by that app.
[0035] S102, Based on the format requirements of the target document, set the format setting interface in the target document editor.
[0036] Once the format requirements of the target document are determined, a corresponding format setting interface can be set in the target document editor to set the format of the target document by modifying the target document editor.
[0037] The formatting interface in this embodiment is responsible for processing the target document to apply the formatting requirements set by the target object to the target document. For example, if the formatting requirements include using a specific font style, then the formatting requirements will be implemented by modifying the editor's formatting interface.
[0038] S103, based on the format setting interface, sets the document format of the target document according to the format requirements.
[0039] Based on the interface settings provided in step S102, the target document is formatted. For example, the format of the target document can be adjusted by using the formatting interface to set requirements such as paragraph spacing and font.
[0040] In this embodiment, the format requirements of the target document are determined based on the target object's operations on the target interface. The target document editor can be flexibly set according to the target object's desired format requirements. By modifying the target document editor, a format setting interface is obtained, which can satisfy document settings with different format requirements. The format setting interface can uniformly set the format of content in the target document that needs to be formatted, which can reduce the time and workload of manually adjusting the format and improve the efficiency of setting document format.
[0041] In this embodiment of the disclosure, the target document editor implements a format setting interface based on the SDK (Software Development Kit) to complete the format setting of the target document.
[0042] In this embodiment of the disclosure, the same formatting interface in the target document editor can support the formatting requirements of different documents. In practice, the formatting interface used to process the target document records the formatting requirements corresponding to multiple document identifiers.
[0043] For example, the formatting requirement for document identifier C is that the first-level heading uses font 1, the formatting requirement for document identifier D is that the first-level heading uses font 2, and the formatting requirement for document identifier R is that the first-level heading uses font 3 and font size 3, etc.
[0044] In this embodiment of the disclosure, by recording the format requirements corresponding to multiple document identifiers in the format setting interface, it can be ensured that all target documents with the same identifier can be formatted according to the predetermined format requirements. Furthermore, the same format setting interface can support processing different documents, and can also support processing a large number of documents simultaneously. Especially when frequent updates or generation of multiple documents are required, it can significantly improve the efficiency of setting document formats, thus supporting a large number of users to set document formats according to their own requirements in a large model service.
[0045] In this embodiment of the disclosure, the same format setting interface can support the format requirements of different documents. When setting the format of a target document, the document format of the target document can be set based on the format requirements corresponding to the document identifier of the target document within the format setting interface. That is, the format setting interface identifies the format requirements of the target document by recognizing the document identifier of the target document, and applies these formats to the target document according to the identified format requirements, automatically setting the format of the target document to ensure that the format of the target document presents the desired effect of the target object.
[0046] In this embodiment of the disclosure, the document identifier is an identifier used to distinguish different documents.
[0047] In this embodiment, the target document is formatted based on the format requirements corresponding to the document identifier within the formatting interface. This ensures that the target document is processed uniformly based on the document identifier, resulting in the target document having the desired or compliant format. The automated processing also reduces formatting errors caused by human factors, thereby improving the professionalism and reliability of the target document formatting process.
[0048] In some embodiments, due to the diversity of documents generated by large models, in order to reuse the same format setting interface when facing different documents, setting the format setting interface in the target document editor based on the format requirements of the target document can be implemented as follows: setting the format parameters of the target document within the format setting interface in the target document editor based on the format requirements of the target document.
[0049] For example, different user groups have different needs and therefore different requirements for document formatting. Therefore, during implementation, the formatting parameters for the target document can be set within the formatting interface of the target document editor. For instance, the required font style, font size, line spacing, etc., can be set separately for different themes or headings in the document.
[0050] In this embodiment of the disclosure, based on the format requirements of the target document, the format parameters of the target document are set in the format setting interface in the target document editor. In this way, the format requirements of different documents can be supported through a limited format setting interface. Moreover, the format parameters can be set dynamically and flexibly according to the needs of the format setting interface, which can meet diverse format requirements and make the format setting of the target document more flexible and changeable.
[0051] In other embodiments, setting the format setting interface in the target document editor based on the format requirements of the target document can also be implemented as: creating a format setting interface corresponding to the target document for the target document editor based on the format requirements of the target document.
[0052] In other words, the target document editor supports dynamically expanding the format setting interface to meet different needs.
[0053] One possible implementation involves leveraging the code development capabilities of a large model to use existing interfaces in the target document editor as reference interfaces. The large model analyzes the performance of these reference interfaces and develops new interfaces based on the formatting requirements of the target documents. This allows the formatting interfaces in the target document editor to be dynamically expanded according to the number and requirements of the target documents. For example, different target objects can have different formatting requirements set for different target documents, with each formatting requirement corresponding to a different formatting interface, thus enabling the setting of different formats for different target documents.
[0054] This embodiment of the disclosure not only supports setting document formats outside the target document editor, but also supports dynamically expanding the format setting interface to meet the format requirements of different documents. When a large model service simultaneously provides services to a large number of users, this integrates document format settings into the large model service, allowing multiple users to flexibly set their desired formats according to their own needs.
[0055] Understandably, different formatting interfaces can be generated for different documents to provide text formatting services for different objects simultaneously. For example, a large model service can provide services for n target objects simultaneously, and each of the n target objects can have its own formatting requirements set. Using the method provided in this disclosure, the formatting requirements of the target documents for different target objects can be set within the same formatting interface, thus supporting the simultaneous setting of the formatting of multiple target documents through the same formatting interface. Multiple formatting interfaces can also be dynamically extended to support the simultaneous setting of the formatting of multiple target documents.
[0056] In this embodiment of the disclosure, in response to the interface operation of the target object on the target interface, the format requirements of the target document are determined, which can be implemented as follows: Figure 2 As shown, it includes:
[0057] S201, in response to the target object's editing operation on the target template in the target interface, determine the initial format of the first target content in the target document; the target template is any one of the provided templates.
[0058] In other words, when a target needs to edit document formatting within a specific target interface, multiple templates can be provided for the target to choose from, either within that target interface or its sub-interfaces. These templates may include templates for different tasks. Each task may also offer multiple templates in different formats.
[0059] Once a target template is selected from these multiple templates, it can be used directly to format the target document. Furthermore, if the user wishes to change the format, the desired format can be obtained as the initial format based on the format provided by the target template and in response to the target object's editing operations on the target template within the target interface.
[0060] In this embodiment of the disclosure, the first target content is the content that needs to be formatted. For example, the first target content may include headers, headings at various levels, footers, etc., in the target document. The initial format may include formatting requirements for different parts of the first target content. Each formatting requirement can be implemented independently through its own formatting interface. For example, the formatting interface responsible for font size can support setting the font size for different levels of headings; the formatting interface for line spacing can support setting the line spacing for different levels of headings. Therefore, when formatting the target document using the formatting interface, the formatting requirements corresponding to the function of the formatting interface can be read from the formatting interface to complete the formatting of the corresponding parts of the target document. For example, the formatting interface includes a font setting interface, used to set the font of the corresponding text in the target document according to the font requirements in the formatting requirements. The formatting interface includes a font size setting interface, used to set the font size of the corresponding text in the target document according to the font size requirements in the formatting requirements. The formatting interface may also include a spacing setting interface, used to set the character spacing and / or line spacing of the corresponding text in the target document according to the spacing requirements in the formatting requirements. The corresponding text can be defined according to the format requirements. For example, if the format requirements include sub-format requirements for different content parts, such as the first sub-format requirement for a first-level heading and the second format requirement for a second-level heading, then when executed, the content part corresponding to the sub-format requirements included in the format requirements is the corresponding text. The sub-format requirements include content part identifiers to distinguish the sub-format requirements for different content parts.
[0061] To facilitate setting the document format, in S202 of this embodiment, a preview operation is performed on the initial format to compare the content of the first target content before and after the format setting.
[0062] After the target object completes the editing operation and determines the initial format of the first target content, a preview function can be provided to the target object on the editing page, allowing the target object to view the comparison of the content before and after the formatting settings.
[0063] Previewing helps the target audience intuitively understand the effects of formatting before and after, including whether the text layout, font styles, and heading formats of the target document meet the requirements. Through previewing, the target audience can promptly identify and correct any potential problems or non-compliance.
[0064] S203, in response to the confirmation operation, obtain the format requirements of the target document.
[0065] Once the target is satisfied with the preview and confirms that there are no errors, the initial format of the target document can be saved as the final format requirement based on the target's confirmation.
[0066] During implementation, the format template set for the target object can be saved so that it can be used with one click to format the document generated from the large model in subsequent use.
[0067] In this embodiment, by providing multiple templates for the target object to choose from, the target object can easily set the document format. When the template does not meet the requirements, the target object can edit the template to meet the format requirements by modifying the target document editor's interface, thus supporting flexible and rapid document formatting. Furthermore, previewing allows the target object to easily confirm the format settings, intuitively identify and correct potential formatting errors, reduce the time spent on repeated modifications, and improve the efficiency of formatting the target document.
[0068] In this embodiment of the disclosure, the format requirements may include at least one of the following:
[0069] (1) Formatting requirements for the second target content; the second target content is determined based on truncation operations in the target document;
[0070] In other words, the target document may contain various elements, such as small-font text or embedded images. Therefore, when rendering this content, it is necessary to identify the specific formatting of the text and the image type, and apply the corresponding rendering rules to ensure that all elements are displayed correctly. For example, small-font text may be changed to the formatting standard corresponding to the target document.
[0071] (2) Formatting requirements set for different content sections in the full text of the target document.
[0072] For example, different content sections can be various types, such as headers, headings at all levels, and footers. During implementation, it supports selecting the first font size for first-level headings, the second font size for second-level headings, selecting the first font style for text content in the target document, and selecting the second font style for all headings.
[0073] In this embodiment of the disclosure, the formatting requirements of the second target content selected through truncation operations allow the target object to make targeted formatting adjustments based on the characteristics of different parts of the target document. Setting separate formatting requirements for different content parts in the document can enhance the logical structure of the document, make the differences between the various parts more obvious, and improve the efficiency of document formatting.
[0074] In this embodiment of the disclosure, as described above, the target document obtained by the large model processing can be a target document generated by the large model according to the requirements, or a target document obtained by the large model performing a rewriting task.
[0075] During implementation, the target document can be formatted simultaneously while the large model is being processed to obtain the target document. For example, if the target document contains m pages, the formatting process can begin when the second page is obtained from the large model.
[0076] To improve processing efficiency and flexibility, target documents are typically split into multiple segments when processing them. These segments can be formatted independently before being merged into a complete document. Therefore, in this embodiment of the disclosure, the target document is formatted as follows: Figure 3 As shown, it may include the following:
[0077] S301, sequentially obtain the fragments to be processed from the target document.
[0078] That is, based on the structure and content of the target document, identify and extract the segments that need to be processed.
[0079] During implementation, the target document can be traversed sequentially according to preset rules or algorithms, and the segments to be processed can be identified and extracted one by one. These segments can be paragraphs, lists, tables, images, etc., from the target document.
[0080] In this embodiment, the content to be modified in the target document can be converted into a Parchment tree (document model) structure for storage. Therefore, the target document can be segmented according to this tree structure. In implementation, this tree structure can be converted into corresponding HTML for display, so that after formatting the target document, it can be output and displayed in HTML format.
[0081] S302, input the obtained fragments to be processed into the format setting interface, so as to set the format of each fragment to be processed in the target document in sequence according to the format requirements.
[0082] In other words, the segments to be processed are extracted from the target document in a certain order. Then, they are input into a formatting interface, and the format of each segment is set according to the extraction order.
[0083] In this embodiment, the target document is divided into multiple segments for processing, which can make full use of computing resources. Especially when processing large target documents, different segments can be processed in parallel, accelerating the overall processing speed. Processing the target document sequentially according to the order of the segments to be processed can ensure the continuity and integrity of the target document content, avoid data loss or disorder during processing, and improve the efficiency of target document formatting.
[0084] Taking the processing of a target document as an example, during implementation, a Parchment tree structure is used to sequentially format each segment of the target document. The Parchment tree consists of blobs, which correspond to DOM (Document Object Model) nodes; a blot is an abstraction of a node in the DOM tree. Blots can provide structure, formatting, and / or content. Attributions belong to blobs and can also provide lightweight formatting information, much like the relationship between DOM attributes and nodes. The Parchment tree structure can accurately describe the position of each character and is more secure than HTML; therefore, it is used to organize the content structure of the target document and perform formatting.
[0085] like Figure 4 As shown, node PB represents a Blot in the Parchment tree structure. PB can provide the structure, format, or content; child nodes LB can represent multiple child nodes under node PB. It represents the content within the selected segment. When setting the format, such as... Figure 4 As shown by the middle arrow, different nodes can be linked together to represent the processing flow between different paragraphs. Here, `prev` represents the preceding part, `next` represents the next part, `tail` represents the end of a node, and `head` represents the beginning of a node. This method completes the formatting of a target document. `parent` represents the parent-child node relationship.
[0086] After all the fragment formats to be processed are set, the processed fragments are merged into a complete document and converted into the required output format for storage.
[0087] In this embodiment, the target document can be any format, such as PDF or TXT (TextFile). When processing the target document using the document editor provided in this embodiment, the document editor converts the target document into JSON (JavaScript Object Notation) data stored in Delta (the editor's data format). Delta is a format used to describe the content and changes of a rich text document structure, and its data structure is based on JSON, facilitating mutual parsing between services. After storage, the document editor maps the data stored in Delta to the Parchment tree to update the nodes and attributes in the Parchment tree, completing the formatting of the target document. Changes in the Parchment tree are synchronized to the DOM tree and displayed in the form of an HTML page, ensuring real-time updates to the user interface so that users can see the refreshed content. The Parchment tree, as one of the core components of the target document editor, acts as a bridge, connecting the content storage of the target document editor with the DOM structure ultimately presented on the front-end page. In this way, the document editor can provide a consistent content editing experience while maintaining a high degree of customizability and flexibility.
[0088] It's important to note that the DOM, as a programming interface, can be used to represent and modify the content and structure of HTML documents. For example, the DOM can view a document as a tree, where each node is a component of the document, such as elements, attributes, and text.
[0089] Furthermore, during implementation, the processing progress of the target document by the large model can be recorded; and / or, the formatting progress of the target document can be recorded. This allows the target user to view the progress of the target document's formatting process in real time. It also helps the target user to promptly identify which part of the target document has failed or encountered anomalies during the formatting process, facilitating timely response strategies.
[0090] During implementation, the progress of formatting the target document can be queried via scheduled tasks, and it can also be checked whether the target document has been processed by the large model. Additionally, user events can also be used to trigger queries about the target document's formatting progress and whether it has been processed by the large model. These user events include, for example, focus and blur events.
[0091] During implementation, different documents maintain their own queues for progress queries.
[0092] In some embodiments, processing large models of documents may take several seconds or even minutes, or even longer. During this time, a failure could lead to task failure. Therefore, in the process of formatting segments, to ensure the normal progress of the task, in this embodiment of the disclosure, for segments that have not been successfully formatted, the segment identifier of the segment to be processed can be recorded. If the segment to be processed fails to be formatted due to a failure, the segment to be processed can be obtained based on the segment identifier, so as to sequentially set the document format of each segment in the target document according to the format requirements.
[0093] For example, if the target document editor fails to properly lose focus (e.g., the user closes the page; the network suddenly disconnects during editing), triggering an ACK (Acknowledgement) and causing the interface to be locked, the uploadId (segment identifier) of that segment can be stored locally each time a segment is pushed to the target document editor for formatting. Upon a second push, the local segment identifier is read first, and if an uploadId that has not been properly ACKed and unlocked is found, it is reused to allow formatting to begin from that segment.
[0094] In this embodiment of the disclosure, by recording the fragment identifier of the fragment to be processed, it can be ensured that even if a failure is encountered during processing, the formatting of the entire target document can be completed by re-acquiring the fragment that was not successfully processed, thereby ensuring the integrity of the entire target document.
[0095] In summary, the document processing method based on a large model provided in this disclosure involves the target object inputting its format requirements for the target document on the front-end target interface, and then interacting with the Delta function of the document editor's back-end. The back-end then calls the corresponding methods to set the format of the target document.
[0096] Specifically, such as Figure 5As shown, the content of the target document stored in Delta can be obtained by calling the Parchment (document model) method, and the format of the corresponding content in the target document can be set according to the format requirements of the target document. The Theme (theme mode) method allows the target object to select the appearance style of the document editor, and the interface of the target document editor can be further customized through CSS (Cascading Style Sheets) and modular mechanisms, and then fed back to the front end of the target object for display. MutationObserver (global event center) listens for changes in the DOM tree and synchronizes these changes to the data model of the target document editor, so that the target document editor can observe DOM changes in the area, such as the addition, deletion, and modification of attributes of nodes, thereby ensuring that the content state of the editor is consistent with the actual DOM, thus completing the format setting of the target document. In implementation, an instance of the MutationObserver method can be created by defining the types of changes to be listened to, such as the overall progress of the format setting of the target document, the format setting progress of each segment in the target document, etc. Then, the received change information can be processed according to specific callback functions, and appropriate measures can be taken to synchronize it to the data model of the document editor according to the type of change. For example, when the DOM changes, a specific update method can be used to update the DOM to confirm the formatting progress of each segment or the formatting progress of the entire target document.
[0097] The solution provided by this disclosure allows for global modification of the formatting of plain documents generated by large AI (Artificial Intelligence) models. This reduces the complexity of human intervention and the errors introduced by human intervention, ensuring that documents adhere to the same formatting standards and improving document processing efficiency.
[0098] Based on the same technical concept, embodiments of this disclosure also provide a document processing apparatus 600 based on a large model, such as... Figure 6 As shown, it includes:
[0099] The determination module 601 is used to determine the format requirements of the target document in response to the interface operation of the target object on the target interface; wherein, the target document is obtained based on the large model processing;
[0100] Setting module 602 is used to set the format setting interface in the target document editor based on the format requirements of the target document;
[0101] Processing module 603 is used to set the document format of the target document according to the format requirements based on the format setting interface.
[0102] In some embodiments, the processing module includes:
[0103] The processing subunit is used to set the document format of the target document based on the format requirements corresponding to the document identifier of the target document within the format setting interface.
[0104] In some embodiments, the formatting interface records the formatting requirements corresponding to multiple document identifiers.
[0105] In some embodiments, the setting module includes:
[0106] The configuration sub-unit is used to set the format parameters of the target document within the format settings interface in the target document editor, based on the format requirements of the target document.
[0107] In some embodiments, the setting module includes:
[0108] Create a sub-unit to create a formatting interface for the target document editor based on the formatting requirements of the target document.
[0109] In some embodiments, the determining module includes:
[0110] The sub-unit is determined in response to the editing operation of the target object on the target template in the target interface, and the initial format of the first target content in the target document is determined; the target template is any one of the provided templates.
[0111] The comparison sub-unit is used to preview the initial format to compare the content of the first target before and after the formatting.
[0112] Modify the sub-cell to obtain the formatting requirements in the target document in response to the confirmation operation.
[0113] In some embodiments, the format requirements of the target document include at least one of the following:
[0114] Regarding the formatting requirements for the second target content; the second target content is determined based on truncation operations within the target document;
[0115] Formatting requirements are set separately for different content sections within the target document.
[0116] In some embodiments, the processing module includes:
[0117] Get sub-units, used to sequentially retrieve the fragments to be processed from the target document;
[0118] The formatting subunit is used to input the acquired segments to be processed into the formatting interface so that the segments to be processed in the target document are formatted sequentially according to the format requirements.
[0119] In some embodiments, a fault handling module is further included, for:
[0120] Record the fragment identifier of the fragment to be processed;
[0121] If the formatting of the segment to be processed fails due to a fault, the segment to be processed is obtained based on the segment identifier, and the document format is set sequentially for each segment in the target document according to the format requirements.
[0122] In some embodiments, a recording module is further included, for:
[0123] Record the processing progress of the large model on the target document; and / or,
[0124] Record the progress of formatting the target document.
[0125] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.
[0126] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0127] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0128] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0129] like Figure 7As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0130] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0131] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as a large model-based document processing method. For example, in some embodiments, the large model-based document processing method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the large model-based document processing method described above can be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform a large model-based document processing method by any other suitable means (e.g., by means of firmware).
[0132] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0133] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0134] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0135] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0136] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0137] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0138] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0139] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A document processing method based on a large model, comprising: In response to the interface operations of the target object on the target interface, the format requirements of the target document are determined; wherein, the target document is obtained based on the processing of a large model; Based on the format requirements of the target document, set the format setting interface in the target document editor; During the process of obtaining the target document through large model processing, the document format of the target document is set according to the format requirements based on the format setting interface. The target interface is an operation interface independent of the target document editor, and the target document editor completes the format setting of the target document through the format setting interface; The format setting interface supports multiple users to set their own format requirements simultaneously, and the target object is any user among the multiple users.
2. The method according to claim 1, wherein, The step of setting the document format of the target document according to the format requirements based on the format setting interface includes: Based on the format requirements corresponding to the document identifier of the target document within the format setting interface, the document format of the target document is set.
3. The method according to claim 1, wherein, The format setting interface records the format requirements corresponding to each of the multiple document identifiers.
4. The method according to claim 1, wherein, The step of setting the format setting interface in the target document editor based on the format requirements of the target document includes: Based on the format requirements of the target document, the format parameters of the target document are set in the format setting interface of the target document editor.
5. The method according to claim 1, wherein, The step of setting the format setting interface in the target document editor based on the format requirements of the target document includes: Based on the format requirements of the target document, a format setting interface corresponding to the target document is created for the target document editor.
6. The method according to claim 1, wherein, The step of determining the format requirements of the target document in response to the interface operation of the target object on the target interface includes: In response to an editing operation performed by the target object on the target template in the target interface, the initial format of the first target content in the target document is determined; the target template is any one of a variety of provided templates. Preview the initial format to compare the content of the first target content before and after the format setting; In response to the confirmation operation, the format requirements of the target document are obtained.
7. The method according to claim 1, wherein, The format requirements for the target document include at least one of the following: Regarding the format requirements of the second target content; the second target content is determined based on truncation operations in the target document; The formatting requirements are set separately for different content sections in the full text of the target document.
8. The method according to any one of claims 1-7, wherein, The step of setting the document format of the target document according to the format requirements based on the format setting interface includes: Obtain the segments to be processed sequentially from the target document; The acquired segments to be processed are input into the format setting interface to sequentially format each segment in the target document according to the format requirements.
9. The method according to claim 8, further comprising: Record the fragment identifier of the fragment to be processed; If the formatting of the segment to be processed fails due to a fault, the segment to be processed is obtained based on the segment identifier, and the document format is set sequentially for each segment in the target document according to the format requirements.
10. The method of claim 8, further comprising: Record the processing progress of the large model on the target document; And / or, Record the progress of formatting the target document.
11. A document processing apparatus based on a large model, comprising: The determination module is used to determine the format requirements of the target document in response to the interface operation of the target object on the target interface; wherein the target document is obtained based on the processing of a large model; The settings module is used to set the format setting interface in the target document editor based on the format requirements of the target document during the process of obtaining the target document from the large model. The processing module is used to set the document format of the target document according to the format requirements based on the format setting interface; The target interface is an operation interface independent of the target document editor, and the target document editor completes the format setting of the target document through the format setting interface; The format setting interface supports multiple users to set their own format requirements simultaneously, and the target object is any user among the multiple users.
12. The apparatus according to claim 11, wherein, The processing module includes: The processing subunit is used to set the document format of the target document based on the format requirements corresponding to the document identifier of the target document in the format setting interface.
13. The apparatus according to claim 11, wherein, The format setting interface records the format requirements corresponding to each of the multiple document identifiers.
14. The apparatus according to claim 11, wherein, The setting module includes: The setting subunit is used to set the format parameters of the target document within the format setting interface in the target document editor based on the format requirements of the target document.
15. The apparatus according to claim 11, wherein, The setting module includes: A subunit is created to create the format setting interface corresponding to the target document for the target document editor based on the format requirements of the target document.
16. The apparatus according to claim 11, wherein, The determining module includes: A subunit is defined to determine the initial format of the first target content in the target document in response to an editing operation of the target object on the target interface against the target template; the target template is any one of a variety of provided templates. The comparison subunit is used to preview the initial format in order to compare the content of the first target content before and after the format setting. Modify the subunit to obtain the format requirements of the target document in response to the confirmation operation.
17. The apparatus according to claim 11, wherein, The format requirements for the target document include at least one of the following: Regarding the format requirements of the second target content; the second target content is determined based on truncation operations in the target document; The formatting requirements are set separately for different content sections in the full text of the target document.
18. The apparatus according to any one of claims 11-17, wherein, The processing module includes: A sub-unit is used to sequentially obtain the segments to be processed from the target document; The format setting subunit is used to input the acquired segments to be processed into the format setting interface so as to sequentially set the format of each segment to be processed in the target document according to the format requirements.
19. The apparatus of claim 18, further comprising a fault handling module, configured to: Record the fragment identifier of the fragment to be processed; If the formatting of the segment to be processed fails due to a fault, the segment to be processed is obtained based on the segment identifier, and the document format is set sequentially for each segment in the target document according to the format requirements.
20. The apparatus of claim 18, further comprising a recording module for: Record the processing progress of the large model on the target document; and / or, Record the progress of formatting the target document.
21. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-10.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-10.
23. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-10.
Citation Information
Patent Citations
Office Word-based document automatic modularization and multi-terminal independent authority limit editing method
CN110442851A
Text format setting method and device and electronic equipment
CN116151189A
Document editing method and device, equipment and storage medium
CN117910433A
Document processing method and device based on artificial intelligence, computer equipment and storage medium
CN117973331A