Task processing method, document-based dialog method, and document processing method

By constructing multi-granularity document structure graphs and utilizing large-scale deep learning models, the problem of limited document block knowledge was solved, achieving more comprehensive and accurate task processing results.

WO2026056656A1PCT designated stage Publication Date: 2026-03-19ALIBABA (CHINA) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

In existing technologies, the limited document knowledge within document blocks results in poor comprehensiveness and accuracy in task processing, making it impossible to effectively handle complex problems such as full-text summarization, aggregated question answering, and chained reasoning.

Method used

By constructing multi-granularity document structure graphs, we obtain the document structure graph and hierarchical structure graph of the target document. We then use large-scale deep learning models for task processing to mine the relationships and hierarchical relationships between document blocks, thereby achieving multi-granularity document knowledge representation.

Benefits of technology

It improves the comprehensiveness and accuracy of task processing, enabling it to better answer complex questions such as full-text summarization, aggregated question answering, and chain reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025116244_19032026_PF_FP_ABST
    Figure CN2025116244_19032026_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a task processing method, a document-based dialog method, and a document processing method. The task processing method comprises: acquiring task data for a target document and a document structural diagram of the target document; inputting the task data and the document structural diagram of the target document into a task processing model, to obtain a task processing result, the target document comprising a plurality of chunks, the document structural diagram being constructed on the basis of associations between the plurality of chunks and a hierarchical structural diagram of the target document, and the hierarchical structural diagram being constructed by using the plurality of chunks as nodes and using hierarchical relationships between the plurality of chunks as edges. By means of representing the target document by using the plurality of chunks and the coarse-grained hierarchical relationships between the plurality of chunks, and incorporating the fine-grained associations between the plurality of chunks, the target document can be represented as a multi-grained document structural diagram, so that more accurate and detailed document knowledge can be provided during the process of processing a task, and the comprehensiveness and accuracy of the task processing result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Task processing method, document dialogue method and document processing method

[0001] The present disclosure claims priority to Chinese Patent Application No. 202411274436.X, filed on September 11, 2024, entitled "Task processing method, document dialogue method and document processing method", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] Embodiments of the present disclosure relate to the field of computer technology, and particularly relate to a task processing method, a document dialogue method and a document processing method. BACKGROUND

[0003] With the development of computer technology, task processing for documents has gradually become a research focus. For example, document question answering is a natural language processing technology that allows users to ask questions in natural language to a document set and automatically extracts relevant information from the documents to form answers.

[0004] Currently, a document can be divided into multiple document blocks, and task processing is performed on any document block. However, in the above scheme, the document knowledge in the document block is limited, resulting in poor comprehensiveness and accuracy of task processing. Therefore, there is an urgent need for a comprehensive and accurate task processing scheme. SUMMARY

[0005] Therefore, embodiments of the present disclosure provide a task processing method. One or more embodiments of the present disclosure also relate to a document dialogue method, a document processing method, a task processing device, a document dialogue device, a document processing device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects in the prior art.

[0006] According to a first aspect of embodiments of the present disclosure, a task processing method is provided, comprising:

[0007] obtaining task data for a target document and a document structure graph of the target document;

[0008] inputting the task data and the document structure graph of the target document into a task processing model to obtain a task processing result, wherein the target document includes multiple document blocks, the document structure graph is constructed based on an association relationship between the multiple document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the multiple document blocks as nodes and a hierarchical relationship between the multiple document blocks as edges.

[0009] According to a second aspect of embodiments of the present disclosure, a document dialogue method is provided, comprising:

[0010] receive the dialogue data sent by the client for the target document;

[0011] input the dialogue data and the document structure graph of the target document into the task processing model to obtain a dialogue processing result, wherein the target document includes a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges;

[0012] send the dialogue processing result to the client.

[0013] According to a third aspect of the embodiments of the present disclosure, a document processing method is provided, including:

[0014] obtain a hierarchical structure graph of a target document, wherein the target document includes a plurality of document blocks, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges;

[0015] input an information extraction mode for the target document and the hierarchical structure graph into a task processing model to obtain an information extraction result;

[0016] determine an association relationship between the plurality of document blocks according to the information extraction result;

[0017] update edges in the hierarchical structure graph according to the association relationship to obtain a document structure graph of the target document.

[0018] According to a fourth aspect of the embodiments of the present disclosure, a task processing apparatus is provided, including:

[0019] a first obtaining module configured to obtain task data for a target document and a document structure graph of the target document;

[0020] a first input module configured to input the task data and the document structure graph of the target document into a task processing model to obtain a task processing result, wherein the target document includes a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges.

[0021] According to a fifth aspect of the embodiments of the present disclosure, a document dialogue apparatus is provided, including:

[0022] a receiving module configured to receive dialogue data sent by a client for a target document;

[0023] The second input module is configured to input the dialogue data and a document structure graph of the target document into the task processing model to obtain a dialogue processing result, wherein the target document includes a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges.

[0024] The sending module is configured to send the dialogue processing result to the client.

[0025] According to a sixth aspect of the embodiments of the present disclosure, a document processing apparatus is provided, including:

[0026] The second obtaining module is configured to obtain a hierarchical structure graph of a target document, wherein the target document includes a plurality of document blocks, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges.

[0027] The third input module is configured to input an information extraction mode for the target document and the hierarchical structure graph into the task processing model to obtain an information extraction result.

[0028] The determining module is configured to determine an association relationship between the plurality of document blocks according to the information extraction result.

[0029] The updating module is configured to update edges in the hierarchical structure graph according to the association relationship to obtain a document structure graph of the target document.

[0030] According to a seventh aspect of the embodiments of the present disclosure, a computing device is provided, including:

[0031] a memory and a processor;

[0032] The memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, so as to implement the steps of the method provided in the first aspect or the second aspect or the third aspect.

[0033] According to an eighth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the method provided in the first aspect or the second aspect or the third aspect.

[0034] According to a ninth aspect of the embodiments of the present disclosure, a computer program product is provided, including computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the method provided in the first aspect or the second aspect or the third aspect.

[0035] The task processing method provided by one embodiment of the present disclosure comprises: obtaining task data for a target document and a document structure graph of the target document; inputting the task data and the document structure graph of the target document into a task processing model to obtain a task processing result, wherein the target document comprises a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges. BRIEF DESCRIPTION OF DRAWINGS

[0036] FIG. 1 is an architecture diagram of a task processing system according to one embodiment of the present disclosure;

[0037] FIG. 2 is a flowchart of a task processing method according to one embodiment of the present disclosure;

[0038] FIG. 3 is a schematic diagram of a document structure graph according to one embodiment of the present disclosure;

[0039] FIG. 4 is a schematic diagram of a hierarchical structure graph according to one embodiment of the present disclosure;

[0040] FIG. 5 is a flowchart of a document dialogue method according to one embodiment of the present disclosure;

[0041] FIG. 6 is a flowchart of a document processing method according to one embodiment of the present disclosure;

[0042] FIG. 7 is a flowchart of a processing process of a document processing method according to one embodiment of the present disclosure;

[0043] FIG. 8 is a structural schematic diagram of a task processing apparatus according to one embodiment of the present disclosure;

[0044] FIG. 9 is a structural schematic diagram of a document dialogue apparatus according to one embodiment of the present disclosure;

[0045] FIG. 10 is a structural schematic diagram of a document processing apparatus according to one embodiment of the present disclosure;

[0046] FIG. 11 is a structural schematic diagram of a task platform according to one embodiment of the present disclosure;

[0047] FIG. 12 is a structural block diagram of a computing device according to one embodiment of the present disclosure. DETAILED DESCRIPTION

[0048] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure. However, the present disclosure can be implemented in many different ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the present disclosure, so the present disclosure is not limited to the specific implementation disclosed below.

[0049] The terminology used in this disclosure one or more embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure one or more embodiments. As used in this disclosure one or more embodiments and the accompanying claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this disclosure one or more embodiments, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0050] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal sequence, but are used only to distinguish one type of information from another. For example, without departing from the scope of this disclosure one or more embodiments, first can be termed second, and, similarly, second can be termed first. Depending on the context, the word "if' as used herein can be interpreted to mean "when" or "in response to determining."

