Data processing method and device, electronic equipment and storage medium

By obtaining the data structure of multi-level nodes and using large models to process multi-source data, it solves the problems of low efficiency and insufficient intelligence of traditional systems in multi-source data processing, and achieves efficient document core content extraction and cross-format processing.

CN118733613AActive Publication Date: 2024-10-01BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411001729.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-01
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

Traditional document query systems are inefficient when processing multi-source data, lack intelligence and automation, are difficult to quickly and accurately obtain the core content of documents, and have limited cross-format processing capabilities.

Method used

Provide a data processing method that achieves automated and intelligent multi-source data integration and summary by obtaining the data structure of multi-level nodes and using large models to generate output data based on query text and target text.

Benefits of technology

It improves the efficiency and accuracy of multi-source data processing, supports cross-format processing of multi-source data, and generates more accurate and valuable summary and question and answer results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733613A_ABST
    Figure CN118733613A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method, and relates to the technical field of artificial intelligence, in particular to the technical field of large models, deep learning, natural language processing and computer vision. According to the specific implementation scheme, in response to a received query text for input data, a data structure of the input data is obtained, the data structure comprises nodes of multiple hierarchies, and each node comprises the content of the input data; obtaining a target text contained in the node of which the content is the text from the data structure; and determining output data based on the query text and the target text. The invention further provides a data processing device, electronic equipment and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of large models, deep learning, natural language processing, and computer vision technology. More specifically, the present disclosure provides a data processing method, device, electronic device, storage medium, and computer program product. Background Art

[0002] With the rapid development of information technology, users' demands for document resources in the fields of office, education, etc. are becoming increasingly diversified. Especially in terms of rapid extraction and integration of multi-source information, traditional document query and reading methods can no longer meet users' needs for rapid acquisition of document core content and personalized information integration. Summary of the invention

[0003] The present disclosure provides a data processing method, apparatus, electronic device, storage medium, and computer program product.

[0004] According to a first aspect, a data processing method is provided, the method comprising: in response to receiving a query text for input data, obtaining a data structure of the input data, wherein the data structure comprises nodes of multiple levels, each node containing the content of the input data; obtaining a target text contained in a node whose content is text from the data structure; and determining output data based on the query text and the target text.

[0005] According to a second aspect, a data processing device is provided, which includes: a data structure acquisition module, used to acquire a data structure of input data in response to receiving a query text for the input data, wherein the data structure includes nodes of multiple levels, and each node contains the content of the input data; a target text determination module, used to acquire a target text contained in a node whose content is text from the data structure; and an output data determination module, used to determine output data based on the query text and the target text.

