Archive information extraction method and device, equipment, storage medium and program product
Through the combination of multi-text models, the extraction of archival information is gradually optimized, which solves the problem of the inability of traditional compilation and research methods to handle large-scale data and the insufficient accuracy of AI models, and achieves efficient and accurate extraction of archival information.
Patent Information
- Application Number
- CN202410690288.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-10
Smart Images

Figure CN118626644A
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to an archive information extraction method, device, computer equipment, storage medium and computer program product. Background Art
[0002] Archives compilation and research is an important part of archives work. Through in-depth research on archive contents, archives compilation and research can effectively refine, process and summarize archive information to form high-quality compilation and research results, thereby providing society with scientific and systematic archive information and improving the utilization efficiency and quality of archive information.
[0003] Traditional archival compilation and research methods mainly rely on expert knowledge to guide the archival sorting process, sort out historical archival data based on expert rules, and extract key information such as summaries. Traditional methods consume a lot of human resources, cannot process large-scale, multi-dimensional data, and cannot meet the growing user needs and applications.
[0004] In recent years, AI model technologies such as natural language processing and text models have been applied to analyze and understand archive content and extract key information such as summaries from archives. How to ensure that AI models can accurately extract key information from archives is a problem to be solved. Summary of the invention
[0005] Based on this, it is necessary to provide an archive information extraction method, device, computer equipment, storage medium and computer program product to address the above technical problems.
[0006] The present application provides a method for extracting information from archives, the method comprising:
[0007] Based on the text content of the target file and the preset information category, a first prompt word is obtained;
[0008] Inputting the first prompt word into a first text model, so that the first text model extracts information matching a preset information category from the text content and outputs a first extraction result;
[0009] Based on the first extraction result and the text content, obtain a second prompt word;
[0010] Inputting the second prompt word into a second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result;
[0011] According to the second extraction result, information matching the preset information category in the target file is obtained.
[0012] In one embodiment, obtaining information matching the preset information category in the target file according to the second extraction result includes:
[0013] Based on the second extraction result and the text content, obtaining a third prompt word;
[0014] Inputting the third prompt word into a third text model, so that the third text model optimizes the second extraction result according to the text content and outputs a third extraction result;
[0015] According to the third extraction result, information matching the preset information category in the target file is obtained.
[0016] In one embodiment, inputting the third prompt word into the third text model includes:
[0017] Obtaining a first similarity between the first extraction result and the second extraction result;
[0018] If the first similarity reaches a threshold, the third prompt word is input into a third text model.
[0019] In one embodiment, the method further comprises:
[0020] If the first similarity does not reach a threshold, inputting the first prompt word into a third text model, so that the third text model extracts information matching a preset information category from the text content and outputs a fourth extraction result;
[0021] Obtaining a second similarity between the fourth extraction result and the first extraction result;
[0022] If the second similarity reaches a threshold, inputting the second prompt word into the third text model, so that the third text model optimizes the first extraction result and outputs a fifth extraction result;
[0023] According to the fifth extraction result, information matching the preset information category in the target file is obtained.
[0024] In one embodiment, the method further comprises:
[0025] If the second similarity does not reach the threshold, inputting the fourth prompt word into the second text model, so that the second text model optimizes the fourth extraction result according to the text content and outputs a sixth extraction result; the fourth prompt word is obtained according to the fourth extraction result and the text content;
[0026] According to the sixth extraction result, information matching the preset information category in the target file is obtained.
[0027] In one embodiment, before obtaining the first prompt word based on the text content of the target file and the preset information category, the method further includes:
[0028] If the target file is of a non-text type, text recognition is performed on the target file to obtain text content; the non-text type includes a picture type and an audio and video type.
[0029] The present application provides a device for extracting information from archives, the device comprising:
[0030] A prompt word acquisition module, used to obtain a first prompt word based on the text content of the target file and a preset information category;
[0031] A prompt word input module, used for inputting the first prompt word into a first text model, so that the first text model extracts information matching a preset information category from the text content and outputs a first extraction result;
[0032] The prompt word acquisition module is further used to obtain a second prompt word based on the first extraction result and the text content;
[0033] The prompt word input module is further used to input the second prompt word into a second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result;
[0034] The file information acquisition module is used to obtain information matching the preset information category in the target file according to the second extraction result.
[0035] The present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the above method.
[0036] The present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to execute the above method.
[0037] The present application provides a computer program product, on which a computer program is stored, and the computer program is executed by a processor to perform the above method.
[0038] The present application jointly uses at least two text models to extract key information from archives, thereby reducing the manpower input in the archive compilation and research process while improving the accuracy of extracting archive information. Specifically, based on the text content and preset information category of the target archive, a first prompt word is obtained; the first prompt word is input into the first text model, so that the first text model extracts information matching the preset information category from the text content and outputs a first extraction result; based on the first extraction result and the text content, a second prompt word is obtained; the second prompt word is input into the second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result; based on the second extraction result, information matching the preset information category in the target archive is obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram of a process for extracting information from archives in one embodiment;
[0041] Figure 2 A schematic diagram of a process of obtaining archive information based on a third text model in one embodiment;
[0042] Figure 3 A schematic diagram of a flow chart of a method for extracting archive information in another embodiment;
[0043] Figure 4 is a structural block diagram of an archive information extraction device in an embodiment;
[0044] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0047] The archive information extraction method provided in this application can be executed by a computer device, including: Figure 1 The steps shown are:
[0048] Step S101, obtaining a first prompt word based on the text content of the target file and a preset information category.
[0049] The preset information categories may include: "time", "category", "topic", "summary" and the like.
[0050] The first prompt word may be obtained according to the text content of the target archive and a combination of preset information categories. The first prompt word may be, for example, "The following is the text content of the archive [...], please extract the summary and other information".
[0051] Step S102: input the first prompt word into a first text model, so that the first text model extracts information matching a preset information category from the text content and outputs a first extraction result.
[0052] The text models used in this application include, for example, the open source chatGML6B, Tongyi Qianwen 14B, and Baichuan 13B text models. In the following introduction, "first / second / third" are introduced to distinguish the multiple text models used in this application.
[0053] After the first prompt word is input into the first text model, the first text model can obtain the text content and the preset information category from the first prompt word, and the first text model extracts the information matching the preset information category from the text content to form a corresponding extraction result and output it. For the purpose of distinction, the extraction result is called the first extraction result.
[0054] Step S103: obtaining a second prompt word based on the first extraction result and the text content.
[0055] The second prompt word can be obtained based on the combination of the first extraction result and the text content. The second prompt word is, for example, "The following is the text content of the file [......], the following is the summary [......], please determine whether the summary is complete and correct? If not, please optimize it."
[0056] Step S104: input the second prompt word into a second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result.
[0057] After obtaining the second prompt word, the second prompt word can be input into the second text model. The second text model can obtain the text content and the first extraction result from the second prompt word. Thus, the second text model can verify and optimize the first extraction result according to the text content to form a corresponding extraction result. For the purpose of distinction, this extraction result is called the second extraction result.
[0058] Step S105, obtaining information matching the preset information category in the target file according to the second extraction result.
[0059] After obtaining the second extraction result, the second extraction result can be directly used as the information in the target file that matches the preset information category, or the second extraction result can be further processed to obtain the information in the target file that matches the preset information category.
[0060] The above-mentioned archive information extraction method jointly uses at least two text models to extract key information of the archive, thereby reducing the manpower input in the archive compilation and research process and improving the accuracy of archive information extraction. Specifically, based on the text content and preset information category of the target archive, a first prompt word is obtained; the first prompt word is input into the first text model, so that the first text model extracts information matching the preset information category from the text content and outputs a first extraction result; based on the first extraction result and the text content, a second prompt word is obtained; the second prompt word is input into the second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result; according to the second extraction result, information matching the preset information category in the target archive is obtained.
[0061] In one embodiment, according to the second extraction result, the information matching the preset information category in the target file is obtained, which may specifically include: Figure 2 The steps shown are: step S201, obtaining a third prompt word based on the second extraction result and the text content; step S202, inputting the third prompt word into a third text model, so that the third text model optimizes the second extraction result according to the text content and outputs a third extraction result; step S203, obtaining information in the target file that matches the preset information category according to the third extraction result.
[0062] A third prompt word may be obtained based on the combination of the second extraction result and the text content. The third prompt word may be, for example, "The following is the text content of the archive [......], the following is the summary [......], please determine whether the summary is complete and correct? If not, please optimize it."
[0063] After obtaining the third prompt word, the third prompt word can be input into the third text model. The third text model can obtain the text content and the second extraction result from the third prompt word. Thus, the third text model can verify and optimize the second extraction result according to the text content, thereby forming a corresponding extraction result. For the purpose of distinction, the extraction result is called the third extraction result. After obtaining the third extraction result, the third extraction result can be directly used as the information matching the preset information category in the target file.
[0064] In one embodiment, inputting the third prompt word into a third text model may specifically include: obtaining a first similarity between the first extraction result and the second extraction result; if the first similarity reaches a threshold, inputting the third prompt word into a third text model.
[0065] The similarity between the first extraction result and the second extraction result can be compared. For the purpose of distinction, the similarity is referred to as the first similarity. If the first similarity reaches the threshold, it means that the second text model has made a fine adjustment to the first extraction result output by the first text model, and the second text model is more receptive to the first extraction result. Therefore, the third prompt word obtained according to the second extraction result output by the second text model and the text content can be directly input into the third text model for verification and optimization, so that the third text model outputs the third extraction result.
[0066] In one embodiment, the method provided by the present application also includes: if the first similarity does not reach a threshold, inputting the first prompt word into a third text model, so that the third text model extracts information matching a preset information category from the text content and outputs a fourth extraction result; obtaining a second similarity between the fourth extraction result and the first extraction result; if the second similarity reaches a threshold, inputting the second prompt word into the third text model, so that the third text model optimizes the first extraction result and outputs a fifth extraction result; and according to the fifth extraction result, obtaining information in the target file matching the preset information category.
[0067] If the first similarity does not reach the threshold, it means that the second text model has made a significant adjustment to the first extraction result output by the first text model, and the second text model does not quite recognize the first extraction result. Therefore, the first prompt word can be input into the third text model, so that the third text model can automatically extract information matching the preset information category from the text content, thereby outputting the corresponding extraction result (for distinction, this extraction result is called the fourth extraction result). Since the first extraction result is formed by the first text model directly extracting information matching the preset information category from the text content, the similarity between the fourth extraction result and the first extraction result can be marked (for distinction, this similarity is called the second similarity).
[0068] If the second similarity reaches the threshold, it means that the extraction results of the third text model and the first text model are not much different and are relatively close, and there may be problems with the second text model. The second extraction result output by the second text model is not very accurate, resulting in the first similarity between the second extraction result and the first extraction result not reaching the threshold; at this time, the second prompt word formed based on the first extraction result and the text content can be directly input into the third text model, and the third text model optimizes the first extraction result and outputs the corresponding extraction result (for distinction, this extraction result is called the fifth extraction result). After obtaining the fifth extraction result, the fifth extraction result can be directly used as the information matching the preset information category in the target file.
[0069] In one embodiment, the method provided by the present application also includes: if the second similarity does not reach a threshold, inputting a fourth prompt word into the second text model so that the second text model optimizes the fourth extraction result according to the text content and outputs a sixth extraction result; the fourth prompt word is obtained based on the fourth extraction result and the text content; based on the sixth extraction result, obtaining information in the target file that matches the preset information category.
[0070] If the second similarity does not reach the threshold, it means that the extraction results of the third text model and the first text model are quite different; and the first similarity also does not reach the threshold, and the second text model does not quite recognize the first extraction result, which means that there may be a problem with the first text model, and the first extraction result output by the first text model is not very accurate, resulting in the first similarity between the first extraction result and the second extraction result not reaching the threshold; at this time, the fourth extraction result output based on the third text model and the fourth prompt word formed by the text content can be input into the second text model, and the second text model optimizes the fourth extraction result and outputs the corresponding extraction result (for distinction, the extraction result is called the sixth extraction result). After obtaining the sixth extraction result, the sixth extraction result can be directly used as information matching the preset information category in the target file.
[0071] In one embodiment, before obtaining the first prompt word based on the text content and preset information category of the target file, the method provided by the present application also includes: if the target file belongs to a non-text type, performing text recognition on the target file to obtain text content; the non-text type includes a picture type and an audio and video type.
[0072] For image types, we can perform text recognition on the target file based on OCR technology (OCR's full name is Optical Character Recognition, and its Chinese name is optical character recognition), obtain the text content and store it in the database.
[0073] For audio and video types, text recognition can be performed on the target files based on audio track extraction and speech transcription technology to obtain the text content and store it in the database.
[0074] For text types, you can use a document parsing toolkit to extract the text content in the target file and store it in the database.
[0075] In order to better understand the above method, an application example of the information extraction method of the application archive is described in detail below. The application example includes Figure 3 The steps shown are:
[0076] Step S301, obtaining a first prompt word based on the text content of the target file and a preset information category;
[0077] Step S302, inputting the first prompt word into the first text model, so that the first text model extracts information matching the preset information category from the text content and outputs a first extraction result;
[0078] Step S303, obtaining a second prompt word based on the first extraction result and the text content;
[0079] Step S304, inputting the second prompt word into the second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result;
[0080] Step S305, obtaining a first similarity between the first extraction result and the second extraction result;
[0081] Step S306, determining whether the first similarity reaches a threshold;
[0082] If the first similarity reaches the threshold, the process proceeds to step S307, where a third prompt word is obtained based on the second extraction result and the text content, and the third prompt word is input into a third text model so that the third text model optimizes the second extraction result according to the text content and outputs a third extraction result to obtain information in the target file that matches the preset information category.
[0083] If the first similarity does not reach the threshold, the step proceeds to S308, where the first prompt word is input into the third text model, so that the third text model extracts information matching the preset information category from the text content and outputs a fourth extraction result;
[0084] Step S309, obtaining a second similarity between the fourth extraction result and the first extraction result;
[0085] Step S310, determining whether the second similarity reaches a threshold;
[0086] If the second similarity reaches the threshold, the process proceeds to step S311, where the second prompt word is input into the third text model, so that the third text model optimizes the first extraction result and outputs a fifth extraction result, so as to obtain information in the target file that matches the preset information category;
[0087] If the second similarity does not reach the threshold, the process proceeds to step S312, where a fourth prompt word is obtained based on the fourth extraction result and the text content, and the fourth prompt word is input into the second text model so that the second text model optimizes the fourth extraction result based on the text content and outputs a sixth extraction result to obtain information in the target file that matches the preset information category.
[0088] After obtaining the information in the target file that matches the preset information category, the user can select one or more of the preset information categories as the editing and research dimensions, such as "time", filter the files of the same information under the editing and research dimensions, and display the editing and research results according to the preset display style.
[0089] In this application example, three text models are used jointly to extract key information from archives, which reduces the manpower input in the archive compilation and research process while improving the accuracy of archive information extraction.
[0090] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0091] Based on the same inventive concept, the embodiment of the present application also provides an archive information extraction device for implementing the archive information extraction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more archive information extraction devices provided below can refer to the limitations of the archive information extraction method above, and will not be repeated here.
[0092] In one embodiment, Figure 4 As shown, a device for extracting information from archives is provided, comprising:
[0093] A prompt word acquisition module 401 is used to obtain a first prompt word based on the text content of the target file and a preset information category;
[0094] A prompt word input module 402, used for inputting the first prompt word into a first text model, so that the first text model extracts information matching a preset information category from the text content and outputs a first extraction result;
[0095] The prompt word acquisition module 401 is further used to obtain a second prompt word based on the first extraction result and the text content;
[0096] The prompt word input module 402 is further used to input the second prompt word into a second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result;
[0097] The archive information acquisition module 403 is used to obtain information matching the preset information category in the target archive according to the second extraction result.
[0098] In one embodiment, the archive information acquisition module 403 is also used to: obtain a third prompt word based on the second extraction result and the text content; input the third prompt word into a third text model so that the third text model optimizes the second extraction result according to the text content and outputs a third extraction result; and obtain information in the target archive that matches the preset information category according to the third extraction result.
[0099] In one embodiment, the archive information acquisition module 403 is further used to: acquire a first similarity between the first extraction result and the second extraction result; and input the third prompt word into a third text model if the first similarity reaches a threshold.
[0100] In one embodiment, the archive information acquisition module 403 is also used to: if the first similarity does not reach a threshold, input the first prompt word into a third text model, so that the third text model extracts information matching a preset information category from the text content and outputs a fourth extraction result; obtain a second similarity between the fourth extraction result and the first extraction result; if the second similarity reaches a threshold, input the second prompt word into the third text model, so that the third text model optimizes the first extraction result and outputs a fifth extraction result; and obtain information matching the preset information category in the target archive according to the fifth extraction result.
[0101] In one embodiment, the archive information acquisition module 403 is also used to: if the second similarity does not reach a threshold, input the fourth prompt word into the second text model, so that the second text model optimizes the fourth extraction result according to the text content and outputs a sixth extraction result; the fourth prompt word is obtained based on the fourth extraction result and the text content; according to the sixth extraction result, obtain information in the target archive that matches the preset information category.
[0102] In one embodiment, the device further includes: a text recognition module, which is used to perform text recognition on the target file to obtain text content if the target file is of a non-text type; the non-text type includes a picture type and an audio and video type.
[0103] Each module in the above archive information extraction device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0104] In an exemplary embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the above method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for extracting information from an archive is implemented.
[0105] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0106] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned various method embodiments when executing the computer program.
[0107] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0108] In one embodiment, a computer program product is provided, on which a computer program is stored, and the computer program is used by a processor to execute the steps in the above-mentioned various method embodiments.
[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0110] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0112] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for extracting information from archives, characterized in that: The method comprises: Based on the text content of the target file and the preset information category, a first prompt word is obtained; inputting the first prompt word into a first text model, so that the first text model extracts information matching a preset information category from the text content and outputs a first extraction result; Obtaining a second prompt word based on the first extraction result and the text content; inputting the second prompt word into a second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result; According to the second extraction result, information matching the preset information category in the target file is obtained.
2. The method according to claim 1, characterized in that According to the second extraction result, information matching the preset information category in the target file is obtained, including: Obtaining a third prompt word based on the second extraction result and the text content; inputting the third prompt word into a third text model, so that the third text model optimizes the second extraction result according to the text content and outputs a third extraction result; According to the third extraction result, information matching the preset information category in the target file is obtained.
3. The method according to claim 2, characterized in that Inputting the third prompt word into the third text model includes: Obtaining a first similarity between the first extraction result and the second extraction result; If the first similarity reaches a threshold, the third prompt word is input into a third text model.
4. The method according to claim 3, characterized in that The method further comprises: If the first similarity does not reach a threshold, inputting the first prompt word into a third text model, so that the third text model extracts information matching a preset information category from the text content and outputs a fourth extraction result; Obtaining a second similarity between the fourth extraction result and the first extraction result; If the second similarity reaches a threshold, inputting the second prompt word into the third text model, so that the third text model optimizes the first extraction result and outputs a fifth extraction result; According to the fifth extraction result, information matching the preset information category in the target file is obtained.
5. The method according to claim 4, characterized in that The method further comprises: If the second similarity does not reach a threshold, inputting a fourth prompt word into the second text model so that the second text model optimizes the fourth extraction result according to the text content and outputs a sixth extraction result; the fourth prompt word is obtained based on the fourth extraction result and the text content; According to the sixth extraction result, information matching the preset information category in the target file is obtained.
6. The method according to any one of claims 1 to 5, characterized in that Before obtaining the first prompt word based on the text content of the target file and the preset information category, the method further includes: If the target file is of a non-text type, text recognition is performed on the target file to obtain text content; the non-text type includes a picture type and an audio and video type.
7. An information extraction device for archives, characterized in that: The device comprises: A prompt word acquisition module, configured to obtain a first prompt word based on the text content of the target file and a preset information category; a prompt word input module, configured to input the first prompt word into a first text model, so that the first text model extracts information matching a preset information category from the text content and outputs a first extraction result; The prompt word acquisition module is further configured to obtain a second prompt word based on the first extraction result and the text content; The prompt word input module is further configured to input the second prompt word into a second text model, so that the second text model optimizes the first extraction result according to the text content and outputs a second extraction result; The file information acquisition module is used to obtain information matching the preset information category in the target file according to the second extraction result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Big model-based document content customized extraction method and system
CN120821835A