[0051] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this disclosure one or more embodiments are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0052] In this disclosure one or more embodiments, a large model refers to a deep learning model with a large number of model parameters, usually containing hundreds of millions, tens of billions, hundreds of billions, tens of billions or even more than one hundred billion model parameters. The large model can also be called a foundation model. Through large-scale unlabeled corpus pre-training of the large model, a pre-trained model with more than one hundred million parameters is produced. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability. For example, large language model (LLM, Large Language Model), multi-modal pre-training model (multi-modal pre-training model) and the like.

[0053] In practical applications, a large model only needs a small number of samples to fine-tune the pre-trained model and can be applied to different tasks. Large models can be widely used in natural language processing (NLP, Natural Language Processing) and computer vision, and can be applied to computer vision tasks such as visual question answering (VQA, Visual Question Answering), image captioning (IC, Image Caption), image generation, and natural language processing tasks based on text sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0054] First, the nomenclature involved in one or more embodiments of the present disclosure is explained.

[0055] Portable Document Format Parser (PDF-Parser, Portable Document Format-Parser): refers to a software tool or library used to parse the content of PDF files. This tool can extract text, images, tables, and other elements from PDF files and convert this information into other formats for further processing or analysis.

[0056] Optical Character Recognition (OCR, Optical Character Recognition): is a technology that converts text in images into editable and searchable text. OCR technology can be applied to scanned documents, photos, books, newspapers, and other pictures containing printed or handwritten text.

[0057] Document Chunking: is a text processing technique that involves dividing longer documents into smaller, more manageable and processable segments or chunks. Document chunking technology is suitable for natural language processing, information retrieval, text mining, and large-scale document processing.

[0058] Aggregated Question Answering: is an information retrieval and natural language processing technology that aims to collect and integrate relevant information from multiple sources to answer user questions. In traditional question answering systems, answers are usually provided from a single source, while aggregated question answering tries to provide more comprehensive and accurate answers by combining information from different sources.

[0059] Chain-of-Thought (CoT): In the field of artificial intelligence, especially for large models, it is a technique designed to improve the model's ability to solve complex reasoning tasks. The core idea of chain-of-thought is to break down complex problems into a series of simpler, manageable steps, so that the model can solve the problem step by step, rather than trying to solve the entire problem at once.

[0060] For document-based tasks, the representation of the document is a very important prerequisite. Currently, the document can usually be parsed to extract the text information inside through PDF-Parser or OCR layout recognition technology, and the document can be divided into multiple document blocks according to the text information. Any document block can be processed for the task. Assuming that the document has 1000 characters, due to the length of the document, it cannot be completely input into the model for task processing, so the 1000 characters can be cut into two document blocks of 500 characters, and the document block related to the task data is input into the model for task processing. However, the above scheme has too coarse granularity for the representation of the document, and the document knowledge in the document block is limited, resulting in poor comprehensiveness and accuracy of task processing, and also cannot answer questions such as full-text summary, aggregation question answering, chain-of-thought, etc.

[0061] To solve the above problems, the embodiments of the present disclosure form a multi-granularity document knowledge representation form of a multi-granularity document structure graph by multi-granularity mining of a document, improve the representation ability of unstructured multi-modal documents, and achieve a good effect in both fine-grained and coarse-grained task processing, so that the task processing is more comprehensive and the task processing result is more accurate. Specifically, task data for a target document and a document structure graph of the target document are obtained; the task data and the document structure graph of the target document are input into a task processing model to obtain a task processing result, wherein the target document includes multiple document blocks, the document structure graph is constructed based on an association relationship between the multiple document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the multiple document blocks as nodes and a hierarchical relationship between the multiple document blocks as edges.

[0062] In the present disclosure, a task processing method is provided, and the present disclosure also relates to a document dialogue method, a document processing method, a task processing device, a document dialogue device, a document processing device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0063] Considering that the model parameter quantity of the task processing model is relatively large and the operation resource of the client is limited, the task processing method provided in the embodiments of the present disclosure can be applied to the task processing system as shown in FIG. 1, but is not limited thereto. Referring to FIG. 1, FIG. 1 shows an architecture diagram of a task processing system provided by an embodiment of the present disclosure, and the task processing system can include a client 100 and a server 200;

[0064] The client 100 is configured to send task data for a target document to the server 200.

[0065] The server 200 is configured to input the task data and a document structure diagram of the target document into a task processing model to obtain a task processing result, wherein the target document includes a plurality of document blocks, the document structure diagram is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure diagram of the target document, and the hierarchical structure diagram is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges; and send the task processing result to the client 100.

[0066] The client 100 is further configured to receive the task processing result sent by the server 200.

[0067] As shown in FIG. 1, the task processing model is deployed in the server 200, and the server 200 can be connected to one or more clients 100 through a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. The client 100 can include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a palm computer, a personal computer, a smart home device, a vehicle-mounted device, etc. The client 100 can also interact with the user through a graphical user interface to realize the calling of the task processing model, and thus realize the task processing method provided in the embodiments of the present disclosure.

[0068] It is worth noting that the task processing method provided in the embodiments of the present disclosure is generally executed by the server, but in other embodiments of the present disclosure, the client can also have similar functions as the server to execute the task processing method provided in the embodiments of the present disclosure, in the case that the running resource of the client can meet the deployment and running conditions of the task processing model. In other embodiments, the task processing method provided in the embodiments of the present disclosure can also be executed by the client and the server together. Next, taking the server executing the task processing method provided in the embodiments of the present disclosure as an example, the implementation process of the task processing method is described in detail.

[0069] Referring to FIG. 2, FIG. 2 shows a flowchart of a task processing method provided by an embodiment of the present disclosure, which specifically includes the following steps:

[0070] Step 202: Obtain task data for a target document and a document structure diagram of the target document.

[0071] In one or more embodiments of the present disclosure, when processing a task, task data for a target document can be obtained, and the task data can be used to process the task to obtain a task processing result.

[0072] It should be noted that the target document can be a document in different scenarios, such as a transaction document in a financial scenario, a knowledge document in an education scenario, and a legal document in a legal scenario. The target document can be a document in different forms, such as a PDF, a HyperText Markup Language (HTML), a Word document, a table document, and the like. The target document can be a document in different languages, such as an English document, a Chinese document, and the like. In an optional embodiment of the present disclosure, if the target document is a non-Chinese document, the target document can be converted into a Chinese document. The target document can be a single-modal document or a multi-modal document, where the multi-modal document includes any one of text content, image content, and table content. The multi-modal document includes at least two of the text content, the image content, and the table content. The task data refers to data and information involved in performing a target task related to the target document. The task data includes, but is not limited to, document content of the target document, a document identifier, and various parameters and settings in the process of processing the target document. The target task can be different types of tasks for the target document, such as an aggregated question and answer task, a dialogue task, an abstract extraction task, a chain reasoning task, a document analysis task, a document writing task, and the like.

[0073] In actual applications, there are various ways to obtain the task data for the target document, which can be selected according to actual conditions, and the present disclosure does not make any limitation in this regard. In a possible implementation manner of the present disclosure, the task data for the target document can be received from a client. In another possible implementation manner of the present disclosure, the task data for the target document can be read from other databases or data acquisition devices.

[0074] Step 204: inputting the task data and a document structure diagram of the target document into a task processing model to obtain a task processing result, where the target document includes a plurality of document blocks, the document structure diagram is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure diagram of the target document, and the hierarchical structure diagram is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges.

[0075] It should be noted that the document structure graph (DocGraph) is used to represent the document structure and document content of the target document. The document structure graph captures the relationship between elements in the target document through a graph data structure. The document structure graph is composed of nodes and edges, where the nodes represent different components of the target document (such as paragraphs, sentences, words, etc.), and the edges represent the connection relationship between the nodes. The document structure graph can display the structured information in the target document, helping to better understand the content and organizational structure of the target document. Through the document structure graph, various target tasks can be more easily performed. Document blocks include but are not limited to words, phrases, sentences, paragraphs. The association relationship usually refers to the connection between two or more document blocks. The association relationship includes but is not limited to grammatical relationships (such as subject-predicate relationships), semantic relationships (such as cause-effect relationships), hierarchical relationships (such as chapters containing paragraphs), and entity relationships (such as synonym relationships).