[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.

[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided according to the present disclosure.

[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and wherein the computer program implements the method provided according to the present disclosure when executed by a processor.

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

[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0011] Figure 1 is a schematic diagram of an exemplary system architecture to which a data processing method and apparatus can be applied according to an embodiment of the present disclosure;

[0012] Figure 2 is a flow chart of a data processing method according to an embodiment of the present disclosure;

[0013] Figure 3 is a flow chart of a data processing method according to another embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram of a data processing system according to an embodiment of the present disclosure;

[0015] Figure 5 is a flow chart of a data processing method according to another embodiment of the present disclosure;

[0016] Figure 6 is a block diagram of a data processing device according to an embodiment of the present disclosure;

[0017] Figure 7 is a block diagram of an electronic device according to a data processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

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

[0019] Traditional document query systems mainly rely on keyword searches and manual reading, and have limited capabilities for integrating and summarizing multi-source data, making it difficult to meet users' expectations for quickly and accurately obtaining the core content of documents.

[0020] Multi-source data refers to data from different sources and of different types, such as documents, images, web pages, etc. At present, different processing methods are often used for multi-source data. For example, the processing of documents usually relies on text editing software, such as Microsoft Word, Adobe PDF, etc. The processing of images usually relies on image recognition technology in the field of computer vision, such as extracting image information through OCR (Optical Character Recognition) technology. For web page data, web crawler technology is often used to capture web page information.

[0021] Although relevant technologies have made significant progress in document processing, web data crawling, image recognition, etc., there are still some obvious deficiencies in processing multi-source data, including the following aspects.

[0022] Limitations of single technology: Currently, these technologies such as document processing, web data crawling, and image recognition are all developed independently, lacking unified integration and coordination. This results in the need to use different tools or technologies separately when processing multi-source data, which is inefficient and prone to errors.

[0023] Lack of intelligence and automation: Currently, when processing multi-source data, human participation and intervention are often required, and there is a lack of intelligence and automation capabilities. For example, in document processing, manual reading and extraction of key information are required; in web data crawling, crawler programs need to be manually written and anti-crawler mechanisms need to be dealt with; in image recognition and understanding, training data needs to be manually annotated, etc. These manual operations are not only time-consuming and labor-intensive, but also prone to subjectivity and errors.

[0024] Inefficient processing: When processing multi-source data, there is a lack of efficient data processing algorithms and models, making it impossible to quickly and accurately extract and analyze key information in the data.

[0025] Limited cross-format processing capabilities: When processing multi-source data, there is often limited support for different types of files or data formats. For example, some document processing tools may only support document files in a specific format; some web crawlers may not be able to crawl data from certain websites; some image recognition systems may not be able to recognize certain types of images, etc. This limits the breadth and applicability of these technologies in practical applications.

[0026] In view of this, an embodiment of the present disclosure provides a data processing method, in response to receiving a query text for input data, obtaining a data structure of the input data, wherein the data structure includes nodes of multiple levels, each node containing the content of the input data; obtaining a target text contained in a node whose content is text from the data structure; and determining output data based on the query text and the target text. The data processing method provided by the embodiment of the present disclosure can automatically and intelligently process files, and improve processing efficiency and accuracy. In the case where the input data is multi-source data, the multi-source data can be integrated, and summaries and question-and-answers can be performed based on the multi-source data, so that the multi-source data can be processed more efficiently, and more accurate and valuable summaries and question-and-answer results can be generated.

[0027] The data processing method and device provided by the present disclosure are described in detail below.

[0028] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0029] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0030] Figure 1 is a schematic diagram of an exemplary system architecture to which a data processing method and apparatus can be applied according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0031] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0032] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices, including but not limited to smart phones, tablet computers, laptops, etc.

[0033] The data processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the data processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The data processing method provided in the embodiment of the present disclosure can also be executed by a server or a server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the data processing device provided in the embodiment of the present disclosure can also be set in a server or a server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0034] Figure 2 is a flow chart of a data processing method according to an embodiment of the present disclosure.

[0035] like Figure 2 As shown, the data processing method 200 includes operations S210 to S230.

[0036] In operation S210 , in response to receiving a query text for input data, a data structure of the input data is acquired.

[0037] The input data may be a file uploaded by a user, for example, at least one of a document, an image, and a web page. The document may include WORD, PDF, PPT, EXCEL, etc. The image may include a conventional image and a photocopy image, and the photocopy image may include, for example, a scanned PDF, etc.

[0038] The query text may be a question input by the user, and the question may be asked by the user in response to the uploaded input data. For example, the input data uploaded by the user may be multiple files of the same or different types. The query text may include "summarize the key points of multiple files", "select the better file from file A and file B and output it", "what is the specific meaning of the XXX question mentioned in file A", "regenerate a document based on file B", etc.

[0039] The data structure of the input data may be obtained by parsing the input data after receiving the input data, and the parsed data structure may be stored. The data structure of the input data may also be obtained from the stored historical parsing results. The data structure includes a plurality of nodes, which have a hierarchical relationship, and each node contains relevant content of the input data.

[0040] For example, these nodes may include page nodes, title nodes, paragraph nodes, etc. The content of a title node is the title content. The content of a paragraph node is the paragraph content. A paragraph node may also include text nodes, picture nodes, table nodes, formula nodes, object nodes, etc. The content of a text node includes text, the content of a picture node includes pictures, the content of a table node includes the cell content in the table, etc. A paragraph node may also include style, attribute, and position nodes.

