Question and answer picture visualization processing method, system and equipment based on unstructured document and medium
Through data governance and knowledge base construction, combined with vector search technology of large models, unstructured knowledge is included in the knowledge base and visual display of pictures is realized, which solves the problems of unstructured knowledge retrieval and image visualization, and improves the intuitiveness and readability of knowledge.
Patent Information
- Application Number
- CN202510157902.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
How to incorporate unstructured knowledge into the knowledge base for big models to retrieve, and visualize the pictures to the Q&A interface to improve the intuitiveness and readability of knowledge.
The data governance module extracts and saves text and pictures in unstructured documents, builds a knowledge base and uses the vectorized search technology of the big model to obtain answers from the knowledge base. If the answer contains pictures, the image url and text are returned to the http server for visual display through the agent service.
It realizes the effective inclusion of unstructured knowledge into the knowledge base, improves the intuitiveness and readability of knowledge, solves the shortcomings of large models in low-frequency events or professional field knowledge prediction, and realizes automatic visual display of pictures.
Smart Images

Figure CN120011520A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence large-model multimodal analysis, and specifically to a method, system, device and medium for visual processing of question-answer images based on unstructured documents. Background Art
[0002] In today's big data era, information data is growing explosively. With the continuous deepening and extensive application of information technology in work, a huge amount of data and information has been accumulated in actual work. These massive data and information contain a lot of information to be discovered. Quickly and effectively searching and analyzing massive data has become an important demand of many enterprises and organizations. Traditional manual analysis methods alone are far from meeting the actual needs of work. Special analysis tools must be used to help. Only through effective tools can work efficiency be greatly improved and work pressure can be reduced. Especially in actual work, unstructured data is much richer than structured data. If these massive data cannot be parsed, their huge value cannot be realized. Among unstructured data, documents account for the majority. Effective processing of unstructured documents is also very helpful for managing other types of unstructured data.
[0003] Although large models learn a lot of knowledge during training, they do not have long-term memory capabilities and cannot accurately predict low-frequency events or knowledge in very specialized fields based on limited training data. For factual questions in open fields, sometimes there will be wrong or ambiguous answers, especially when designing specific values, dates and other details. With the help of external knowledge bases, the model can directly retrieve authoritative and fresher data, thereby improving the accuracy of the generated answers.
[0004] Therefore, how to incorporate unstructured knowledge into the knowledge base for retrieval by the knowledge base model and how to visualize images on the question-and-answer interface to improve the intuitiveness and readability of knowledge are technical problems that need to be solved urgently. Summary of the invention
[0005] The technical task of the present invention is to provide a method, system, device and medium for visualizing question and answer images based on unstructured documents to solve the problem of how to incorporate unstructured knowledge into the knowledge base for retrieval by the knowledge base model and how to visualize the images on the question and answer interface to improve the intuitiveness and readability of knowledge.
[0006] The technical task of the present invention is achieved in the following way: a method for visualizing question-answer images based on unstructured documents, the method is specifically as follows:
[0007] Data governance: Extract and save text and images from unstructured documents through data extraction technology, and make the corresponding information between images and text consistent with the information in unstructured documents;
[0008] Build a knowledge base: Build a knowledge base to store text information of unstructured documents after data governance;
[0009] Retrieval, question answering and visual display: Based on the big model, vectorized retrieval technology is used to obtain the required answers from the built knowledge base. The agent service processes the answers with image information returned by the big model and returns them to the http server according to the custom protocol for visual display.
[0010] As a preference, data governance is as follows:
[0011] Use third-party libraries to extract data information of different object types such as text, images and charts from unstructured documents and store them separately; among them, save the text in the corresponding text in order; save the original image in the distributed file storage minio according to the unified image format, and name the image saved in minio with a unique identifier, and store the unique identifier in the original image location in the text to ensure that the order relationship between the image storage location and the text is consistent with the original text;
[0012] The entire text data obtained is deduplicated and cleaned by removing unnecessary line breaks and characters to complete the important data governance process.
[0013] Preferably, the knowledge base is constructed as follows:
[0014] Create a knowledge base to obtain the corresponding name and index;
[0015] The managed text data is processed by text segmentation and vectorization through a large model and then stored in the knowledge base.
[0016] Preferably, the retrieval question and answer and the visual display are as follows:
[0017] After obtaining the query question, the query question is vectorized through language processing and lexical analysis.
[0018] The large model performs vector similarity retrieval from the knowledge base based on the vectorized query question and determines whether the retrieved knowledge meets the similarity requirements:
[0019] If no knowledge that meets the similarity requirements is retrieved in the knowledge base, the large model will integrate and process the corresponding query questions based on its own learning ability and return them to the agent service;
[0020] If knowledge that meets the similarity requirements is retrieved from the knowledge base, the large model obtains the top K knowledge records with high similarity and determines whether the knowledge recalled by the large model contains the unique identifier of the image:
[0021] If the knowledge recalled by the large model contains a unique image identifier, the agent service combines the image unique identifier and the location of the image in minio into an image URL, and returns the text knowledge and image URL to the http server in a streaming manner according to the custom protocol for display;
[0022] If there is no unique image identifier in the data recalled by the large model, the agent service returns the knowledge text to the http server in streaming format according to the custom protocol.
[0023] Preferably, the http server displays the acquired text data in the question-answer box in order.
[0024] If an image URL is detected, the image with the corresponding name is directly obtained from minio and rendered to the corresponding position of the image in the question and answer box to achieve visual display of the image.
[0025] A question-answer image visualization processing system based on unstructured documents, the system comprising:
[0026] The data governance module is used to extract and save text and images in unstructured documents through data extraction technology, and make the corresponding information between images and texts consistent with the information in the unstructured documents;
[0027] The knowledge base building module is used to build a knowledge base that stores text information of unstructured documents after data governance;
[0028] The retrieval question and answer and visualization display module is used to use vectorized retrieval technology to obtain qualified answers from the built knowledge base based on the big model. The agent service processes the answers with image information returned by the big model and returns them to the http server according to the custom protocol for visualization.
[0029] Preferably, the data governance module includes:
[0030] The storage submodule is used to extract data information of different object types such as text, images and charts from unstructured documents using a third-party library and store them separately; the text is saved in order to the corresponding text; the original image is saved in the distributed file storage minio in a unified image format, and the image saved in minio is named with a unique identifier, and the unique identifier is stored in the text at the location of the original image, ensuring that the order relationship between the image storage location and the text is consistent with the original text;
[0031] The data cleaning submodule is used to perform data cleaning operations such as deduplication and removal of unnecessary line breaks and characters on the entire text data obtained, thus completing the important data governance flow;
[0032] The knowledge base building modules include:
[0033] Create a submodule to create a knowledge base to obtain the corresponding name and index;
[0034] The segmentation machine vectorization processing submodule is used to store the managed text data into the knowledge base after text segmentation and vectorization processing by the large model.
[0035] Preferably, the retrieval question answering and visualization display module includes:
[0036] The question acquisition and question processing submodule is used to obtain the query question and perform vectorization processing on the query question through language processing and lexical analysis;
[0037] Judgment submodule 1 is used for the large model to perform vector similarity retrieval from the knowledge base based on the query question after vectorization, and to determine whether the knowledge that meets the similarity requirements is retrieved:
[0038] If no knowledge that meets the similarity requirements is retrieved in the knowledge base, the large model will integrate and process the corresponding query questions based on its own learning ability and return them to the agent service;
[0039] If knowledge that meets the similarity requirements is retrieved from the knowledge base, the large model obtains the top K knowledge records with high similarity;
[0040] Judgment submodule 2 is used to determine whether the knowledge recalled by the large model contains the unique identifier of the image:
[0041] If the knowledge recalled by the large model contains a unique image identifier, the agent service combines the image unique identifier and the location of the image in minio into an image URL, and returns the text knowledge and image URL to the http server in a streaming manner according to the custom protocol for display;
[0042] If there is no unique image identifier in the data recalled by the large model, the agent service returns the knowledge text to the http server in streaming format according to the custom protocol.
[0043] An electronic device comprising: a memory and at least one processor;
[0044] Wherein, the memory stores computer-executable instructions;
[0045] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the above-mentioned question-and-answer image visualization processing method based on unstructured documents.
[0046] A computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the above-mentioned method for visualizing question-and-answer images based on unstructured documents is implemented.
[0047] The method, system, device and medium for visualizing question and answer images based on unstructured documents of the present invention have the following advantages:
[0048] (I) The present invention uses the technology based on mounting knowledge base to expand text and images of unstructured documents, and uses data extraction and management technology to perform data cleaning processes such as deduplication, filtering, extraction and storage on unstructured data, and saves the image in minio with a unique label as the name, and stores the managed text data containing the image label in the mounted vector knowledge base through text segmentation, vectorization and other processing; at the same time, based on the large model vector similarity retrieval, the given question is vectorized and matched to the answer with the highest similarity from the mounted knowledge base. If the answer contains an image label, the URL of the image stored in minio and the text in the answer are returned to the http server in a streaming manner according to a custom protocol for visual display; compared with the existing question-answering system, it not only solves the problem of retrieving unstructured data, but also solves the problem of automatic question-answering of complex visualization type such as graph visualization;
[0049] (ii) The present invention first extracts the content of unstructured documents, cleans and processes the source data accordingly, stores the images separately, and stores the processed text content in the mounted large model knowledge base through text segmentation and vectorization processing; when the large model is used for question and answer, the question is vectorized and then searched for vector similarity in the mounted knowledge base to obtain a high similarity answer. If the answer contains an image tag, the large model is returned to the agent for processing into a custom protocol format and returned to the http server for visual display. Compared with the traditional large model question and answer method, the mounted knowledge base of the present invention not only ensures the timeliness and security of the data, but also avoids the "hallucination" problem of the large model. At the same time, it provides more comprehensive feedback on the content of the document, especially visually displays the images, increases the readability and intuitive simplicity of the knowledge, and has good promotion and use value;
[0050] (III) The present invention uses data extraction technology to perform data governance on unstructured document content, and stores the text containing image identifiers into the knowledge base after vectorization by a large model, and the images into minio. When performing question-and-answer queries, if the query content hits the knowledge with images in the knowledge base, the Agent service will recall the text knowledge from the knowledge base, obtain the image information from minio, and finally return it to the http server according to the custom protocol, effectively processing the unstructured document knowledge for content expansion and function enhancement. More diverse modal support can enhance the knowledge base's ability to understand and process information from different sources, improve the accessibility of the knowledge base, and create a more inclusive artificial intelligence system for enterprises;
[0051] (IV) The present invention makes full use of the text and image separation and extraction technology of the unstructured document parsing library, and adds a unique image identifier to the original image position in the text, thereby ensuring the relevance of the image and text information; and based on the knowledge base extension module, the unstructured knowledge relied on is provided to the large model for use, which not only makes full use of the rich unstructured data, but also improves the knowledge scope of the large model and the accuracy of answering questions; in particular, compared with the prior art, it solves the automatic question-answering problem of complex visualization type such as graph visualization, improves the generalization ability and readability of question-answering, and has good promotion and use value;
[0052] (V) The present invention makes full use of the processing technology of the unstructured document parsing library for text and pictures, which not only ensures the association between pictures and texts, but also ensures the separate storage of pictures; and solves the automatic question-answering problem of complex visualization type of picture visualization based on the large model knowledge base extension module and agent service, which has good use value and promotion significance;
[0053] (VI) The present invention makes full use of unstructured document data extraction technology, large model knowledge base expansion and agent services to enrich large model knowledge with unstructured data, and solves the automatic question-answering problem of complex visualization type such as image visualization;
[0054] (VII) The present invention uses an unstructured document parsing library to extract text and images from unstructured documents, stores the images in minio according to unique identifiers, and adds a unique identifier to the original image position in the text to ensure effective association between the text and the image;
[0055] (VIII) The present invention utilizes a large model knowledge base extension module and an agent service to replace the image identifier in the question and answer answer with the image URL recognized by the http server, and returns it to the http server in a streaming manner according to a custom protocol for visual display. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The present invention is further described below in conjunction with the accompanying drawings.
[0057] Attached Figure 1 This is a flowchart of the question-and-answer image visualization processing method based on unstructured documents. DETAILED DESCRIPTION
[0058] The following detailed description is made of the question-and-answer image visualization processing method, system, device and medium based on unstructured documents of the present invention with reference to the accompanying drawings and specific embodiments of the specification.
[0059] Embodiment 1:
[0060] As attached Figure 1 As shown, this embodiment provides a method for visualizing question-answer images based on unstructured documents, and the method is specifically as follows:
[0061] S1. Data governance: Extract and save text and images from unstructured documents through data extraction technology, and make the corresponding information between images and text consistent with the information in unstructured documents;
[0062] S2. Build a knowledge base: Build a knowledge base to store text information of unstructured documents after data governance;
[0063] S3. Question and answer retrieval and visual display: Based on the big model, vectorized retrieval technology is used to obtain the required answers from the built knowledge base. The agent service processes the answers with image information returned by the big model and returns them to the http server according to the custom protocol for visual display.
[0064] The data governance in step S1 of this embodiment is specifically as follows:
[0065] S101, using a third-party library to extract data information of different object types such as text, images and charts from unstructured documents and store them separately; wherein, the text is saved in order to the corresponding text; the original image is saved in a distributed file storage minio according to a unified image format, and the image saved in minio is named according to a unique identifier, and the unique identifier is stored in the text at the location of the original image, ensuring that the order relationship between the image storage position and the text is consistent with the original text;
[0066] S102: The entire text data obtained is subjected to data cleaning operations such as deduplication and removal of unnecessary line breaks and characters to complete an important data governance process.
[0067] The construction of the knowledge base in step S2 of this embodiment is specifically as follows:
[0068] S201, create a knowledge base to obtain the corresponding name and index;
[0069] S202, the managed text data is processed by text segmentation and vectorization of the large model and then stored in the knowledge base.
[0070] The search question and answer and visual display in step S3 of this embodiment are as follows:
[0071] S301, obtaining a query question, and performing vectorization processing on the query question through language processing and lexical analysis;
[0072] S302: The large model performs vector similarity retrieval from the knowledge base based on the query question after vectorization, and determines whether knowledge that meets the similarity requirements is retrieved:
[0073] ① If no knowledge that meets the similarity requirements is retrieved in the knowledge base, the big model will integrate and process the corresponding query questions based on its own learning ability and return them to the agent service;
[0074] ② If knowledge that meets the similarity requirements is retrieved from the knowledge base, the large model obtains the top K knowledge records with high similarity and determines whether the knowledge recalled by the large model contains the unique identifier of the image:
[0075] ① If the knowledge recalled by the large model contains a unique image identifier, the agent service combines the image unique identifier and the location of the image in minio into an image URL, and returns the text knowledge and image URL to the http server in a streaming manner according to the custom protocol for display;
[0076] ② If there is no unique image identifier in the data recalled by the large model, the agent service will return the knowledge text to the http server in a streaming manner according to the custom protocol.
[0077] The http server in this embodiment displays the acquired text data in order in the question-answer box.
[0078] If an image URL is detected, the image with the corresponding name is directly obtained from minio and rendered to the corresponding position of the image in the question and answer box to achieve visual display of the image.
[0079] Embodiment 2:
[0080] This embodiment provides a question-answer image visualization processing system based on unstructured documents, the system comprising:
[0081] The data governance module is used to extract and save text and images in unstructured documents through data extraction technology, and make the corresponding information between images and texts consistent with the information in the unstructured documents;
[0082] The knowledge base building module is used to build a knowledge base that stores text information of unstructured documents after data governance;
[0083] The retrieval question and answer and visualization display module is used to use vectorized retrieval technology to obtain qualified answers from the built knowledge base based on the big model. The agent service processes the answers with image information returned by the big model and returns them to the http server according to the custom protocol for visualization.
[0084] The data governance module in this embodiment includes:
[0085] The storage submodule is used to extract data information of different object types such as text, images and charts from unstructured documents using a third-party library and store them separately; the text is saved in order to the corresponding text; the original image is saved in the distributed file storage minio in a unified image format, and the image saved in minio is named with a unique identifier, and the unique identifier is stored in the text at the location of the original image, ensuring that the order relationship between the image storage location and the text is consistent with the original text;
[0086] The data cleaning submodule is used to perform data cleaning operations such as deduplication and removal of unnecessary line breaks and characters on the entire acquired text data, thus completing the important data governance flow.
[0087] The knowledge base building module in this embodiment includes:
[0088] Create a submodule to create a knowledge base to obtain the corresponding name and index;
[0089] The segmentation machine vectorization processing submodule is used to store the managed text data into the knowledge base after text segmentation and vectorization processing by the large model.
[0090] The retrieval question answering and visual display module in this embodiment includes:
[0091] The question acquisition and question processing submodule is used to obtain the query question and perform vectorization processing on the query question through language processing and lexical analysis;
[0092] Judgment submodule 1 is used for the large model to perform vector similarity retrieval from the knowledge base based on the query question after vectorization, and to determine whether the knowledge that meets the similarity requirements is retrieved:
[0093] If no knowledge that meets the similarity requirements is retrieved in the knowledge base, the large model will integrate and process the corresponding query questions based on its own learning ability and return them to the agent service;
[0094] If knowledge that meets the similarity requirements is retrieved from the knowledge base, the large model obtains the top K knowledge records with high similarity;
[0095] Judgment submodule 2 is used to determine whether the knowledge recalled by the large model contains the unique identifier of the image:
[0096] If the knowledge recalled by the large model contains a unique image identifier, the agent service combines the image unique identifier and the location of the image in minio into an image URL, and returns the text knowledge and image URL to the http server in a streaming manner according to the custom protocol for display;
[0097] If there is no unique image identifier in the data recalled by the large model, the agent service returns the knowledge text to the http server in streaming format according to the custom protocol.
[0098] Embodiment 3:
[0099] This embodiment also provides an electronic device, including: a memory and at least one processor;
[0100] Wherein, the memory stores computer-executable instructions;
[0101] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the question-and-answer image visualization processing method based on unstructured documents as described in any one of the present inventions.
[0102] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or any conventional processor, etc.
[0103] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can also include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, at least one disk storage period, a flash memory device, or other volatile solid-state storage devices.
[0104] Embodiment 4:
[0105] This embodiment also provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are loaded by a processor, so that the processor executes the method for visualizing question-answer images based on unstructured documents in any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.
[0106] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0107] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0108] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0109] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for visualizing question-answer images based on unstructured documents, characterized in that: The method is as follows: Data governance: Extract and save text and images from unstructured documents through data extraction technology, and make the corresponding information between images and text consistent with the information in unstructured documents; Build a knowledge base: Build a knowledge base to store text information of unstructured documents after data governance; Retrieval, question answering and visual display: Based on the big model, vectorized retrieval technology is used to obtain the required answers from the built knowledge base. The agent service processes the answers with image information returned by the big model and returns them to the http server according to the custom protocol for visual display.
2. The method for visualizing question-answer images based on unstructured documents according to claim 1, characterized in that: Data governance is as follows: Use third-party libraries to extract data information of different object types such as text, images and charts from unstructured documents and store them separately; among them, save the text in the corresponding text in order; save the original image in the distributed file storage minio according to the unified image format, and name the image saved in minio with a unique identifier, and store the unique identifier in the original image location in the text to ensure that the order relationship between the image storage location and the text is consistent with the original text; The entire text data obtained is subjected to data cleaning operations such as deduplication and removal of unnecessary line breaks and characters.
3. The method for visualizing question-answer images based on unstructured documents according to claim 1 or 2, characterized in that: The details of building a knowledge base are as follows: Create a knowledge base to obtain the corresponding name and index; The managed text data is processed by text segmentation and vectorization through a large model and then stored in the knowledge base.
4. The method for visualizing question-answer images based on unstructured documents according to claim 3, characterized in that: The search questions and answers and visualization displays are as follows: After obtaining the query question, the query question is vectorized through language processing and lexical analysis. The large model performs vector similarity retrieval from the knowledge base based on the vectorized query question and determines whether the retrieved knowledge meets the similarity requirements: If no knowledge that meets the similarity requirements is retrieved in the knowledge base, the large model will integrate and process the corresponding query questions based on its own learning ability and return them to the agent service; If knowledge that meets the similarity requirements is retrieved from the knowledge base, the large model obtains the top K knowledge records with high similarity and determines whether the knowledge recalled by the large model contains the unique identifier of the image: If the knowledge recalled by the large model contains a unique image identifier, the agent service combines the image unique identifier and the location of the image in minio into an image URL, and returns the text knowledge and image URL to the http server in a streaming manner according to the custom protocol for display; If there is no unique image identifier in the data recalled by the large model, the agent service returns the knowledge text to the http server in streaming format according to the custom protocol.
5. The method for visualizing question-answer images based on unstructured documents according to claim 4, characterized in that: The http server displays the acquired text data in the question-and-answer box in order. If an image URL is detected, the image with the corresponding name is directly obtained from minio and rendered to the corresponding position of the image in the question and answer box to achieve visual display of the image.
6. A question-answer image visualization processing system based on unstructured documents, characterized in that: The system includes: The data governance module is used to extract and save text and images in unstructured documents through data extraction technology, and make the corresponding information between images and texts consistent with the information in the unstructured documents; The knowledge base building module is used to build a knowledge base that stores text information of unstructured documents after data governance; The retrieval question and answer and visualization display module is used to use vectorized retrieval technology to obtain qualified answers from the built knowledge base based on the big model. The agent service processes the answers with image information returned by the big model and returns them to the http server according to the custom protocol for visualization.
7. The question-answer image visualization processing system based on unstructured documents according to claim 6, characterized in that: The data governance modules include: The storage submodule is used to extract data information of different object types such as text, images and charts from unstructured documents using a third-party library and store them separately; the text is saved in order to the corresponding text; the original image is saved in the distributed file storage minio in a unified image format, and the image saved in minio is named with a unique identifier, and the unique identifier is stored in the text at the location of the original image, ensuring that the order relationship between the image storage location and the text is consistent with the original text; The data cleaning submodule is used to perform data cleaning operations on the entire text data obtained by removing duplicates and unnecessary line breaks and characters; The knowledge base building modules include: Create a submodule to create a knowledge base to obtain the corresponding name and index; The segmentation machine vectorization processing submodule is used to store the managed text data into the knowledge base after text segmentation and vectorization processing by the large model.
8. The question-answer image visualization processing system based on unstructured documents according to claim 6 or 7, characterized in that: The retrieval question answering and visualization display modules include: The question acquisition and question processing submodule is used to obtain the query question and perform vectorization processing on the query question through language processing and lexical analysis; Judgment submodule 1 is used for the large model to perform vector similarity retrieval from the knowledge base based on the query question after vectorization, and to determine whether the knowledge that meets the similarity requirements is retrieved: If no knowledge that meets the similarity requirements is retrieved in the knowledge base, the large model will integrate and process the corresponding query questions based on its own learning ability and return them to the agent service; If knowledge that meets the similarity requirements is retrieved from the knowledge base, the large model obtains the top K knowledge records with high similarity; Judgment submodule 2 is used to determine whether the knowledge recalled by the large model contains the unique identifier of the image: If the knowledge recalled by the large model contains a unique image identifier, the agent service combines the image unique identifier and the location of the image in minio into an image URL, and returns the text knowledge and image URL to the http server in a streaming manner according to the custom protocol for display; If there is no unique image identifier in the data recalled by the large model, the agent service returns the knowledge text to the http server in streaming format according to the custom protocol.
9. An electronic device, characterized in that: include: memory and at least one processor; Wherein, the memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the question-and-answer image visualization processing method based on unstructured documents as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method for visualizing question-and-answer images based on unstructured documents as described in any one of claims 1 to 5 is implemented.