[0076] The task processing model refers to a deep learning model that can process a target task according to given task data and a document structure graph, and generate a corresponding processing result. The task processing model can be a large model, or a model trained based on sample task data, sample document structure, and sample processing results. The task processing result is related to the task type of the target task, if the target task is an abstract extraction task, the task processing result is a document abstract of the target document, if the target task is a document question answering task, the task processing result is a document answer result. A document block refers to a logical unit or component in a target document. The document block includes at least one of text content, image content, and table content. The association relationship between the document blocks refers to the semantic correlation, entity correlation, etc. between the document blocks.

[0077] The hierarchical structure graph of the target document is used to represent the hierarchical structure and document content of the target document, and the hierarchical structure graph can be referred to as a hierarchical structure tree. The hierarchical structure tree refers to a tree-shaped data structure used to describe the internal structure of a document. This structure tree organizes the content of the document in the form of a tree, each node represents a part or element in the document, and the relationship between the nodes reflects the hierarchical relationship between the document content. The hierarchical relationship includes parent-child relationship and sibling relationship. If a parent node has multiple child nodes, and these child nodes only have this parent node, the relationship between the parent node and the child nodes can be referred to as a parent-child relationship. If nodes at the same level have the same parent node, the relationship between nodes at the same level can be referred to as a sibling relationship. The hierarchical structure tree includes a root node, a child node, and a leaf node, and the root node usually represents the target document. The child node is a sub-part of the target document, such as a document block. The leaf node refers to a node without child nodes, which is usually the smallest unit of the target document. For example, in the target document, the root node is the entire target document, the child node is each chapter of the target document, and each chapter has various sections, and so on.

[0078] In actual applications, there are multiple ways to input the task data and the document structure diagram of the target document into the task processing model to obtain the task processing result, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation on this. In the first possible implementation manner of the present disclosure, the task data and the document structure diagram of the target document can be directly input into the task processing model to obtain the task processing result output by the task processing model. In the second possible implementation manner of the present disclosure, the task data, the document structure diagram of the target document and processing prompt information can be input into the task processing model to obtain the task processing result output by the task processing model, where the processing prompt information is used to guide the task processing model to generate the task processing result based on the task processing data and the document structure diagram. In the third possible implementation manner of the present disclosure, the task data and the document structure diagram of the target document can be respectively subjected to feature extraction, and the extracted features can be input into the task processing model to obtain the task processing result.

[0079] By using the scheme of the embodiments of the present disclosure, the target document is represented by using multiple document blocks and the hierarchical relationship between the multiple document blocks, the coarse-grained information inside the target document is mined, and the association relationship between the multiple document blocks is integrated, the fine-grained information such as the text content, the image content and the table content inside the target document is further mined, the target document is represented as a multi-grained document structure diagram, and thus in the task processing process, more accurate and detailed document knowledge can be provided, and the comprehensiveness and accuracy of the task processing result are improved.

[0080] In an optional embodiment of the present disclosure, the above inputting the task data and the document structure diagram of the target document into the task processing model to obtain the task processing result can include the following steps:

[0081] performing feature extraction on the task data to obtain task data features;

[0082] performing feature extraction on the document structure diagram to obtain document structure features;

[0083] inputting the task data features and the document structure features into the task processing model to obtain the task processing result.

[0084] It should be noted that feature extraction refers to a process of selecting and converting a group of features from original data, and these features can effectively represent key information in the original data. The task data features refer to features extracted from the task data that are helpful for completing the target task. The document structure features refer to features extracted from the document structure diagram that are helpful for completing the target task.

[0085] In actual application, there are various manners for extracting features of the task data, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation in this aspect. In a possible implementation manner of the present disclosure, the task data can be input into a Bag of Words (BoW) model to obtain the features of the task data. In another possible implementation manner of the present disclosure, the Term Frequency-Inverse Document Frequency (TF-IDF) can be used to extract features of the task data to obtain the features of the task data.

[0086] Further, there are various manners for extracting features of the document structure graph, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation in this aspect. In a possible implementation manner of the present disclosure, the document structure graph can be input into a Graph Neural Network (GNN) to obtain the features of the document structure. In another possible implementation manner of the present disclosure, the document structure graph can be input into a Long Short-Term Memory (LSTM) to obtain the features of the document structure.

[0087] By applying the scheme of the embodiments of the present disclosure, the features of the task data and the document structure graph are extracted outside the task processing model, so that the input of the task processing model is the features of the task data and the features of the document structure, and the application scope of the task processing model is wider.

[0088] In an optional embodiment of the present disclosure, before the task data and the document structure graph of the target document are input into the task processing model, the document structure graph of the target document can be obtained. There are various manners for obtaining the document structure graph of the target document, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation in this aspect. In a possible implementation manner of the present disclosure, the document structure graph of the target document can be read from other data acquisition devices or databases. In another possible implementation manner of the present disclosure, the hierarchical structure graph of the target document can be obtained, and the document structure graph is constructed based on the hierarchical structure graph. That is, before the task data and the document structure graph of the target document are input into the task processing model to obtain the task processing result, the following steps can be further included:

[0089] obtaining the hierarchical structure graph of the target document;

[0090] inputting the information extraction mode and the hierarchical structure graph of the target document into the information extraction model to obtain an information extraction result;

[0091] determining the association relationship between the multiple document blocks according to the information extraction result;

[0092] According to the association relationship, the edges in the hierarchical structure diagram are updated to obtain a document structure diagram of the target document.

[0093] It should be noted that the information extraction schema of the target document refers to a structured description defining which information is extracted from the target document and how the information should be organized. The information extraction schema usually includes key entities, attributes to be extracted, and the relationship between them. The information extraction model is used to extract information extraction results from the document structure diagram of the target document using the information extraction schema of the target document. The information extraction model can be a pre-trained large model, or a neural network model trained based on a sample information extraction model, a sample hierarchical result diagram and a sample extraction result. The information extraction result can be in text form or table form, which is selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation on this.

[0094] Exemplarily, assuming that the target document is a Dongpo beef cooking teaching document, the information extraction schema is material, method, and chef's tip, the information extraction schema and the hierarchical structure diagram of the target document are input into the information extraction model, and the information extraction result is "material: beef, carrot, white radish, Chinese pricklyash root and bay leaf; method: wash beef and put it into water to cook until it is 70% mature, take it out and cut into cubes...; chef's tip: you can put a few hawthorn into the stewed beef, so that the beef can be cooked faster, and there is a hawthorn fragrance".

[0095] In actual application, when the information extraction schema of the target document and the hierarchical structure diagram are input into the information extraction model, the information extraction schema and the hierarchical structure diagram can be directly input into the information extraction model, or additional extraction prompt information can be added to the input of the information extraction model, that is, the information extraction schema, the hierarchical structure diagram and the extraction prompt information are input into the information extraction model to obtain the information extraction result.

[0096] Further, according to the information extraction result, when determining the association relationship between the plurality of document blocks, first, information extraction results with the same information extraction schema can be determined, and then the document blocks to which these information extraction results belong are determined. Thus, it can be determined that the document blocks to which these information extraction results belong have the same information extraction schema, that is, the document blocks to which these information extraction results belong have an association relationship. For example, the information extraction results beef and white radish have the same information extraction schema, and beef belongs to document block 1 and white radish belongs to document block 3, so it is determined that document block 1 and document block 3 have an association relationship. After determining the association relationship, edges can be added in the document blocks having the association relationship in the hierarchical structure diagram to obtain a document structure diagram of the target document.

[0097] By using the scheme of the embodiment of the present disclosure, information extraction results are extracted from the hierarchical structure graph by using an information extraction mode, and the fine-grained relationship between the plurality of document blocks in the hierarchical structure graph is determined by using the information extraction results, so that the document structure graph can provide more accurate and detailed document knowledge.