[0041] After receiving the query text for the input data, the data structure of the input data can be obtained from the stored data structure. When the input data contains multiple files, the data structure of the specified file is obtained according to the file specified by the query text.

[0042] In operation S220, the target text contained in the node whose content is text is obtained from the data structure.

[0043] For example, you can get the title text content from the title node, and get the paragraph text content from the paragraph node.

[0044] The title node may include a text node and a style node. The text node stores the title text content, and the style node stores the style of the title, such as font, font size, position, etc. The title text content can be obtained from the text node.

[0045] Paragraph nodes may include text nodes, image nodes, table nodes, formula nodes, object nodes, and style nodes. The paragraph text content may be obtained from the text node.

[0046] The text content obtained from each of the above text nodes can be used as the target text.

[0047] In operation S230, output data is determined based on the query text and the target text.

[0048] It can be combined with big model technology to use the big model to generate output data based on query text and target text.

[0049] For example, the query text and the target text can be input into the big model, and the big model can summarize, answer questions, and create at least one of the target text based on the query text, generate answers to the query text, create new content, etc., and return it to the user.

[0050] In the case where the input data is multi-source data, for example, the input data includes multiple files of different types, the output data can be generated based on the multi-source data using a large model.

[0051] For example, the query text and the target texts of multiple files can be input into the big model, which can summarize, refine, question and answer, and create based on multi-source data to generate answers to the query text, create new content, etc., and return them to the user.

[0052] The embodiments of the present disclosure obtain the data structure of input data, extract the target text from the data structure, and use a large model to generate output data based on the query text and the target text, so as to automatically and intelligently process files and improve processing efficiency and accuracy.

[0053] When the input data is multi-source data, since the multi-source data is uniformly processed into a unified data structure, it can support cross-format processing of multi-source data and more efficiently utilize data from different sources. And using a large model to summarize, answer questions and create for multi-source data can more efficiently process multi-source data and generate more accurate and valuable summaries and question-answering results.

[0054] Figure 3 is a flowchart of a data processing method according to another embodiment of the present disclosure.

[0055] like Figure 3 As shown, the data processing method includes operations S310 to S360.

[0056] In operation S310 , input data is received.

[0057] Input data can be files uploaded by users, and files can be of different types, such as documents, images, web pages, etc.

[0058] In operation S320, it is determined whether the input data has a historical parsing result. If yes, operation S340 is executed, otherwise, operation S330 is executed.

[0059] For the file uploaded by the user, it can be determined whether the file has a historical analysis result. The historical analysis result includes the data structure of the file that has been analyzed. In one example, a document library can be preset, which contains the analysis results (i.e., data structures) of multiple preset files. The multiple preset files can be files that are frequently used by users or files with high application value. A historical analysis database can also be preset to store the data structure of files uploaded and analyzed by users. The data structures in the document library and the historical analysis result database are all historical analysis results.

[0060] It can be determined whether the preset library and database contain the data structure of the file currently uploaded by the user, and if so, operation S340 is executed. If not, operation S330 is executed.

[0061] In operation S330, the input data is parsed to obtain and store the data structure of the input data.

[0062] According to an embodiment of the present disclosure, for each type of file, multiple hierarchical structures and the content of each hierarchical structure are parsed from the file; and the input data is converted into a data structure with each level as a node and the content of the level as the content of the node.

[0063] For example, for WORD, PPT, EXCEL and other documents that are editable text, they can be directly converted (transcoded). For example, the hierarchical structure is determined based on the document structure, the content of each level is determined based on the document content, the level is used as a node, and the level content is used as the node content to obtain the data structure.

[0064] For images, photocopied PDFs, etc., text can be recognized from images, and image understanding technology can be used to generate image understanding content for images, and the image understanding content and image recognition content can be integrated together as the overall description text of the image. The overall description text of the image is then transcoded to obtain a data structure.

[0065] For web pages, crawler technology can be used to obtain the site, theme, text and other information of the web page to form text. Then the text is transcoded to obtain the data structure of the web page.

[0066] The above documents, images and web pages are all converted into a data structure in a unified format, and the data structure in the unified format may be a data structure in a bdjson format.