[0098] Referring to FIG. 3, FIG. 3 shows a schematic diagram of a document structure graph in a task processing method provided by an embodiment of the present disclosure. As shown in FIG. 3, the document structure graph includes five types of nodes, namely, a document node, a document block node, a table node, an image node, and a text node. The solid single arrow in FIG. 3 represents that there is a hierarchical relationship between the connected nodes, the dotted double arrow represents that there is a semantic relationship between the connected nodes, the solid double arrow represents that there is an entity relationship between the connected nodes, and the long dashed double arrow represents that there is a document relationship between the connected nodes, which means that the two nodes are the same nodes in the document structure graph of different documents.

[0099] In actual applications, there are various ways to obtain the hierarchical structure graph of the target document, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation in this regard. In a possible implementation manner of the present disclosure, the hierarchical structure graph of the target document can be read from other data acquisition devices or databases. In another possible implementation manner of the present disclosure, the hierarchical structure graph of the target document can be constructed based on the plurality of document blocks in the target document and the hierarchical relationship between the plurality of document blocks.

[0100] In an optional embodiment of the present disclosure, the above-mentioned obtaining of the hierarchical structure graph of the target document can include the following steps:

[0101] obtaining the target document, wherein the target document includes a plurality of document blocks, and each document block includes at least one of text content, image content, and table content;

[0102] parsing the plurality of document blocks to determine a hierarchical relationship between the plurality of document blocks;

[0103] constructing a hierarchical structure graph of the target document by taking the plurality of document blocks as nodes and the hierarchical relationship as edges.

[0104] It should be noted that there are various ways to obtain the target document, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation in this regard. In a possible implementation manner of the present disclosure, the target document can be received by a client sent by a user. In another possible implementation manner of the present disclosure, the target document can be read from other data reading devices or databases.

[0105] In actual applications, after obtaining the target document, the text in the target document can be recognized by using OCR and layout recognition technologies, and the title, page number, text, table, picture, etc. corresponding to the text can be recognized to determine the plurality of document blocks in the target document. Then, the hierarchical relationship between the plurality of document blocks can be determined based on the position information (such as indentation, title level, paragraph spacing, etc.) and format information (such as font size, bold, italic, etc.) of the document blocks, or the hierarchical relationship between the plurality of document blocks can be determined by using a layout analysis tool.

[0106] By applying the scheme of the embodiments of the present disclosure, the plurality of document blocks in the target document are taken as nodes, and the hierarchical relationship between the plurality of document blocks is taken as edges to construct a hierarchical structure diagram of the target document, which can intuitively display the relationship between the main part and the subpart of the target document, and help to deeply understand the theme and development context of the target document, thereby providing more accurate document knowledge for the task processing process.

[0107] In an optional embodiment of the present disclosure, before the above step of constructing the hierarchical structure diagram of the target document by taking the plurality of document blocks as nodes and the hierarchical relationship as edges, the following step can be further included:

[0108] obtaining the reading order of the plurality of document blocks;

[0109] constructing the hierarchical structure diagram of the target document by taking the plurality of document blocks as nodes and the hierarchical relationship as edges can include the following steps:

[0110] constructing the hierarchical structure diagram of the target document by taking the plurality of document blocks as nodes and the hierarchical relationship and the reading order as edges.

[0111] It should be noted that the reading order of the plurality of document blocks refers to the way in which a reader browses each part of the document in a certain logical order. The reading order is usually defined according to the structure and content layout of the document to ensure that the information can be correctly understood. The reading order includes but is not limited to the reading order according to the physical position (such as reading from left to right and from top to bottom according to the actual position of the document block on the page), the reading order according to the logical structure (such as reading the title first and then reading the main text / reading the chapter title first and then reading the sub-chapter title).

[0112] In actual applications, there are various ways to obtain the reading order of the plurality of document blocks, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation in this regard. In another possible implementation manner of the present disclosure, the reading order of the plurality of document blocks can be received by the client sent by the user. In another possible implementation manner of the present disclosure, the reading order of the plurality of document blocks can be randomly selected from a plurality of candidate reading orders.

[0113] Further, after obtaining the reading order of the plurality of document blocks, first, an initial hierarchical structure graph of the target document can be constructed with the plurality of document blocks as nodes and the hierarchical relationship as edges, and then edges can be added between the plurality of document blocks in the initial hierarchical structure graph according to the reading order to obtain the hierarchical structure graph of the target document.

[0114] By constructing the hierarchical structure graph of the target document with the plurality of document blocks as nodes and the hierarchical relationship and the reading order as edges, the hierarchical structure graph can not only show the hierarchical relationship between the plurality of document blocks, but also show the reading order, thereby providing more accurate document knowledge for the task processing process.

[0115] Referring to FIG. 4, FIG. 4 shows a schematic diagram of a hierarchical structure graph in a task processing method according to an embodiment of the present disclosure. As shown in FIG. 4, the root node in the hierarchical structure graph represents a target document, and the root node includes two child nodes, i.e., document block 1 and document block 2. The child node document block 1 includes three leaf nodes, i.e., table content, text content, and image content. The document block 1 is a multi-modal document block, and the document block 1 includes four sequentially read text segments. The first text segment includes text content, the second text segment includes text content and image content, the third text segment includes table content, and the fourth text segment includes text content and image content. In the hierarchical structure graph shown in FIG. 4, a solid single arrow represents a hierarchical relationship between document blocks, and a dashed single arrow represents an edge added based on the reading order of the plurality of document blocks.

[0116] In an optional embodiment of the present disclosure, since the target document can include image, table, and other non-text modal content, in order to enable the task processing model to more accurately understand these contents, the summary information and the key information of these contents can be determined, that is, before the information extraction model is input with the information extraction mode and the hierarchical structure graph of the target document to obtain the information extraction result, the following steps can be further included:

[0117] inputting the plurality of document blocks into the information recognition model to obtain the summary information and the key information corresponding to the plurality of document blocks, respectively;

[0118] inputting the information extraction mode and the hierarchical structure graph of the target document into the information extraction model to obtain the information extraction result, including:

[0119] inputting the information extraction mode, the hierarchical structure graph of the target document, and the summary information and the key information corresponding to the plurality of document blocks, respectively, into the information extraction model to obtain the information extraction result.

[0120] It should be noted that the information recognition model is used to identify the summary information and the key information in the document block. The information recognition model can be a pre-trained large model, or a neural network model trained based on sample summary information, sample key information and sample document blocks. The summary information can be referred to as global information of the document block, and the key information can be referred to as local information of the document block. The global information refers to the descriptive summary content of the document block, and the local information refers to the key content in the document block.

[0121] In actual application, when multiple document blocks are input into the information recognition model, each document block can be directly input into the information recognition model to obtain the summary information and the key information of each document block. The identification prompt information can also be added to the input of the information recognition model, that is, each document block and the identification prompt information are input into the information recognition model to obtain the summary information and the key information of each document block. Among them, the identification prompt information is, for example, please identify the summary information and the key information of the document block to obtain the summary information and the key information. For example, please describe the global information and the local information of the document block to obtain the summary information and the key information. The specific selection is based on the actual situation, and the embodiments of the present disclosure do not make any limitation thereto.

[0122] Exemplarily, if the document block includes text content, the pre-trained large model can be used to identify the summary information and the key information of the document block to obtain the summary information and the key information. If the document block includes table content, the pre-trained large model can be used to identify the summary information and the key information of the document block to obtain the summary information and the key information. If the document block includes image content, the multi-modal large model can be used to perform global description and local description on the document block to obtain the summary information and the key information. For example, the summary information of the document block including picture content is “the picture is a scene of a family having a picnic on the lawn”, and the key information is “there are three people in the picture, two adults and one child, the adults wear red clothes, and the child wears green clothes”.

[0123] Further, after obtaining the summary information and the key information corresponding to each document block respectively, the summary information and the key information of each document block can be stored in the form of text on the node corresponding to the document block in the document structure graph, so as to enrich the document knowledge in the document structure graph.

[0124] By applying the scheme of the embodiments of the present disclosure, the information extraction model is input with the information extraction mode of the target document, the hierarchical structure graph, and the summary information and the key information corresponding to the multiple document blocks respectively, to obtain the information extraction result. The image content and the table content in the document block are represented in the form of text in the document structure graph, so as to provide more comprehensive and accurate document knowledge for the task processing process.

[0125] In an optional embodiment of the present disclosure, after obtaining the document structure diagram of the target document, the document structure diagram can be extended by using additional document blocks, that is, after obtaining the document structure diagram of the target document by updating the edges in the hierarchical structure diagram according to the association relationship, the following steps can be further included:

[0126] inputting the extension prompt information and the document structure diagram into the task processing model to obtain the to-be-added document blocks;

[0127] updating the document structure diagram by using the to-be-added document blocks to obtain an updated document structure diagram;

[0128] inputting the task data and the document structure diagram of the target document into the task processing model to obtain a task processing result, which can include the following steps:

[0129] inputting the task data and the updated document structure diagram of the target document into the task processing model to obtain a task processing result.

[0130] It should be noted that the extension prompt information is used to guide the task processing model to generate to-be-added document blocks related to each document block in the document structure diagram. The to-be-added document blocks refer to document blocks related to each document block in the document structure diagram. Here, the related can be an entity relationship, a semantic relationship, a hierarchical relationship, etc. The number of to-be-added document blocks can be one or multiple. For example, the target document is a document about outdoor activities, and the document structure diagram includes the document block "campsite". Inputting the extension prompt information and the document structure diagram into the task processing model to obtain the to-be-added document blocks can be "camping", "tent", and "single tent".

[0131] In actual applications, there are various ways to update the document structure diagram by using the to-be-added document blocks to obtain an updated document structure diagram, which can be selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation in this regard. In a possible implementation manner of the present disclosure, the to-be-added document blocks can be added in the document structure diagram, and edges between the to-be-added document blocks and any document block can be added to obtain an updated document structure diagram. In another possible implementation manner of the present disclosure, a target document block that is very similar to the to-be-added document block can be selected from multiple document blocks in the document structure diagram, the to-be-added document blocks can be added in the document structure diagram, and edges between the to-be-added document blocks and the target document block can be added to obtain an updated document structure diagram.

[0132] According to the scheme of the embodiment of the present disclosure, the extended prompt information and the document structure graph are input into the task processing model to obtain a to-be-added document block; the document structure graph is updated by using the to-be-added document block to obtain an updated document structure graph, so that the updated document structure graph includes more nodes, and the updated document structure graph can provide more accurate and detailed document knowledge, and the comprehensiveness and accuracy of the task processing result are improved.

[0133] In an optional embodiment of the present disclosure, the above updating the document structure graph by using the to-be-added document block to obtain an updated document structure graph can include the following steps:

[0134] calculating a similarity index between the to-be-added document block and the information extraction result;

[0135] According to the similarity index, a target document block is selected from the plurality of document blocks;

[0136] In the document structure graph, the to-be-added document block is added, and an edge is added between the to-be-added document block and the target document block to obtain an updated document structure graph.

[0137] It should be noted that the similarity index is used to describe the similarity between the to-be-added document block and the information extraction result. The similarity index can be a similarity degree (such as 0.8), or a similarity level (such as very similar, similar, and dissimilar). The target document block refers to a document block corresponding to at least one information extraction result with a similarity index greater than a preset threshold in the document structure graph, wherein the preset threshold is 0.7, and is set according to actual conditions. The target document block can also be understood as at least one document block in the document structure graph with a greater similarity index with the to-be-added document block.

[0138] In actual application, there are various ways to calculate the similarity index between the to-be-added document block and the information extraction result, which are selected according to actual conditions, and the embodiments of the present disclosure do not make any limitation. In a possible implementation manner of the present disclosure, a similarity algorithm (such as cosine similarity, Euclidean distance, etc.) can be used to calculate the similarity index between the to-be-added document block and the information extraction result. In another possible implementation manner of the present disclosure, the to-be-added document block can be first feature extracted to obtain to-be-added features, the information extraction result can be feature extracted to obtain information extraction features, and a similarity algorithm can be used to calculate the similarity index between the to-be-added features and the information extraction features. The similarity index is determined as the similarity index between the to-be-added document block and the information extraction result. Further, after obtaining the similarity index between the to-be-added document block and the information extraction result, at least one information extraction result with a greater similarity index can be determined first, and a document block corresponding to the at least one information extraction result is determined as the target document block.

[0139] According to the scheme of the embodiment of the present disclosure, in the document structure diagram, the to-be-added document block related to each document block in the document structure diagram is added, and an edge is added between the to-be-added document block and the target document block, an updated document structure diagram is obtained, so that the structural relationship in the updated document structure diagram is more accurate, and the comprehensiveness and accuracy of the task processing result are further improved.

[0140] In an optional embodiment of the present disclosure, after the edge in the hierarchical structure diagram is updated according to the association relationship to obtain the document structure diagram of the target document, the following steps can be further included:

[0141] Obtain a reference structure diagram, wherein the reference structure diagram has at least one same node as the document structure diagram;

[0142] Merge the document structure diagram and the reference structure diagram according to the at least one same node to obtain a merged document structure diagram;

[0143] Input the task data and the document structure diagram of the target document into a task processing model to obtain a task processing result, which can include the following steps:

[0144] Input the task data and the merged document structure diagram of the target document into the task processing model to obtain the task processing result.

[0145] It should be noted that the reference structure diagram refers to a structure diagram having at least one same node as the document structure diagram. Since the reference structure diagram has at least one same node as the document structure diagram, the reference document corresponding to the reference structure diagram is related to the document structure diagram.

[0146] In actual application, there are various ways to obtain the reference structure diagram, which can be selected according to actual conditions, and the embodiment of the present disclosure does not make any limitation on this. In a possible implementation manner of the present disclosure, the reference structure diagram sent by the user through the client can be received. In another possible implementation manner of the present disclosure, the reference structure diagram can be read from other data acquisition devices or databases.

[0147] Further, when merging the document structure diagram and the reference structure diagram according to the at least one same node, the same nodes in the document structure diagram and the reference structure diagram can be superimposed, that is, the merged document structure diagram can be obtained. A new diagram can also be created, and each node and edge in the document structure diagram and the reference structure diagram is copied to the new diagram. During the copying process, it is ensured that the at least one same node is not repeatedly added, the merged document structure diagram is checked to ensure that all edges are correctly connected to the corresponding nodes and no information is missed. Then the task data and the merged document structure diagram of the target document are input into the task processing model to obtain the task processing result.

[0148] By applying the scheme of the embodiment of the disclosure, the reference structure graph and the document structure graph are merged by merging the document structure graph and the reference structure graph according to the nodes in the reference structure graph that are the same as the nodes in the document structure graph, so that the merging of the reference structure graph and the document structure graph is realized, the document knowledge in the document structure graph is expanded, the merged document structure graph can provide more accurate and detailed document knowledge, and the comprehensiveness and accuracy of the task processing result are improved.

[0149] The task processing method provided by the disclosure is further described below by taking the application of the task processing method in the intelligent dialogue scenario as an example with reference to FIG. 5. FIG. 5 is a flowchart of a document dialogue method according to an embodiment of the disclosure, which includes the following steps:

[0150] In step 502, dialogue data for a target document sent by a client is received.

[0151] In step 504, the dialogue data and a document structure graph of the target document are input into a task processing model to obtain a dialogue processing result, where the target document includes multiple document blocks, the document structure graph is constructed based on an association relationship between the multiple document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the multiple document blocks as nodes and a hierarchical relationship between the multiple document blocks as edges.

[0152] In step 506, the dialogue processing result is sent to the client.

[0153] It should be noted that the implementation of steps 502 to 504 can refer to the implementation of the task processing method described above, and the embodiment of the disclosure will not be described again. The dialogue data can be a simple dialogue question, such as "What is the highest temperature in 2023?", or a comprehensive question, such as "What equipment is needed for camping", and the like summary and summary questions. The specific selection is based on the actual situation, and the embodiment of the disclosure does not make any limitation.

[0154] By applying the scheme of the embodiment of the disclosure, the target document is represented by using the multiple document blocks and the hierarchical relationship between the multiple document blocks, the coarse-grained information inside the target document is mined, the association relationship between the multiple document blocks is integrated, the fine-grained information inside the target document is further mined, and the target document is represented as a multi-granularity document structure graph, so that more accurate and detailed document knowledge can be provided during the document dialogue process, and the comprehensiveness and accuracy of the dialogue processing result are improved.