[0067] In operation S340 , in response to the query text, a data structure of the input data is acquired from the current parsing result / historical parsing result.

[0068] The current parsing result is the data structure of the file obtained in operation S330. The historical parsing result is the data structure of the file stored in the library or the historical parsing database.

[0069] After receiving the user's question, the data structure of the file that the user wants to query can be obtained from the current parsing result or the historical parsing result.

[0070] In operation S350, the target text is extracted from the acquired data structure.

[0071] For example, the title text content can be obtained from the text node under the title node, and the paragraph text content can be obtained from the text node under the paragraph node. The text content obtained from the above text nodes is used as the target text.

[0072] In operation S360, output data is generated based on the query text and the target text.

[0073] According to an embodiment of the present disclosure, a large model is used to summarize, answer questions, and create a target text based on a query text to obtain output data.

[0074] For example, the query text and the target text may be input into the big model, and the big model may perform at least one of summarizing, question-answering, and creating on the target text based on the query text, generate an answer to the query text, and return it to the user.

[0075] According to an embodiment of the present disclosure, when the input data is multi-source data, for example, the input data includes multiple files of different types, based on the query text, the target texts of the multiple files are integrated to obtain an integrated text, and the integrated text is summarized and questioned to obtain output data.

[0076] For example, the query text and the target texts of multiple files can be input into the big model, which integrates the multiple target files to obtain an integrated text, performs at least one of summarizing, refining, question-and-answering, and creation based on the integrated text, generates an answer to the query text, and returns it to the user.

[0077] The embodiments of the present disclosure are directed to files uploaded by users. When the historical parsing results contain the data structure of the files, the data structure is directly obtained from the historical parsing results, thereby avoiding the overhead of repeated parsing and transcoding, and improving the system response speed and user experience.

[0078] When the input data is multi-source data, the embodiments of the present disclosure can summarize, answer questions and create for the multi-source data, process the multi-source data more efficiently, and generate more accurate and valuable summary and question-and-answer results.

[0079] Figure 4 is a schematic diagram of a data processing system according to an embodiment of the present disclosure.

[0080] like Figure 4 As shown, the data processing system includes a user service module 410 , a multi-source data processing module 420 , and a large model service module 430 .

[0081] The user service module 410 is used to provide a platform for large model services for users, in which users can upload various types of files, such as WORD, PPT, ESCEL, photocopied PDF, images, web page URL (Uniform Resource Locator, Uniform Resource Locator), etc. In this platform, users can also choose summary scenes, question and answer scenes, creation scenes, etc., and can enter user questions in each scene.

[0082] The multi-source data processing module 420 includes a parsing buffer 421 , a parsing submodule 422 , and a storage submodule 423 .

[0083] The parsing submodule 422 includes a document parser, a photocopy parser, an image parser, and a web page parser. The document parser is used to determine the multiple hierarchical structures of the document and the content of each hierarchical structure for documents such as WORD, PPT, and EXCEL based on the document structure and the document content, and transcode to obtain the data structure of the document. The web page parser is used to determine the multiple hierarchical structures of the web page and the content of each hierarchical structure for web page files based on the web page structure and the page content, and transcode to obtain the data structure of the web page. The photocopy parser is used to determine the multiple hierarchical structures of the image and the content of each hierarchical structure for the photocopy image based on the image understanding content and the image recognition content, and transcode to obtain the data structure of the photocopy image. The image parser has a similar function to the photocopy parser, and is used to determine the multiple hierarchical structures of the image and the content of each hierarchical structure for the image based on the image understanding content and the image recognition content, and transcode to obtain the data structure of the image. The photocopy decoder can focus on parsing photocopy images (such as scanned PDFs).

[0084] Each type of file is converted into a data structure in a unified format by its own parser. The data structure in the unified format may be a data structure in a bdjson format.

[0085] According to an embodiment of the present disclosure, an image understanding text of an image is generated; an image recognition text of the image is acquired; an overall description text of the image is generated based on the image understanding text and the image recognition text; and multiple hierarchical structures and the content of each hierarchical structure are parsed out from the overall description text.

[0086] For example, an image understanding model can be used to generate image understanding text for an image, and an OCR recognition model can be used to obtain image recognition text. The image understanding text and the image recognition text are integrated together to obtain the overall description text of the image. The hierarchical structure of the text is then parsed for the overall description text of the image, and the hierarchical structure is transcoded into a data structure.

[0087] The parsing submodule 422 of this embodiment can not only support the parsing of different types of files, but also support the simultaneous parsing of a large number of files, for example, it can support the simultaneous parsing of 100 different types of files, greatly improving the efficiency of file parsing and transcoding.

[0088] According to an embodiment of the present disclosure, for each file, a mapping relationship between the file and the data structure of the file is determined; and the data structures and mapping relationships of the respective files are stored.

[0089] The storage submodule 423 is used to store the parsed data structure. The storage submodule 423 may include a preset library for storing the data structure of the preset text. It may also include a historical parsing database for storing the data structure of the files uploaded and parsed by the user. The data structures in the preset library and the historical parsing database are all historical parsing results.

[0090] The parsing buffer 421 is used to store the mapping relationship between the file and the parsing result of the file. For example, the file ID and the storage address of the data structure of the file are mapped, and the mapping relationship is written into the parsing buffer 421.

[0091] This embodiment maps the file and the parsing result of the file to distinguish the parsing results of different types of files of the user. The mapping relationship is written into the parsing buffer 421, and the historical parsed data can be directly used by reading the parsing buffer, avoiding the overhead of repeated parsing and transcoding. And it realizes the rapid response of the request and the efficient output of the result.

[0092] The big model service module 430 is used to provide big model services such as document summarization, document question and answer, and document creation. For example, a user enters a question and requests a big model service. The big model can summarize the key points of the document, extract the core content of the document, etc. based on the target text of the document, and return it to the user. The big model receives the user's query text, generates an answer to the query text, creates new content, etc. based on the query text and the target text of the document, and returns it to the user.

[0093] For example, a large model can output the generated results to the client in the SSE (Server-Sent Event) protocol mode. The SSE protocol mode is a streaming output mode that can continuously output long results in segments, rather than waiting for all results to be generated and then returning the long results at once. This can avoid users waiting too long and improve user experience.

[0094] The data processing system of the disclosed embodiment can be applied to a wide range of office, education and research fields. For example, in an office scenario, users can use the system to quickly integrate multiple documents, pictures and web page information, extract key content, and provide support for decision-making. In the field of education, teachers can use the system to quickly organize teaching materials, generate teaching summaries and answer questions, and improve teaching efficiency. In the field of research, researchers can use the system to quickly integrate and analyze large amounts of literature and provide strong support for scientific research. In addition, the system can also be applied to multiple fields such as law, finance, and medical care to help users quickly obtain and analyze relevant information and improve work efficiency and decision-making quality.

[0095] Compared with traditional document query and processing systems, the data processing system provided by the present disclosure has the following advantages.

[0096] The data processing system provided by the present disclosure realizes the integrated processing of multi-source data. The system can simultaneously process different types of data sources such as documents, pictures and web page URLs, and realizes a unified processing flow for multi-source data. This integrated processing method greatly improves the efficiency and accuracy of data processing.

[0097] The data processing system provided by the present disclosure implements intelligent parsing and transcoding. For different types of files, the system uses different intelligent parsing and transcoding technologies. For example, for web page URLs, the system uses crawler technology to crawl information and adapt it into a unified format; for pictures, the system uses AI image recognition technology and OCR technology to extract picture content; for documents, the system generates results in a unified format through real-time transcoding services. This intelligent parsing and transcoding technology enables the system to understand and process various types of data more accurately.

[0098] The data processing system provided by the present disclosure provides a unified data format. The system adapts the parsed data into a unified data structure, and this unified data format facilitates subsequent data processing and model application. By adopting a unified data format, the system can more efficiently utilize data from different sources, and improve the consistency of data processing and subsequent scalability to support more types.