[0155] By using the scheme of the embodiment of the present disclosure, the target document is represented by using the multiple document blocks and the hierarchical relationship between the multiple document blocks, the coarse-grained information inside the target document is mined, the association relationship between the multiple document blocks is integrated, the fine-grained information inside the target document is further mined, and the target document is represented as a multi-granularity document structure graph, so that more accurate and detailed document knowledge can be provided in the document dialogue process, and the comprehensiveness and accuracy of the dialogue processing result are improved.

[0156] Referring to FIG. 6, FIG. 6 shows a flowchart of a document processing method provided by an embodiment of the present disclosure, which specifically includes the following steps:

[0157] In step 602, a hierarchical structure graph of a target document is acquired, where the target document includes multiple document blocks, and the hierarchical structure graph is constructed by taking the multiple document blocks as nodes and the hierarchical relationship between the multiple document blocks as edges.

[0158] In step 604, an information extraction mode for the target document and the hierarchical structure graph are input into a task processing model to obtain an information extraction result.

[0159] In step 606, an association relationship between the multiple document blocks is determined according to the information extraction result.

[0160] In step 608, an edge in the hierarchical structure graph is updated according to the association relationship to obtain a document structure graph of the target document.

[0161] It should be noted that the implementation manners of steps 602 to 608 can refer to the implementation manners of the above task processing method, and the embodiment of the present disclosure will not be described in detail.

[0162] By using the scheme of the embodiment of the present disclosure, the target document is represented by using the multiple document blocks and the hierarchical relationship between the multiple document blocks, the coarse-grained information inside the target document is mined, the association relationship between the multiple document blocks is integrated, the fine-grained information inside the target document is further mined, and the target document is represented as a multi-granularity document structure graph, so that more accurate and detailed document knowledge can be provided in the task processing process.

[0163] In an optional embodiment of the present specification, after the above step of updating the edge in the hierarchical structure graph according to the association relationship to obtain the document structure graph of the target document, the following step can be further included:

[0164] Receiving document retrieval data sent by a client;

[0165] Performing content retrieval on the document structure graph according to the document retrieval data to obtain a retrieval result corresponding to the document retrieval data;

[0166] Sending the retrieval result to the client.

[0167] It should be noted that the document retrieval data is used to retrieve the document content corresponding to the client demand from the target document. The document retrieval data includes but is not limited to query words and query parameters. The query words are used to describe the information that the client wants to find, for example, "how much is the price of a shirt". The query parameters such as sorting mode, number limit of returned results, etc. are selected according to actual conditions, and the embodiments of the present specification do not make any limitation on this. The retrieval result refers to the relevant document or document fragment found from the target document according to the document retrieval data, for example, "the price of a shirt is 99 yuan".

[0168] In actual application, there are various ways to retrieve the content of the document structure graph according to the document retrieval data to obtain the retrieval result corresponding to the document retrieval data, which are selected according to actual conditions, and the embodiments of the present specification do not make any limitation on this. In a possible implementation manner of the present specification, the keywords in the document retrieval data can be matched with each node in the document structure graph, and the node with higher matching degree is determined as the retrieval result corresponding to the document retrieval data. In another possible implementation manner of the present specification, the document search engine can be used to retrieve the content of the document structure graph according to the document retrieval data to obtain the retrieval result corresponding to the document retrieval data.

[0169] By representing the target document as a multi-granularity document structure graph, the method of the embodiments of the present specification can obtain more accurate and detailed retrieval results by retrieving the content of the document structure graph according to the document retrieval data.

[0170] Referring to FIG. 7, FIG. 7 shows a processing process flowchart of a document processing method provided by an embodiment of the present disclosure. As shown in FIG. 7, the document processing process can be divided into six stages: target document analysis, hierarchical structure graph construction, abstract information and key information identification, information extraction, document structure graph construction, and document structure graph updating. Next, the six nodes will be described in detail.

[0171] Target document analysis: analyzing the target document, extracting the text information inside through the layout recognition technology such as PDF-Parser or OCR, and dividing the document into multiple document blocks according to the text information;

[0172] Hierarchical structure graph construction: analyzing the multiple document blocks to determine the hierarchical relationship between the multiple document blocks; taking the multiple document blocks as nodes and the hierarchical relationship as edges to construct the hierarchical structure graph of the target document;

[0173] Abstract information and key information identification: input multiple document blocks in the hierarchical graph of the target document into an information identification model to obtain abstract information and key information corresponding to the multiple document blocks respectively; and store the abstract information and key information corresponding to the multiple document blocks respectively in multiple nodes of the hierarchical graph.

[0174] Information extraction: input an information extraction mode for the target document and the hierarchical graph in which the abstract information and the key information corresponding to the multiple document blocks are stored into an information extraction model to obtain an information extraction result.

[0175] Document structure graph construction: determine an association relationship between the multiple document blocks in the hierarchical graph according to the information extraction result; and update edges in the hierarchical graph according to the association relationship to obtain a document structure graph of the target document.

[0176] Document structure graph updating: input the extension prompt information and the document structure graph into a task processing model to obtain a to-be-added document block; calculate a similarity index between the to-be-added document block and the information extraction result; select a target document block from the multiple document blocks according to the similarity index; add the to-be-added document block to the document structure graph of the target document and add an edge between the to-be-added document block and the target document block to obtain an updated document structure graph.

[0177] Corresponding to the task processing method embodiments described above, the present disclosure also provides task processing device embodiments. FIG. 8 shows a structural schematic diagram of a task processing device according to an embodiment of the present disclosure. As shown in FIG. 8, the device includes:

[0178] A first obtaining module 802 configured to obtain task data for a target document and a document structure graph of the target document.

[0179] A first input module 804 configured to input the task data and the document structure graph of the target document into a task processing model to obtain a task processing result, wherein the target document includes multiple document blocks, the document structure graph is constructed based on an association relationship between the multiple document blocks and a hierarchical graph of the target document, and the hierarchical graph is constructed based on the multiple document blocks as nodes and a hierarchical relationship between the multiple document blocks as edges.

[0180] Optionally, the device further includes a third obtaining module configured to obtain a hierarchical graph of the target document; input an information extraction mode for the target document and the hierarchical graph into an information extraction model to obtain an information extraction result; determine an association relationship between the multiple document blocks according to the information extraction result; and update edges in the hierarchical graph according to the association relationship to obtain the document structure graph of the target document.

[0181] Optionally, the apparatus further comprises a fourth input module configured to input the extended prompt information and the document structure graph into the task processing model to obtain a to-be-added document block; update the document structure graph by using the to-be-added document block to obtain an updated document structure graph; and the first input module 804 is further configured to input the task data and the updated document structure graph of the target document into the task processing model to obtain a task processing result.

[0182] Optionally, the fourth input module is further configured to calculate a similarity index between the to-be-added document block and the information extraction result; select a target document block from the plurality of document blocks according to the similarity index; add the to-be-added document block in the document structure graph, and add an edge between the to-be-added document block and the target document block to obtain the updated document structure graph.

[0183] Optionally, the apparatus further comprises a fifth input module configured to input the plurality of document blocks into an information recognition model to obtain a plurality of document blocks respectively corresponding to abstract information and key information; and the third acquisition module is further configured to input the information extraction mode for the target document, the hierarchical structure graph, and the plurality of document blocks respectively corresponding to the abstract information and the key information into an information extraction model to obtain an information extraction result.

[0184] Optionally, the third acquisition module is further configured to acquire the target document, wherein the target document comprises a plurality of document blocks, and the document block comprises at least one of text content, image content, and table content; parse the plurality of document blocks to determine a hierarchical relationship between the plurality of document blocks; and construct a hierarchical structure graph of the target document by taking the plurality of document blocks as nodes and the hierarchical relationship as edges.

[0185] Optionally, the apparatus further comprises a fourth acquisition module configured to acquire a reading order of the plurality of document blocks; and the third acquisition module is further configured to construct a hierarchical structure graph of the target document by taking the plurality of document blocks as nodes and the hierarchical relationship and the reading order as edges.

[0186] Optionally, the apparatus further comprises a fifth acquisition module configured to acquire a reference structure graph, wherein the reference structure graph has at least one same node as the document structure graph; merge the document structure graph and the reference structure graph according to the at least one same node to obtain a merged document structure graph; and the first input module 804 is further configured to input the task data and the merged document structure graph of the target document into the task processing model to obtain a task processing result.

[0187] Optionally, the first input module 804 is further configured to perform feature extraction on the task data to obtain task data features; perform feature extraction on the document structure graph to obtain document structure features; and input the task data features and the document structure features into the task processing model to obtain a task processing result.

[0188] According to the scheme of the embodiment of the present disclosure, the first input model capable of processing the task data by using the document structure graph is included in the task processing device, the document structure graph can represent the target document in multiple granularities, the task processing device can be further provided with more accurate and detailed document knowledge, and the comprehensiveness and accuracy of the task processing performed by the task processing device are improved.

[0189] The above is a schematic scheme of the task processing device of the embodiment. It should be noted that the technical scheme of the task processing device belongs to the same concept as the technical scheme of the task processing method described above, and the details of the technical scheme of the task processing device that are not described in detail can be referred to the description of the technical scheme of the task processing method.

[0190] Corresponding to the document dialogue method embodiment described above, the present disclosure also provides a document dialogue device embodiment. FIG. 9 shows a structural schematic diagram of a document dialogue device according to an embodiment of the present disclosure. As shown in FIG. 9, the device includes:

[0191] The receiving module 902 is configured to receive dialogue data for a target document sent by a client;

[0192] The second input module 904 is configured to input the dialogue data and the document structure graph of the target document into a task processing model to obtain a dialogue processing result, wherein the target document includes a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges;

[0193] The sending module 906 is configured to send the dialogue processing result to the client.

[0194] According to the scheme of the embodiment of the present disclosure, the second input model capable of processing the dialogue data by using the document structure graph is included in the document dialogue device, the document structure graph can represent the target document in multiple granularities, the document dialogue device can be further provided with more accurate and detailed document knowledge, and the comprehensiveness and accuracy of the dialogue processing performed by the document dialogue device are improved.

[0195] The above is a schematic scheme of the document dialogue device of the embodiment. It should be noted that the technical scheme of the document dialogue device belongs to the same concept as the technical scheme of the document dialogue method described above, and the details of the technical scheme of the document dialogue device that are not described in detail can be referred to the description of the technical scheme of the document dialogue method.

[0196] Corresponding to the above document processing method embodiments, the present disclosure also provides document processing device embodiments. FIG. 10 shows a structural schematic diagram of a document processing device according to an embodiment of the present disclosure. As shown in FIG. 10, the device includes:

[0197] The second obtaining module 1002 is configured to obtain a hierarchical graph of the target document, where the target document includes a plurality of document blocks, and the hierarchical graph is constructed with the plurality of document blocks as nodes and hierarchical relationships between the plurality of document blocks as edges;

[0198] The third input module 1004 is configured to input the information extraction mode for the target document and the hierarchical graph into a task processing model to obtain an information extraction result;

[0199] The determining module 1006 is configured to determine an association relationship between the plurality of document blocks according to the information extraction result;

[0200] The updating module 1008 is configured to update the edges in the hierarchical graph according to the association relationship to obtain a document structure graph of the target document.

[0201] Optionally, the device further includes a retrieval module configured to receive document retrieval data sent by a client, perform content retrieval on the document structure graph according to the document retrieval data to obtain a retrieval result corresponding to the document retrieval data, and send the retrieval result to the client.

[0202] By using the scheme of the present embodiment, the document processing device represents the target document by using the plurality of document blocks and the hierarchical relationships between the plurality of document blocks, mines coarse-grained information inside the target document, and further mines fine-grained information inside the target document by incorporating the association relationship between the plurality of document blocks, so as to represent the target document as a multi-grained document structure graph, thereby providing more accurate and detailed document knowledge in the task processing process.

[0203] The above is a schematic scheme of a document processing device according to the present embodiment. It should be noted that the technical scheme of the document processing device belongs to the same concept as the technical scheme of the above document processing method, and the details of the technical scheme of the document processing device that are not described in detail can be referred to the description of the technical scheme of the above document processing method.

[0204] Referring to FIG. 11, FIG. 11 shows a structural schematic diagram of a task platform according to an embodiment of the present disclosure. The task platform includes a request interface 1102 and a response unit 1104.

[0205] The request interface 1102 is configured to receive a dialogue processing request sent by a client, where the dialogue processing request carries dialogue data for a target document.

[0206] The response unit 1104 is configured to input the dialogue data and a document structure diagram of the target document into the task processing model to obtain a dialogue processing result, where the target document includes a plurality of document blocks, the document structure diagram is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure diagram of the target document, and the hierarchical structure diagram is constructed by taking the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges.

[0207] In an optional embodiment of the present specification, the task platform further includes a document processing interface.

[0208] The document processing interface is configured to obtain a hierarchical structure diagram of a target document, where the target document includes a plurality of document blocks, the hierarchical structure diagram is constructed by taking the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges; input an information extraction mode for the target document and the hierarchical structure diagram into the task processing model to obtain an information extraction result; determine an association relationship between the plurality of document blocks according to the information extraction result; and update edges in the hierarchical structure diagram according to the association relationship to obtain a document structure diagram of the target document.

[0209] By using the scheme of the embodiments of the present specification, the task platform represents the target document as a multi-granularity document structure diagram, provides more accurate and detailed document knowledge, and thus adapts to user requests to process dialogue tasks, obtains more accurate and detailed dialogue processing results, and realizes personalized dialogue services, thereby providing a user with an efficient, flexible and easy-to-use document service platform and improving user experience.

[0210] The above is a schematic scheme of a task platform of the present embodiment. It should be noted that the technical scheme of the task platform belongs to the same concept as the technical schemes of the document dialogue method and the document processing method described above, and the details of the technical scheme of the task platform that are not described in detail can be seen from the description of the technical schemes of the document dialogue method and the document processing method.

[0211] FIG. 12 shows a structural block diagram of a computing device according to an embodiment of the present disclosure. The components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 through a bus 1230, and a database 1250 is used to save data.

[0212] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 1240 can include one or more of any type of network interface (for example, a network interface card (NIC)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Global System for Mobile (GSM) interface, a Code Division Multiple Access (CDMA) interface, a Bluetooth interface, a Near Field Communication (NFC) interface, a Universal Serial Bus (USB) interface, a Wi-Fi® interface, a Wi-MAX interface, an Ethernet interface, a token ring interface, a serial bus interface, or the like.

[0213] In one embodiment of the present disclosure, the above-mentioned components of the computing device 1200 and other components not shown in FIG. 12 can also be connected to each other, for example, through a bus. It should be understood that the computing device structure block diagram shown in FIG. 12 is only for the purpose of example, and is not a limitation on the scope of the present disclosure. Those skilled in the art can add or replace other components as needed.

[0214] The computing device 1200 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, and the like), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, and the like), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1200 can also be a mobile or stationary server.

[0215] The processor 1220 is configured to execute computer program / instructions that implement the steps of the above-mentioned task processing method or the document dialogue method or the document processing method when the computer program / instructions are executed by the processor.

[0216] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device and the technical schemes of the task processing method, the document conversation method, and the document processing method described above belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the task processing method or the document conversation method or the document processing method.

[0217] An embodiment of the present disclosure further provides a computer readable storage medium storing computer programs / instructions, which, when executed by a processor, implement the steps of the task processing method or the document conversation method or the document processing method.

[0218] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium and the technical schemes of the task processing method, the document conversation method, and the document processing method described above belong to the same concept, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the task processing method or the document conversation method or the document processing method.

[0219] An embodiment of the present disclosure further provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the task processing method or the document conversation method or the document processing method.

[0220] The above is a schematic scheme of the computer program product of the embodiment. It should be noted that the technical scheme of the computer program product and the technical schemes of the task processing method, the document conversation method, and the document processing method described above belong to the same concept, and the details of the technical scheme of the computer program product that are not described in detail can be referred to the description of the technical scheme of the task processing method or the document conversation method or the document processing method.