[0099] The data processing system provided by the present disclosure combines the big model application technology. After the data is parsed and transcoded, the system uses the big model application technology to summarize and answer questions about the data. This combination of big model application technology enables the system to understand and analyze the data more deeply and generate more accurate and valuable summary and question-answering results.

[0100] The data processing system provided by the present disclosure realizes efficient caching and request processing. By reading the parsing cache, the system can directly use the historically parsed data, avoiding the overhead of repeated parsing and transcoding. At the same time, the system writes the mapping relationship between the file ID and the parsing result into the parsing cache, realizing rapid response to requests and efficient output of results. This efficient caching and request processing method improves the system's response speed and user experience.

[0101] Figure 5 is a flowchart of a data processing method according to another embodiment of the present disclosure.

[0102] like Figure 5 As shown, this embodiment includes operations S510 to S590.

[0103] In operation S510, a file uploaded by a user is received.

[0104] In operation S520, it is determined whether the file passes the filtering of the filter.

[0105] For example, the file is input into the filter, and the filter determines whether the file contains sensitive, illegal, and other risks. If the file is determined to contain sensitive, illegal, and other risks, operation S590 is performed to output data. The output data prompts the user that the uploaded file contains sensitive, illegal information.

[0106] If the file passes the filter's determination, that is, the file does not contain sensitive or illegal information, operation S530 may be performed.

[0107] In operation S530, it is determined whether the file has a historical parsing result.

[0108] According to an embodiment of the present disclosure, the data structure of the input data is acquired from the historical parsing results according to the mapping relationship.

[0109] For example, the parsing buffer may be read to determine whether the parsing buffer stores a mapping relationship between the file and the data structure. If yes, it means that the file has a historical parsing result, and the historically parsed data structure may be directly used to perform operation S580 to avoid repeated parsing.

[0110] If the parsing cache does not store the mapping relationship between the file and the data structure, operation S540 may be performed.

[0111] In operation S540, the file type is determined.

[0112] In operation S550, files of different types are passed through respective parsers and transcoded to obtain respective data structures.

[0113] In operation S560, the parsed data structures of the respective files are stored.

[0114] File types may include WORD, PPT, EXCEL and other documents, photocopied PDF, images, web pages, etc. For different types of files, different parsers are selected for processing to obtain and store the data structures of each type of file.

[0115] In operation S570, the mapping relationship between the files and the respective data structures is written into the parsing buffer.

[0116] For example, the file ID and the storage address of the file's data structure are mapped, and the mapping relationship is written into the parsing buffer.

[0117] In operation S580, in response to a user request, the large model is called to perform summarization, question-answering, creation, and other services.

[0118] For example, the user may request document summary, content selection, document Q&A, creation, etc. In response to the user request, the big model may perform at least one of the summary, comparison, Q&A, and creation services.

[0119] In operation S590, data is output.

[0120] For example, output the key points summarized by the large model, the generated answers, the new content created, etc.

[0121] The following describes the summarization, question-answering, and creation capabilities of the large model provided by the present disclosure in combination with specific scenarios and examples.

[0122] Table 1 below is an example of a summary scenario.

[0123] Table 1

[0124]

[0125] Table 2 below is an example of a content selection scenario.

[0126] Table 2

[0127]

[0128] Table 3 below is an example of a question-and-answer scenario.

[0129] Table 3

[0130]

[0131] Table 4 below is an example of a creation scenario.

[0132] Table 4

[0133]

[0134] The embodiments of the present disclosure, for multi-source data, combine large models to perform summarization, question and answer, creation, etc. based on multi-source data, and can process multi-source data more efficiently and generate more accurate and valuable summaries and question and answer results.

[0135] According to an embodiment of the present disclosure, the present disclosure also provides a data processing device.

[0136] Figure 6 is a block diagram of a data processing device according to an embodiment of the present disclosure.

[0137] like Figure 6 As shown, the data processing device 600 includes a data structure acquisition module 610 , a target text determination module 620 , and an output data determination module 630 .

[0138] The data structure acquisition module 610 is used to acquire the data structure of the input data in response to receiving a query text for the input data, wherein the data structure includes nodes at multiple levels, and each node contains the content of the input data.