[0221] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0222] The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium can include appropriate additions or subtractions according to the requirements of patent practice. For example, according to the patent practice in some regions, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0223] It should be noted that, for the foregoing method embodiments, in order to facilitate description, each is described as a combination of a series of acts, but those skilled in the art should appreciate that the embodiments of the present disclosure are not limited by the order of the described acts, because, according to the embodiments of the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should appreciate that the embodiments described in the specification are all preferred embodiments, and the acts and modules involved are not necessarily essential to the embodiments of the present disclosure.

[0224] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0225] The preferred embodiments of the present disclosure disclosed above are only used to help explain the present disclosure. The alternative embodiments do not describe all the details and do not limit the invention to the specific embodiments described. Obviously, according to the content of the embodiments of the present disclosure, many modifications and changes can be made. The present disclosure selects and describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present disclosure, so that those skilled in the art can well understand and utilize the present disclosure. The present disclosure is limited only by the claims and their full scope and equivalents.

Claims

1. A task processing method, comprising: obtaining task data for a target document and a document structure graph of the target document; inputting the task data and the document structure graph of the target document into a task processing model to obtain a task processing result, wherein the target document comprises a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges.

2. The method of claim 1, before the inputting the task data and the document structure graph of the target document into a task processing model to obtain a task processing result, further comprising: obtaining a hierarchical structure graph of the target document; inputting an information extraction mode for the target document and the hierarchical structure graph into an information extraction model to obtain an information extraction result; determining an association relationship between the plurality of document blocks according to the information extraction result; updating edges in the hierarchical structure graph according to the association relationship to obtain the document structure graph of the target document.

3. The method of claim 2, wherein the determining an association relationship between the plurality of document blocks according to the information extraction result comprises: determining information extraction results of the same information extraction mode; determining that document blocks to which the information extraction results of the same information extraction mode belong have an association relationship.

4. The method of claim 2, after the updating edges in the hierarchical structure graph according to the association relationship to obtain the document structure graph of the target document, further comprising: inputting extension prompt information and the document structure graph into a task processing model to obtain a to-be-added document block; updating the document structure graph by using the to-be-added document block to obtain an updated document structure graph; the inputting the task data and the document structure graph of the target document into a task processing model to obtain a task processing result comprises: inputting the task data and the updated document structure graph of the target document into a task processing model to obtain a task processing result.

5. The method of claim 4, wherein the updating the document structure graph by using the to-be-added document block to obtain an updated document structure graph comprises: calculating a similarity index between the to-be-added document block and the information extraction result; selecting a target document block from the plurality of document blocks according to the similarity index; adding the to-be-added document block in the document structure graph and adding an edge between the to-be-added document block and the target document block to obtain the updated document structure graph.

6. The method of any one of claims 2 to 5, before the inputting an information extraction mode for the target document and the hierarchical structure graph into an information extraction model to obtain an information extraction result, further comprising: inputting the plurality of document blocks into an information recognition model to obtain abstract information and key information corresponding to the plurality of document blocks, respectively. The information extraction model is inputted with the information extraction mode for the target document and the hierarchical structure diagram to obtain an information extraction result. The information extraction model is inputted with the information extraction mode for the target document, the hierarchical structure diagram, and the summary information and the key information corresponding to the plurality of document blocks to obtain an information extraction result.

7. The method of claim 6, after the obtaining of the summary information and the key information corresponding to each document block, further comprising: storing the summary information and the key information of each document block in the form of text on the node corresponding to the document block in the document structure diagram.

8. The method of any one of claims 2 to 7, the obtaining of the hierarchical structure diagram of the target document comprising: obtaining the target document, wherein the target document comprises a plurality of document blocks, and the document blocks comprise at least one of text content, image content, and table content; parsing the plurality of document blocks to determine a hierarchical relationship between the plurality of document blocks; constructing the hierarchical structure diagram of the target document with the plurality of document blocks as nodes and the hierarchical relationship as edges.

9. The method of claim 8, before the constructing of the hierarchical structure diagram of the target document with the plurality of document blocks as nodes and the hierarchical relationship as edges, further comprising: obtaining a reading order of the plurality of document blocks; the constructing of the hierarchical structure diagram of the target document with the plurality of document blocks as nodes and the hierarchical relationship as edges comprising: constructing the hierarchical structure diagram of the target document with the plurality of document blocks as nodes, the hierarchical relationship, and the reading order as edges.

10. The method of claim 9, after the obtaining of the reading order of the plurality of document blocks, further comprising: constructing an initial hierarchical structure diagram of the target document with the plurality of document blocks as nodes and the hierarchical relationship as edges; adding edges between the plurality of document blocks in the initial hierarchical structure diagram according to the reading order to obtain the hierarchical structure diagram of the target document.

11. The method of claim 2 or any one of claims 6 to 9, after the updating of the edges in the hierarchical structure diagram according to the association relationship to obtain the document structure diagram of the target document, further comprising: obtaining a reference structure diagram, wherein the reference structure diagram has at least one same node as the document structure diagram; merging the document structure diagram and the reference structure diagram according to the at least one same node to obtain a merged document structure diagram; the inputting of the task data and the document structure diagram of the target document into the task processing model to obtain a task processing result comprising: inputting the task data and the merged document structure diagram of the target document into the task processing model to obtain a task processing result.

12. The method of any one of claims 1 to 11, the inputting of the task data and the document structure diagram of the target document into the task processing model to obtain a task processing result comprising: performing feature extraction on the task data to obtain task data features; performing feature extraction on the document structure diagram to obtain document structure features; input the task data features and the document structure features into a task processing model to obtain a task processing result.

13. A document conversation method, comprising: receiving conversation data for a target document sent by a client; inputting the conversation data and a document structure graph of the target document into a task processing model to obtain a conversation processing result, wherein the target document comprises a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges; sending the conversation processing result to the client.

14. A document processing method, comprising: obtaining a hierarchical structure graph of a target document, wherein the target document comprises a plurality of document blocks, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges; inputting an information extraction mode for the target document and the hierarchical structure graph into a task processing model to obtain an information extraction result; determining an association relationship between the plurality of document blocks according to the information extraction result; updating edges in the hierarchical structure graph according to the association relationship to obtain a document structure graph of the target document.

15. The method of claim 14, after the step of updating edges in the hierarchical structure graph according to the association relationship to obtain a document structure graph of the target document, further comprising: receiving document retrieval data sent by a client; performing content retrieval on the document structure graph according to the document retrieval data to obtain a retrieval result corresponding to the document retrieval data; sending the retrieval result to the client.

16. A task platform, comprising a request interface and a response unit; the request interface is configured to receive a conversation processing request sent by a client, wherein the conversation processing request carries conversation data for a target document; the response unit is configured to input the conversation data and a document structure graph of the target document into a task processing model to obtain a conversation processing result, wherein the target document comprises a plurality of document blocks, the document structure graph is constructed based on an association relationship between the plurality of document blocks and a hierarchical structure graph of the target document, and the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges.

17. The task platform of claim 16, further comprising a document processing interface; The document processing interface is configured to obtain a hierarchical structure diagram of the target document, wherein, the target document comprises a plurality of document blocks, the hierarchical structure graph is constructed with the plurality of document blocks as nodes and a hierarchical relationship between the plurality of document blocks as edges; an information extraction mode for the target document and the hierarchical structure graph are inputted into a task processing model to obtain an information extraction result; an association relationship between the plurality of document blocks is determined according to the information extraction result; and edges in the hierarchical structure graph are updated according to the association relationship to obtain a document structure graph of the target document.

18. A computing device, comprising: a memory and a processor; The memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 12 or claim 13 or any one of claims 14 to 15. 19.A computer readable storage medium storing computer programs / instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 12 or claim 13 or any one of claims 14 to 15. 20.A computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 12 or claim 13 or any one of claims 14 to 15.

Citation Information

Patent Citations

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

    CN115587175A

  • Document-based question generation method and device and server

    CN115688792A

  • Answer text generation method and device, electronic equipment and computer medium

    CN118193690A

  • Task processing method, document dialogue method and document processing method

    CN118797019A

  • Information extraction from document corpora

    US20230132061A1