[0139] The target text determination module 620 is used to obtain the target text contained in the node whose content is text from the data structure.

[0140] The output data determination module 630 is used to determine output data based on the query text and the target text.

[0141] The data processing device 600 further includes a receiving module and a parsing module.

[0142] The receiving module is used to receive input data.

[0143] The parsing module is used to parse the input data to obtain the data structure.

[0144] The input data includes a plurality of files of different types. The parsing module includes a parsing unit and a conversion unit.

[0145] The parsing unit is used to parse multiple hierarchical structures and the content of each hierarchical structure from each type of file.

[0146] The conversion unit is used to convert input data into a data structure with each level as a node and the content of the level as the content of the node.

[0147] The plurality of files include at least one of documents, web pages and images. The parsing unit includes a document parsing subunit, a web page parsing subunit and an image parsing subunit.

[0148] The document parsing subunit is used to determine multiple hierarchical structures of the document and the content of each hierarchical structure according to the document structure and document content.

[0149] The web page parsing subunit is used to determine multiple hierarchical structures of a web page and the content of each hierarchical structure according to the page structure and page content.

[0150] The image parsing subunit is used to determine multiple hierarchical structures of the image and the content of each hierarchical structure according to the image understanding content and the image recognition content.

[0151] The image parsing subunit is used to generate image understanding text of the image; obtain image recognition text of the image; generate an overall description text of the image based on the image understanding text and the image recognition text; and parse out multiple hierarchical structures and the content of each hierarchical structure from the overall description text.

[0152] The data processing device 600 further includes a mapping relationship determination module and a storage module.

[0153] The mapping relationship determination module is used to determine, for each file, a mapping relationship between the file and the data structure of the file.

[0154] The storage module is used to store the data structures and mapping relationships of multiple files.

[0155] The data structure acquisition module 610 is used to acquire the data structure of the input data from the historical parsing results according to the mapping relationship.

[0156] The output data determination module 630 is used to perform at least one of summarizing, question-answering and creating on the target text based on the query text to obtain output data.

[0157] The output data determination module 630 is also used to integrate the target texts of the multiple files based on the query text to obtain the integrated text; and to perform at least one of summarizing, question-answering and creating on the integrated text to obtain output data.

[0158] The nodes include title nodes and paragraph nodes, and the paragraph nodes include at least one of text nodes, picture nodes, table nodes, formula nodes, and style nodes.

[0159] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0160] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0161] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0162] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0163] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).

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

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

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

[0167] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

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

[0169] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0170] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0171] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data processing method, comprising: In response to receiving a query text for input data, obtaining a data structure of the input data, wherein the data structure includes nodes at multiple levels, and each node contains content of the input data; Obtaining the target text contained in the node whose content is text from the data structure; and Based on the query text and the target text, output data is determined.

2. The method according to claim 1, further comprising: Receive input data; as well as The input data is parsed to obtain the data structure.

3. The method according to claim 2, wherein: The input data includes a plurality of files of different types; the parsing of the input data to obtain the data structure includes: for each type of file, Parsing multiple hierarchical structures and the content of each hierarchical structure from the file; and Each level is taken as a node, and the content of the level is taken as the content of the node, so as to convert the input data into a data structure.

4. The method according to claim 3, wherein: The multiple files include at least one of documents, web pages and images; and the parsing of multiple hierarchical structures and the content of each hierarchical structure from the files includes at least one of the following operations: Determine multiple hierarchical structures of the document and the content of each hierarchical structure according to the document structure and the document content; Determine multiple hierarchical structures of the web page and the content of each hierarchical structure according to the page structure and the page content; as well as According to the image understanding content and the image recognition content, a plurality of hierarchical structures of the image and the content of each hierarchical structure are determined.

5. The method according to claim 4, wherein: The step of determining the multiple hierarchical structures of the image and the content of each hierarchical structure according to the image understanding content and the image recognition content includes: generating an image understanding text of the image; Obtaining image recognition text of the image; Generate an overall description text of the image according to the image understanding text and the image recognition text; and A plurality of hierarchical structures and the content of each hierarchical structure are parsed from the overall description text.

6. The method according to claim 3, further comprising: For each file, determining a mapping relationship between the file and the data structure of the file; as well as The data structures and mapping relationships of the respective files are stored.

7. The method according to claim 6, wherein: The data structure for obtaining the input data includes: According to the mapping relationship, the data structure of the input data is obtained from the historical parsing results.

8. The method according to claim 1, wherein: The determining of output data based on the query text and the target text comprises: Based on the query text, at least one of summarizing, questioning and answering, and creating is performed on the target text to obtain the output data.

9. The method according to claim 1, wherein: The input data includes a plurality of files of different types; and the determining the output data based on the query text and the target text includes: Based on the query text, integrating the target texts of the plurality of files to obtain an integrated text; At least one of summarizing, questioning and answering, and creating is performed on the integrated text to obtain the output data.

10. The method according to any one of claims 1 to 9, wherein: The nodes include title nodes and paragraph nodes, and the paragraph nodes include at least one of text nodes, picture nodes, table nodes, formula nodes, and style nodes.

11. A data processing device, comprising: A data structure acquisition module, configured to acquire a data structure of the input data in response to receiving a query text for the input data, wherein the data structure includes nodes of multiple levels, each node containing content of the input data; A target text determination module, used to obtain the target text contained in the node whose content is text from the data structure; and The output data determination module is used to determine the output data based on the query text and the target text.

12. The apparatus according to claim 11, further comprising: A receiving module, used for receiving input data; as well as The parsing module is used to parse the input data to obtain the data structure.

13. The device according to claim 12, wherein: The input data includes a plurality of files of different types; the parsing module includes: A parsing unit, configured to parse, for each type of file, a plurality of hierarchical structures and content of each hierarchical structure from the file; and The conversion unit is used to convert the input data into a data structure by taking each level as a node and the content of the level as the content of the node.

14. The device according to claim 13, wherein: The plurality of files include at least one of documents, web pages and images; the parsing unit includes: A document parsing subunit, used to determine multiple hierarchical structures of the document and the content of each hierarchical structure according to the document structure and document content; A web page parsing subunit, configured to determine multiple hierarchical structures of the web page and the content of each hierarchical structure according to the page structure and the page content; and The image parsing subunit is used to determine multiple hierarchical structures of the image and the content of each hierarchical structure according to the image understanding content and the image recognition content.

15. The device according to claim 14, wherein: The image parsing subunit is used to generate an image understanding text of the image; obtain an image recognition text of the image; and generate an overall description text of the image according to the image understanding text and the image recognition text; And a plurality of hierarchical structures and the content of each hierarchical structure are parsed from the overall description text.

16. The apparatus according to claim 13, further comprising: A mapping relationship determination module, used to determine, for each file, a mapping relationship between the file and the data structure of the file; as well as The storage module is used to store the data structures and mapping relationships of the multiple files.

17. The device according to claim 16, wherein: The data structure acquisition module is used to acquire the data structure of the input data from the historical parsing results according to the mapping relationship.

18. The device according to claim 11, wherein The output data determination module is used to perform at least one of summarizing, question-answering and creating on the target text based on the query text to obtain the output data.

19. The device according to claim 11, wherein: The input data includes a plurality of files of different types; the output data determination module is used to integrate the target texts of the plurality of files based on the query text to obtain an integrated text; At least one of summarizing, questioning and answering, and creating is performed on the integrated text to obtain the output data.

20. The device according to any one of claims 11 to 19, wherein: The nodes include title nodes and paragraph nodes, and the paragraph nodes include at least one of text nodes, picture nodes, table nodes, formula nodes, and style nodes.

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

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

23. A computer program product, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Knowledge processing method and device based on large model, knowledge question and answer method and device based on large model, and medium

    CN117743558A

  • Document searching method and device and electronic equipment

    CN118093809A

  • Knowledge retrieval enhancement-based large language model question and answer method and device

    CN118113836A

  • Document structure segmentation method and device, equipment and medium

    CN118298449A

  • Domain-specific processing and information management using machine learning and artificial intelligence models

    US11978273B1