Archive file generation method, device, computer equipment and storage medium
By obtaining and determining the direct and indirect correlation documents of the files to be archived, the target archive file is generated, which solves the problem of low accuracy of archive files in traditional technology and achieves higher archive file integrity and accuracy.
Patent Information
- Application Number
- CN202411967749.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-08
AI Technical Summary
In traditional technology, when generating archive files, due to the large number of documents saved by each system, it is difficult to obtain related documents, which in turn reduces the accuracy of archive files.
By obtaining the multiple set of target key-value pairs corresponding to the file to be archived, the direct association documents and indirect association documents are determined, and the target archive files are generated using these documents to ensure the integrity and accuracy of the information.
Improve the accuracy and completeness of archive files, avoid the omission of directly associated documents, and ensure that the generated archive files provide complete and accurate information.
Smart Images

Figure CN119782256A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an archive file generation method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, paperless office has gradually been realized. Business-related voucher data, business data, invoice data, payment and receipt data, and electronic receipt data can be stored in computer devices for easy query and use.
[0003] In the traditional technology, in the process of generating an archive file corresponding to the file to be archived, it is first necessary to obtain the associated documents related to the file to be archived from each system, and then obtain the archiving information required for the archive file from the associated documents, and then generate the archive file corresponding to the file to be archived based on the archiving information. Since each system stores a large number of documents, it is difficult to obtain the associated documents, which in turn leads to low accuracy of the archive file. Summary of the invention
[0004] Based on this, it is necessary to provide an archive file generation method, device, computer equipment and storage medium that can improve the accuracy of archive files in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for generating an archive file. The method comprises:
[0006] Get multiple target key-value pair sets corresponding to the files to be archived; the target key-value pair sets correspond to the directly associated document types;
[0007] For each target key-value pair set, determine the directly associated document corresponding to the to-be-archived file; the document type of the directly associated document is the same as the directly associated document type corresponding to the target key-value pair set;
[0008] Based on the key-value pairs in the directly associated documents, determine the indirectly associated documents corresponding to the files to be archived;
[0009] Generate target archive files corresponding to the files to be archived based on the files to be archived, directly related documents and indirectly related documents.
[0010] In one embodiment, for each target key-value pair set, determining the directly associated documents corresponding to the to-be-archived files includes:
[0011] Determine candidate associated documents based on the directly associated document type corresponding to the target key-value pair set;
[0012] For each candidate associated document, determine a candidate value corresponding to a target key of a target key-value pair in the target key-value pair set in the candidate associated document;
[0013] Determine the association degree corresponding to the candidate associated document based on the target value corresponding to each target key in the target key-value pair and the candidate value corresponding to each target key;
[0014] Based on the correlation degree corresponding to each candidate related document, the directly related document corresponding to the file to be archived is determined.
[0015] In one embodiment, based on the target value corresponding to the target key in each target key value and the candidate value corresponding to each target key, determining the association degree corresponding to the candidate associated document includes:
[0016] For each target key, determine a first vector of target values corresponding to the target key and a second vector of candidate values corresponding to the target key;
[0017] Determining a similarity corresponding to the target key according to a similarity between a first vector and a second vector corresponding to the target key;
[0018] The similarities corresponding to each target key are counted to obtain the correlation between the candidate associated documents and the files to be archived.
[0019] In one embodiment, based on the key-value pairs in the directly associated documents, determining the indirectly associated documents corresponding to the to-be-archived files includes:
[0020] The key-value pairs in the directly associated document are divided to obtain multiple sets of key-value pairs to be matched; the sets of key-value pairs to be matched correspond to the types of the indirectly associated documents;
[0021] For each set of key-value pairs to be matched, determine the first-level indirect related document corresponding to the file to be archived; the document type of the first-level indirect related document is the same as the type of the indirect related document corresponding to the set of key-value pairs to be matched;
[0022] Based on the value corresponding to the strong association key in the first-level indirect association document, determine the second-level indirect association document corresponding to the file to be archived;
[0023] The first-level indirect related documents and the second-level indirect related documents are determined as the indirect related documents corresponding to the files to be archived.
[0024] In one embodiment, obtaining multiple target key-value pair sets corresponding to the files to be archived includes:
[0025] Identify the files to be archived and obtain the initial key-value pairs in the files to be archived;
[0026] Based on the field mapping relationship table, determine the target key corresponding to the initial key in the initial key-value pair;
[0027] Based on the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key, a target key-value pair is obtained;
[0028] For each preset key set corresponding to the directly associated document type, the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set is determined as the target key-value pair set corresponding to the directly associated document type.
[0029] In one embodiment, generating a target archive file corresponding to the file to be archived based on the file to be archived, the directly associated document, and the indirectly associated document includes:
[0030] Get the archive file template;
[0031] Extract target information from the documents to be archived, directly related documents and indirectly related documents based on the archive document template;
[0032] Generate a target archive file corresponding to the file to be archived based on the archive file template and target information.
[0033] In one embodiment, generating a target archive file corresponding to the file to be archived based on the file to be archived, the directly associated document, and the indirectly associated document includes:
[0034] Get the archive file template;
[0035] The archive file template, the file to be archived, the directly related documents and the indirectly related documents are input into the target large language model to obtain the target archive file corresponding to the file to be archived.
[0036] In a second aspect, the present application also provides an archive file generation device. The device includes:
[0037] An acquisition module, used for acquiring a plurality of target key-value pair sets corresponding to the files to be archived; the target key-value pair sets correspond to the directly associated document types;
[0038] A directly associated document determination module is used to determine, for each target key-value pair set, a directly associated document corresponding to the to-be-archived file; the document type of the directly associated document is the same as the directly associated document type corresponding to the target key-value pair set;
[0039] An indirect related document determination module, used to determine the indirect related document corresponding to the to-be-archived file based on the key-value pair in the direct related document;
[0040] The generation module is used to generate a target archive file corresponding to the file to be archived based on the file to be archived, the directly related documents and the indirectly related documents.
[0041] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0042] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0043] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0044] The above-mentioned archive file generation method, device, computer equipment and storage medium obtain a target key-value pair set corresponding to the file to be archived, and determine the directly associated documents that have a direct association relationship with the file to be archived and whose document type is a directly associated document type through the target key-value pair set and the directly associated document type corresponding to the target key-value pair set, thereby avoiding the omission of directly associated documents, thereby improving the completeness and accuracy of directly associated documents; then determine the indirectly associated documents corresponding to the file to be archived through the key-value pairs in the directly associated documents, that is, determine the indirectly associated documents that have an indirect association relationship with the file to be archived, and generate the target archive file corresponding to the file to be archived according to the file to be archived, the directly associated documents that have a direct association relationship with the file to be archived, and the indirectly associated documents that have an indirect association relationship with the file to be archived, wherein the directly associated documents and the indirectly associated documents provide complete and accurate information for generating the target archive file, thereby improving the accuracy of the target archive file. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 An application environment diagram of an archive file generation method in one embodiment;
[0046] Figure 2 A schematic diagram of a process of generating an archive file in one embodiment;
[0047] Figure 3 A schematic diagram of a flowchart of a step of directly connecting to an associated document determination in an embodiment;
[0048] Figure 4 A schematic diagram of a flowchart of the steps of determining an indirect associated document in one embodiment;
[0049] Figure 5 A schematic diagram of a flowchart of a step of determining a target key-value pair set in one embodiment;
[0050] Figure 6 A schematic diagram of the framework structure of a target key-value pair set determination step in one embodiment;
[0051] Figure 7 A schematic diagram of an archive file generation process in one embodiment;
[0052] Figure 8 A schematic diagram of an archive file generation system in one embodiment;
[0053] Fig. 9 A schematic diagram of a system architecture of an archive file generation solution in one embodiment;
[0054] Fig.10 It is a structural block diagram of an archive file generating device in one embodiment;
[0055] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0056] 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.
[0057] The archive file generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Both the terminal and the server can be used alone to execute the archive file generation method provided in the embodiment of the present application. The terminal and the server can also be used in collaboration to execute the archive file generation method provided in the embodiment of the present application. For example, the terminal 102 obtains multiple target key-value pair sets corresponding to the files to be archived; the target key-value pair sets correspond to the directly associated document types; for each target key-value pair set, the directly associated document corresponding to the file to be archived is determined; the document type of the directly associated document is the same as the directly associated document type corresponding to the target key-value pair set; based on the key-value pairs in the directly associated documents, the indirectly associated documents corresponding to the files to be archived are determined; based on the files to be archived, the directly associated documents and the indirectly associated documents, the target archive files corresponding to the files to be archived are generated. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0058] In one embodiment, Figure 2As shown, a method for generating an archive file is provided, which can be applied to a computer device, which can be a terminal or a server, and can be executed by the terminal or the server itself alone, or can be implemented through interaction between the terminal and the server. This embodiment takes the method applied to a computer device as an example for explanation, and includes steps 202 to 208.
[0059] Step 202, obtaining multiple target key-value pair sets corresponding to the files to be archived; the target key-value pair sets correspond to the directly associated document types.
[0060] Among them, the file to be archived refers to the file for which an archive file needs to be generated, and the file to be archived may be an accounting voucher, a business document, a financial document, etc. The file to be archived may include but is not limited to at least one of structured data and unstructured data. The target key-value pair set refers to a set consisting of target key-value pairs. The target key-value pair refers to a key-value pair used to determine a directly associated document, and the target key-value pair consists of a target key and a target value corresponding to the target key. The number of target key-value pair sets may be one or more, and is not limited here. Multiple target key-value pair sets may include the same target key-value pair. The directly associated document type refers to the type of the directly associated document, which can be understood as the type of the document directly associated with the file to be archived. The directly associated document type may include but is not limited to transaction detail documents, etc. The correspondence between the target key-value pair set and the directly associated document type means that the target key-value pair set corresponds to the directly associated document type one by one, that is, one target key-value pair set corresponds to one directly associated document type.
[0061] Exemplarily, the computer device obtains the file to be archived, pre-processes the file to be archived, and obtains a target key-value pair set directly corresponding to the document type.
[0062] In one embodiment, a computer device obtains a file to be archived, performs identification processing on the file to be archived, and obtains an initial key-value pair; performs mapping processing and slicing processing on the initial key-value pair to obtain a target key-value pair set directly corresponding to the document type.
[0063] Step 204: for each target key-value pair set, determine the directly associated document corresponding to the to-be-archived file; the document type of the directly associated document is the same as the directly associated document type corresponding to the target key-value pair set.
[0064] The directly associated document refers to a document that is determined based on the target key-value pair set and is associated with the file to be archived. The number of directly associated documents can be one or more.
[0065] Exemplarily, for each target key-value pair set, the computer device obtains candidate associated documents whose document type is a directly associated document type based on the directly associated document type corresponding to the target key-value pair set, and determines the directly associated document corresponding to the file to be archived from the candidate associated documents based on the target key-value pair set.
[0066] In one embodiment, based on the directly associated document type corresponding to the target key-value pair set, obtaining a candidate associated document whose document type is the directly associated document type includes: based on the directly associated document type corresponding to the target key-value pair set, determining a target vector database corresponding to the directly associated document type, and determining the document in the target vector database as a candidate associated document.
[0067] Step 206: Determine the indirectly associated document corresponding to the file to be archived based on the key-value pair in the directly associated document.
[0068] Among them, the key-value pair refers to the data combination consisting of the key and value in the directly associated document. The indirectly associated document refers to the document associated with the file to be archived determined based on the directly associated document. The indirectly associated document may include multiple levels of indirectly associated documents, for example, the indirectly associated document includes a first-level indirectly associated document and a second-level indirectly associated document. The number of indirectly associated documents can be one or more.
[0069] Exemplarily, for each directly associated document, the indirectly associated document corresponding to the file to be archived is determined according to the key-value pair in the directly associated document.
[0070] In one embodiment, for each directly associated document, the computer device divides the key-value pairs in the directly associated document to obtain multiple sets of key-value pairs to be matched, and determines the indirectly associated document corresponding to the file to be archived based on the sets of key-value pairs to be matched.
[0071] Step 208: Generate a target archive file corresponding to the file to be archived based on the file to be archived, the directly associated documents and the indirectly associated documents.
[0072] The target archive file refers to the archive file corresponding to the file to be archived. The target archive file may be an XBRL (eXtensible Business Reporting Language) archive file. The XBRL archive file includes information such as voucher data, business data, invoice data, payment data, and electronic receipt data.
[0073] Exemplarily, the computer device obtains an archive file template, and generates a target archive file corresponding to the file to be archived according to the archive file template, the file to be archived, the directly associated documents, and the indirectly associated documents.
[0074] In the above archive file generation method, a target key-value pair set corresponding to the file to be archived is obtained, and a directly associated document having a direct association relationship with the file to be archived and a document type of a directly associated document type is determined through the target key-value pair set and the directly associated document type corresponding to the target key-value pair set, thereby avoiding omission of directly associated documents, thereby improving the completeness and accuracy of directly associated documents; then, the indirectly associated documents corresponding to the file to be archived are determined through the key-value pairs in the directly associated documents, that is, the indirectly associated documents having an indirect association relationship with the file to be archived are determined, and a target archive file corresponding to the file to be archived is generated according to the file to be archived, the directly associated documents having a direct association relationship with the file to be archived, and the indirectly associated documents having an indirect association relationship with the file to be archived, wherein the directly associated documents and the indirectly associated documents provide complete and accurate information for generating the target archive file, thereby improving the accuracy of the target archive file.
[0075] In one embodiment, Figure 3 As shown, for each target key-value pair set, determine the directly associated documents corresponding to the files to be archived, including:
[0076] Step 302: Determine candidate associated documents based on the directly associated document type corresponding to the target key-value pair set.
[0077] The candidate associated document refers to a document used to filter directly associated documents, and the document type of the candidate associated document is a directly associated document type.
[0078] Exemplarily, the computer device obtains the directly associated document type corresponding to the target key-value pair set, and determines a document whose document type is the directly associated document type as a candidate associated document.
[0079] In one embodiment, the computer device obtains the directly associated document type corresponding to the target key-value pair set, determines the vector database corresponding to the directly associated document type as the target vector database, and determines the document in the target vector database as the candidate associated document. That is, there are multiple vector databases, and the vector databases correspond to the directly associated document type.
[0080] Step 304: for each candidate associated document, determine the candidate value corresponding to the target key of the target key-value pair in the target key-value pair set in the candidate associated document.
[0081] The target key refers to the parameter name in the target key-value pair, such as transaction date, debit amount, credit amount, and bank account number. The candidate value refers to the value corresponding to the target key in the candidate associated document.
[0082] Exemplarily, for each candidate associated document, the computer device obtains, from the candidate associated document, a candidate value corresponding to a target key of a target key-value pair in a target key-value pair set.
[0083] Step 306: Determine the association degree corresponding to the candidate associated document based on the target value corresponding to each target key in the target key-value pair and the candidate value corresponding to each target key.
[0084] The target value refers to the value corresponding to the target key in the target key-value pair. The correlation degree refers to the correlation degree between the file to be archived and the candidate associated document. The greater the correlation degree, the higher the correlation degree between the file to be archived and the candidate associated document. The smaller the correlation degree, the lower the correlation degree between the file to be archived and the candidate associated document.
[0085] Exemplarily, the computer device determines the degree of association corresponding to the candidate associated document based on the target value corresponding to each target key in the target key-value pair and the candidate value corresponding to each target key.
[0086] In one embodiment, the computer device determines a target vector based on the target values corresponding to each target key in the target key-value pair, determines a candidate vector based on the candidate values corresponding to each target key, and determines the degree of association corresponding to the candidate associated document based on the similarity between the target vector and the candidate vector.
[0087] Step 308: Determine the directly associated document corresponding to the file to be archived based on the degree of association corresponding to each candidate associated document.
[0088] Exemplarily, the computer device compares the correlation degrees corresponding to the candidate correlation documents to obtain the maximum correlation degree, and determines the candidate correlation document corresponding to the maximum correlation degree as the directly correlated document corresponding to the file to be archived.
[0089] In one embodiment, the computer device compares the relevance corresponding to each candidate associated document with the relevance threshold. If the relevance is greater than the relevance threshold, the candidate associated document corresponding to the relevance is determined as a directly associated document corresponding to the file to be archived.
[0090] In this embodiment, through the directly associated document type corresponding to the target key-value pair set, the document of the directly associated document type is determined as the candidate associated document, and for each candidate associated document, the candidate value corresponding to the target key of the target key-value pair in the target key-value pair set in the candidate associated document is determined, and the correlation corresponding to the candidate associated document is determined based on the target value corresponding to each target key in the target key-value pair and the candidate value corresponding to each target key, and the directly associated document corresponding to the to-be-filed file is determined according to the correlation corresponding to each candidate associated document. It can be understood that the target value corresponding to the target key represents the feature information of the to-be-filed file, and the candidate value corresponding to the target key represents the feature information of the candidate associated document. According to the feature information of the to-be-filed file and the feature information of the candidate associated document, the correlation between the to-be-filed file and the candidate associated document is determined, which improves the accuracy of the correlation, thereby improving the accuracy of the determination of the directly associated document. Moreover, the directly associated document corresponding to each directly associated document type is determined separately, which avoids the omission of the directly associated document, thereby improving the integrity of the directly associated document.
[0091] In one embodiment, based on the target value corresponding to the target key in each target key value and the candidate value corresponding to each target key, determining the association degree corresponding to the candidate associated document includes:
[0092] For each target key, determine a first vector of the target value corresponding to the target key and a second vector of the candidate value corresponding to the target key; determine the similarity corresponding to the target key based on the similarity between the first vector and the second vector corresponding to the target key; perform statistics on the similarities corresponding to each target key to obtain the correlation between the candidate associated document and the file to be archived.
[0093] The first vector refers to a vector representing a target value, and the second vector refers to a vector representing a candidate value. Similarity refers to a value representing the similarity between the first vector and the second vector. The greater the similarity, the higher the similarity between the first vector and the second vector, and the smaller the similarity, the lower the similarity between the first vector and the second vector.
[0094] Exemplarily, for each target key, the computer device determines a first vector of target values corresponding to the target key, determines a second vector of candidate values corresponding to the target key, calculates the similarity between the first vector and the second vector corresponding to the target key, obtains the similarity corresponding to the target key, and then accumulates the similarities corresponding to each target key to obtain the association between the candidate associated documents and the files to be archived.
[0095] In one embodiment, when the candidate association document is located in the target vector database, determining the second vector of the candidate value corresponding to the target key includes: obtaining the second vector of the candidate value corresponding to the target key from the candidate association document. That is, the candidate association document located in the target vector database includes the candidate value corresponding to the target key and the second vector corresponding to the candidate value.
[0096] In this embodiment, by determining the first vector of the target value corresponding to the target key and the second vector of the candidate value corresponding to the target key, the similarity corresponding to the target key can be determined according to the similarity between the first vector and the second vector corresponding to the target key, and then the similarity corresponding to each target key is counted to obtain the correlation between the candidate associated documents and the files to be archived. It can be understood that first, the similarity corresponding to the target key of each dimension is determined respectively, and then the correlation between the candidate associated documents and the files to be archived is determined according to the similarity corresponding to the target keys of each dimension, thereby improving the accuracy of the correlation, and converting the correlation between the candidate associated documents and the files to be archived into a numerical value, thereby providing accurate basic data for the subsequent determination of directly associated documents.
[0097] In one embodiment, Figure 4 As shown, based on the key-value pairs in the directly associated documents, the indirectly associated documents corresponding to the files to be archived are determined, including:
[0098] Step 402, the key-value pairs in the directly associated document are divided to obtain a plurality of sets of key-value pairs to be matched; the sets of key-value pairs to be matched correspond to the types of the indirectly associated documents.
[0099] Among them, the key-value pair set to be matched refers to a set consisting of key-value pairs to be matched. The key-value pairs to be matched refer to key-value pairs used to determine indirectly associated documents, and the key-value pairs to be matched are key-value pairs in directly associated documents. The indirectly associated document type refers to the document type of the indirectly associated document. The correspondence between the key-value pair set to be matched and the indirectly associated document type refers to the one-to-one correspondence between the key-value pair set to be matched and the indirectly associated document type, that is, each key-value pair set to be matched corresponds to one directly associated document type.
[0100] Exemplarily, the computer device obtains multiple key-value pairs from the directly associated document, obtains multiple indirect associated keys corresponding to the indirectly associated document type for each indirectly associated document type, determines the key-value pair corresponding to the key that is the same as the indirect associated key as the key-value pair to be matched, and determines the multiple key-value pairs to be matched corresponding to the indirectly associated document type as a set of key-value pairs to be matched. The indirect associated key refers to a pre-set key corresponding to the indirectly associated document type.
[0101] Step 404: for each set of key-value pairs to be matched, determine the first-level indirect associated document corresponding to the file to be archived; the document type of the first-level indirect associated document is the same as the type of the indirect associated document corresponding to the set of key-value pairs to be matched.
[0102] Among them, the first-level indirect associated document refers to a document that is determined based on the set of key-value pairs to be matched and has an associated relationship with the file to be archived. It can be understood as a document that is indirectly determined based on the directly associated document and has an indirect associated relationship with the file to be archived.
[0103] Exemplarily, the computer device determines the indirect associated document type corresponding to the set of key-value pairs to be matched, determines a document whose document type is the indirect associated document type as an indirect candidate document, and determines the first-level indirect associated document corresponding to the file to be archived from the indirect candidate documents based on the set of key-value pairs to be matched.
[0104] In one embodiment, based on a set of to-be-matched key-value pairs, determining a first-level indirect associated document corresponding to a to-be-archived file from indirect candidate documents includes: determining, for each indirect candidate document, an indirect candidate value corresponding to a to-be-matched key of a to-be-matched key-value pair in the set of to-be-matched key-value pairs in the indirect candidate document; determining a correlation degree corresponding to the indirect candidate document based on the to-be-matched values corresponding to each to-be-matched key in the to-be-matched key-value pair and the indirect candidate value corresponding to each to-be-matched key; and determining a first-level indirect associated document corresponding to the to-be-archived file based on the correlation degrees corresponding to each indirect candidate document.
[0105] Step 406: Determine the second-level indirect association document corresponding to the file to be archived based on the value corresponding to the strong association key in the first-level indirect association document.
[0106] Among them, the strong association key refers to the key corresponding to the value of the second-level indirect association document that is directly determined. It can be understood that the first-level indirect association document includes a value that can directly determine the second-level indirect association document, and the key corresponding to the value is the strong association key. The second-level indirect association document refers to a document that has a strong association relationship with the first-level indirect association document. It can be understood that the first-level indirect association document has an association relationship with the file to be archived, and the second-level indirect association document has a strong association relationship with the first-level indirect association document. Therefore, the second-level indirect association document also has an association relationship with the file to be archived.
[0107] Exemplarily, the computer device obtains a value corresponding to a strong association key from a primary indirect association document, and determines a secondary indirect association document corresponding to the file to be archived based on the value corresponding to the strong association key.
[0108] Step 408: determine the first-level indirect related documents and the second-level indirect related documents as the indirect related documents corresponding to the files to be archived.
[0109] Exemplarily, the computer device determines the first-level indirect related document and the second-level indirect related document as the indirect related documents corresponding to the file to be archived.
[0110] In this embodiment, firstly, according to the set of to-be-matched key-value pairs corresponding to the directly associated documents, the first-level indirectly associated documents having an associated relationship with the file to be archived are indirectly determined, and then according to the value corresponding to the strong associated key in the first-level indirectly associated document, the second-level indirectly associated document corresponding to the file to be archived is determined, that is, the second-level indirectly associated document has a strong associated relationship with the first-level indirect associated document, and the first-level indirect associated document has an associated relationship with the file to be archived, so the second-level indirectly associated document also has an associated relationship with the file to be archived, and the first-level indirectly associated document and the second-level indirectly associated document are determined as the indirectly associated documents corresponding to the file to be archived, thereby improving the integrity of the indirectly associated documents.
[0111] In one embodiment, Figure 5 As shown, multiple target key-value pair sets corresponding to the files to be archived are obtained, including:
[0112] Step 502: Identify the file to be archived and obtain the initial key-value pairs in the file to be archived.
[0113] The initial key-value pair refers to the key-value pair obtained from the file to be archived.
[0114] Exemplarily, when the file format of the file to be archived is Portable Document Format (PDF), the computer device performs OCR (Optical Character Recognition) on the file to be archived to obtain initial key-value pairs in the file to be archived.
[0115] In one embodiment, when the file format of the file to be archived is an open fixed-layout document (OFD), the computer device performs OFD document conversion on the file to be archived to obtain initial key-value pairs in the file to be archived.
[0116] Step 504: Determine the target key corresponding to the initial key in the initial key-value pair based on the field mapping relationship table.
[0117] The field mapping relationship table refers to a table containing multiple sets of mapping relationships between fields. The field mapping relationship table can be preset.
[0118] Exemplarily, the computer device obtains a field mapping relationship table, and determines in the field mapping relationship table a target key corresponding to an initial key in an initial key-value pair.
[0119] Step 506: Obtain a target key-value pair based on the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key.
[0120] Exemplarily, the computer device composes a target key-value pair with the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key.
[0121] Step 508: for each preset key set corresponding to the directly associated document type, the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set is determined as the target key-value pair set corresponding to the directly associated document type.
[0122] The preset key set refers to a set of preset keys. Each directly associated document type corresponds to a preset key set, and the corresponding relationship between the directly associated document type and the preset key set can be preset.
[0123] Exemplarily, for each preset key set corresponding to the directly associated document type, the computer device determines the target key-value pairs corresponding to the target keys that are the same as the preset keys in the preset key set as the target key-value pair set corresponding to the directly associated document type.
[0124] In one embodiment, the schematic diagram of the framework structure of the target key-value pair set determination step is as follows: Figure 6 As shown, the to-be-archived file is identified to obtain the initial key-value pair in the to-be-archived file; based on the field mapping relationship table, the target key corresponding to the initial key in the initial key-value pair is determined, and the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key form a target key-value pair; for each preset key set corresponding to the directly associated document type, the computer device determines the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set as the target key-value pair set corresponding to the directly associated document type.
[0125] In this embodiment, by identifying the files to be archived, unstructured data is converted into structured data, and initial key-value pairs in the files to be archived are obtained. In order to avoid the initial key in the initial key-value pair being a non-standard key, the target key corresponding to the initial key in the initial key-value pair is determined according to the field mapping relationship table, and then the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key are combined to form a target key-value pair. The target key in the target key-value pair is a standard key, which lays a foundation for later determination of the association between the candidate associated documents and the files to be archived. For each preset key set corresponding to the directly associated document type, the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set is determined as the target key-value pair set corresponding to the directly associated document type, providing accurate basic data for subsequent determination of the directly associated documents.
[0126] In one embodiment, generating a target archive file corresponding to the file to be archived based on the file to be archived, the directly associated document, and the indirectly associated document includes:
[0127] Obtain an archive file template; based on the archive file template, extract target information from the file to be archived, directly related documents and indirectly related documents; based on the archive file template and the target information, generate a target archive file corresponding to the file to be archived.
[0128] The archive file template refers to a template used to generate a target archive file. The archive file template may correspond to the file type of the file to be archived, that is, different types of files to be archived have different archive file templates. The target information refers to the information that needs to be filled in the archive file template, which can be understood as the information required to generate the target archive file according to the archive file template.
[0129] Exemplarily, after determining the directly related documents and indirectly related documents corresponding to the file to be archived, the computer device obtains the archive file template corresponding to the file to be archived, extracts the target information required by the archive file template from the file to be archived, the directly related documents and the indirectly related documents, fills the target information into the archive file template, and obtains the target archive file corresponding to the file to be archived.
[0130] In this embodiment, by extracting target information from the file to be archived, the directly associated documents that have a direct association with the file to be archived, and the indirectly associated documents that have an indirect association with the file to be archived, the integrity of the target information is improved, and the target information is filled into the archive file template to obtain the target archive file corresponding to the file to be archived, thereby improving the accuracy of the target archive file.
[0131] In one embodiment, generating a target archive file corresponding to the file to be archived based on the file to be archived, the directly associated document, and the indirectly associated document includes:
[0132] Obtain an archive file template; input the archive file template, the file to be archived, the directly related documents and the indirectly related documents into the target large language model to obtain a target archive file corresponding to the file to be archived.
[0133] The target large language model refers to a trained large language model (LLM). The input of the target large language model is the archive file template, the file to be archived, the directly related documents and the indirectly related documents, and the output is the target archive file.
[0134] Exemplarily, after determining the directly associated documents and indirectly associated documents corresponding to the file to be archived, the computer device obtains the archive file template corresponding to the file to be archived, inputs the archive file template, the file to be archived, the directly associated documents and the indirectly associated documents into the target large language model, the target large language model outputs the target archive file corresponding to the file to be archived, and the computer device obtains the target archive file corresponding to the file to be archived.
[0135] In this embodiment, a trained target large language model is used to generate a target archive file based on an archive file template, files to be archived, directly associated documents, and indirectly associated documents. The archive file template, files to be archived, directly associated documents, and indirectly associated documents provide complete and accurate information for the target large language model to generate the target archive file, thereby improving the accuracy of the target archive file.
[0136] In an exemplary embodiment, the schematic diagram of the archive file generation process is as follows: Figure 7 As shown, the computer device obtains the files to be archived from the bank and the enterprise, such as the OFD electronic receipt or the electronic statement; obtains the initial key-value pairs in the files to be archived by performing OCR recognition or OFD document conversion on the files to be archived; determines the directly related documents based on the initial key-value pairs in the files to be archived, such as the related transaction details; then determines the first-level indirect related documents based on the directly related documents, such as the related business documents; then determines the second-level indirect related documents based on the first-level indirect related documents, such as the voucher; then extracts the target information from the files to be archived, the directly related documents, the first-level indirect related documents and the second-level indirect related documents, fills the target information into the archive file template, and obtains the target archive file corresponding to the files to be archived.
[0137] The schematic diagram of the archive file generation system is as follows Figure 8 As shown, it includes an information extraction module, a preprocessing template, an indexing module, a retrieval module and a large language model. The information extraction module is used to perform text structure recognition and table structure recognition on the files to be archived, and obtain the initial key-value pairs in the files to be archived. The preprocessing module is used to obtain the field mapping relationship table, determine the target key corresponding to the initial key in the initial key-value pair in the field mapping relationship table, and form a target key-value pair with the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key. For each preset key set corresponding to the directly associated document type, the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set is determined as the target key-value pair set corresponding to the directly associated document type. The indexing module is used to generate a vector database.
[0138] The retrieval module is used to obtain the type of directly associated document corresponding to the target key-value pair set, and determine the document whose document type is the directly associated document type as the candidate associated document; for each candidate associated document, obtain the candidate value corresponding to the target key of the target key-value pair in the target key-value pair set from the candidate associated document; for each target key, determine the first vector of the target value corresponding to the target key, determine the second vector of the candidate value corresponding to the target key, calculate the similarity between the first vector and the second vector corresponding to the target key, and obtain the similarity corresponding to the target key; then accumulate the similarities corresponding to each target key to obtain the association between the candidate associated document and the file to be archived; compare the associations corresponding to each candidate associated document to obtain the maximum association, and determine the candidate associated document corresponding to the maximum association as the directly associated document corresponding to the file to be archived.
[0139] The retrieval module is used to obtain multiple key-value pairs from the directly associated document, obtain multiple indirect associated keys corresponding to the indirectly associated document type for each indirectly associated document type, determine the key-value pair corresponding to the key that is the same as the indirect associated key as the key-value pair to be matched, and determine the multiple key-value pairs to be matched corresponding to the indirectly associated document type as a set of key-value pairs to be matched; determine the indirectly associated document type corresponding to the set of key-value pairs to be matched, determine the document type of the indirectly associated document type as an indirect candidate document, and determine the first-level indirect associated document corresponding to the to-be-archived file from the indirect candidate documents based on the set of key-value pairs to be matched; obtain the value corresponding to the strong associated key from the first-level indirect associated document, and determine the second-level indirect associated document corresponding to the to-be-archived file based on the value corresponding to the strong associated key.
[0140] The retrieval module is used to input the archive file template, the file to be archived, the directly related documents, the first-level indirectly related documents and the second-level indirectly related documents into the large language model, and the large language model outputs the target archive file corresponding to the file to be archived.
[0141] The system architecture diagram of the archive file generation solution is as follows Fig. 9 As shown, the operator sends a request for generating a target archive file and the file to be archived to the web proxy service, and the web proxy service sends the file to be archived to the RAG (Retrieval-Augmented Generation) module.
[0142] The RAG module identifies the files to be archived and obtains the initial key-value pairs in the files to be archived; obtains the field mapping relationship table, determines the target key corresponding to the initial key in the initial key-value pair in the field mapping relationship table, and forms a target key-value pair with the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key; for each preset key set corresponding to the directly associated document type, the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set is determined as the target key-value pair set corresponding to the directly associated document type.
[0143] The RAG module obtains the directly associated document type corresponding to the target key-value pair set, and determines the document whose document type is the directly associated document type as the candidate associated document; for each candidate associated document, obtains the candidate value corresponding to the target key of the target key-value pair in the target key-value pair set from the candidate associated document; for each target key, determines the first vector of the target value corresponding to the target key, determines the second vector of the candidate value corresponding to the target key, calculates the similarity between the first vector and the second vector corresponding to the target key, and obtains the similarity corresponding to the target key; then accumulates the similarities corresponding to each target key to obtain the association between the candidate associated document and the file to be archived; compares the associations corresponding to each candidate associated document to obtain the maximum association, and determines the candidate associated document corresponding to the maximum association as the directly associated document corresponding to the file to be archived.
[0144] The RAG module obtains multiple key-value pairs from the directly associated document, obtains multiple indirect associated keys corresponding to the indirectly associated document type for each indirectly associated document type, determines the key-value pair corresponding to the key that is the same as the indirect associated key as the key-value pair to be matched, and determines the multiple key-value pairs to be matched corresponding to the indirectly associated document type as a set of key-value pairs to be matched; determines the indirectly associated document type corresponding to the set of key-value pairs to be matched, determines the document type of the indirectly associated document type as an indirect candidate document, and determines the first-level indirect associated document corresponding to the to-be-archived file from the indirect candidate documents based on the set of key-value pairs to be matched; obtains the value corresponding to the strong associated key from the first-level indirect associated document, and determines the second-level indirect associated document corresponding to the to-be-archived file based on the value corresponding to the strong associated key.
[0145] The RAG module inputs the archive file template, the file to be archived, the directly related documents, the first-level indirectly related documents and the second-level indirectly related documents into the large language model, and the large language model outputs the target archive file corresponding to the file to be archived. The RAG module sends the target archive file to the web proxy service, and the web proxy service responds to the request to generate the target archive file and displays the target archive file for the convenience of operators to review and audit.
[0146] In the above archive file generation method, a target key-value pair set corresponding to the file to be archived is obtained, and a directly associated document having a direct association relationship with the file to be archived and a document type of a directly associated document type is determined through the target key-value pair set and the directly associated document type corresponding to the target key-value pair set, thereby avoiding omission of directly associated documents, thereby improving the completeness and accuracy of directly associated documents; then, the indirectly associated documents corresponding to the file to be archived are determined through the key-value pairs in the directly associated documents, that is, the indirectly associated documents having an indirect association relationship with the file to be archived are determined, and a target archive file corresponding to the file to be archived is generated according to the file to be archived, the directly associated documents having a direct association relationship with the file to be archived, and the indirectly associated documents having an indirect association relationship with the file to be archived, wherein the directly associated documents and the indirectly associated documents provide complete and accurate information for generating the target archive file, thereby improving the accuracy of the target archive file.
[0147] 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.
[0148] Based on the same inventive concept, the embodiment of the present application also provides an archive file generation device for implementing the archive file generation 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 one or more archive file generation device embodiments provided below can refer to the limitations of the archive file generation method above, and will not be repeated here.
[0149] In one embodiment, Fig.10 As shown, a device for generating an archive file is provided, comprising: an acquisition module 1002, a directly associated document determination module 1004, an indirectly associated document determination module 1006 and a generation module 1008, wherein:
[0150] The acquisition module 1002 is used to acquire multiple target key-value pair sets corresponding to the files to be archived; the target key-value pair sets correspond to the directly associated document types;
[0151] A directly associated document determination module 1004 is used to determine, for each target key-value pair set, a directly associated document corresponding to the to-be-archived file; the document type of the directly associated document is the same as the directly associated document type corresponding to the target key-value pair set;
[0152] An indirect related document determination module 1006, for determining the indirect related document corresponding to the to-be-archived file based on the key-value pairs in the direct related document;
[0153] The generating module 1008 is used to generate a target archive file corresponding to the file to be archived based on the file to be archived, the directly associated documents and the indirectly associated documents.
[0154] In one embodiment, the directly associated document determining module 1004 is further used to: determine candidate associated documents based on the directly associated document type corresponding to the target key-value pair set; determine, for each candidate associated document, a candidate value corresponding to a target key of a target key-value pair in the target key-value pair set in the candidate associated document; determine a degree of association corresponding to the candidate associated document based on a target value corresponding to each target key in the target key-value pair and a candidate value corresponding to each target key; and determine a directly associated document corresponding to the to-be-archived file based on a degree of association corresponding to each candidate associated document.
[0155] In one embodiment, the directly associated document determination module 1004 is also used to: for each target key, determine a first vector of a target value corresponding to the target key, and a second vector of a candidate value corresponding to the target key; determine the similarity corresponding to the target key based on the similarity between the first vector and the second vector corresponding to the target key; and perform statistics on the similarities corresponding to each target key to obtain the degree of association between the candidate associated document and the file to be archived.
[0156] In one embodiment, the indirect association document determination module 1006 is further used to: divide the key-value pairs in the directly associated document to obtain multiple sets of key-value pairs to be matched; the sets of key-value pairs to be matched correspond to the types of indirectly associated documents; for each set of key-value pairs to be matched, determine the first-level indirect association document corresponding to the file to be archived; the document type of the first-level indirect association document is the same as the type of the indirect association document corresponding to the set of key-value pairs to be matched; based on the value corresponding to the strong association key in the first-level indirect association document, determine the second-level indirect association document corresponding to the file to be archived; determine the first-level indirect association document and the second-level indirect association document as the indirect association documents corresponding to the file to be archived.
[0157] In one embodiment, the acquisition module 1002 is also used to: identify the files to be archived and obtain the initial key-value pairs in the files to be archived; determine the target key corresponding to the initial key in the initial key-value pair based on the field mapping relationship table; obtain the target key-value pair based on the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key; for each preset key set corresponding to the directly associated document type, determine the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set as the target key-value pair set corresponding to the directly associated document type.
[0158] In one embodiment, the generation module 1008 is also used to: obtain an archive file template; extract target information from the file to be archived, directly related documents and indirectly related documents based on the archive file template; generate a target archive file corresponding to the file to be archived based on the archive file template and the target information.
[0159] In one embodiment, the generation module 1008 is further used to: obtain an archive file template; input the archive file template, the file to be archived, the directly associated documents and the indirectly associated documents into the target large language model to obtain a target archive file corresponding to the file to be archived.
[0160] Each module in the above-mentioned archive file generation 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.
[0161] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for generating an archive file is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0162] Those skilled in the art will understand that Fig.11 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.
[0163] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0164] 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.
[0165] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0166] 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.
[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 this application can include at least one of non-volatile 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), magnetoresistive 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, etc., but are not limited to this.
[0168] 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 specification.
[0169] 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 generating an archive file, characterized in that: The method comprises: Acquire multiple target key-value pair sets corresponding to the files to be archived; the target key-value pair sets correspond to directly associated document types; For each of the target key-value pair sets, determining a directly associated document corresponding to the to-be-archived file; the document type of the directly associated document is the same as the directly associated document type corresponding to the target key-value pair set; Determining the indirectly associated document corresponding to the to-be-archived file based on the key-value pair in the directly associated document; A target archive file corresponding to the file to be archived is generated based on the file to be archived, the directly related documents and the indirectly related documents.
2. The method according to claim 1, characterized in that The step of determining, for each of the target key-value pair sets, a directly associated document corresponding to the to-be-archived file, includes: Determining candidate associated documents based on the directly associated document type corresponding to the target key-value pair set; For each of the candidate associated documents, determining a candidate value corresponding to a target key of a target key-value pair in the target key-value pair set in the candidate associated document; Determine the association degree corresponding to the candidate associated document based on the target value corresponding to each of the target keys in the target key-value pair and the candidate value corresponding to each of the target keys; Based on the correlation degree corresponding to each of the candidate related documents, a directly related document corresponding to the to-be-archived file is determined.
3. The method according to claim 2, characterized in that The determining, based on the target value corresponding to the target key in each of the target key values and the candidate value corresponding to each of the target keys, the degree of association corresponding to the candidate associated documents includes: For each of the target keys, determining a first vector of target values corresponding to the target key and a second vector of candidate values corresponding to the target key; Determining the similarity corresponding to the target key according to the similarity between the first vector and the second vector corresponding to the target key; The similarities corresponding to the target keys are counted to obtain the correlation between the candidate associated documents and the files to be archived.
4. The method according to claim 1, characterized in that: The determining, based on the key-value pair in the directly associated document, the indirectly associated document corresponding to the to-be-archived file includes: The key-value pairs in the directly associated document are divided to obtain a plurality of sets of key-value pairs to be matched; the sets of key-value pairs to be matched correspond to the types of indirectly associated documents; For each of the to-be-matched key-value pair sets, determining a first-level indirectly associated document corresponding to the to-be-archived file; the document type of the first-level indirectly associated document is the same as the type of the indirectly associated document corresponding to the to-be-matched key-value pair set; Determining the second-level indirect association document corresponding to the file to be archived based on the value corresponding to the strong association key in the first-level indirect association document; The first-level indirect related document and the second-level indirect related document are determined as the indirect related documents corresponding to the file to be archived.
5. The method according to claim 1, characterized in that The step of obtaining a plurality of target key-value pair sets corresponding to the files to be archived includes: Identifying the file to be archived to obtain an initial key-value pair in the file to be archived; Determine, based on the field mapping relationship table, a target key corresponding to an initial key in the initial key-value pair; Obtain a target key-value pair based on the value corresponding to the initial key in the initial key-value pair and the target key corresponding to the initial key; For each preset key set corresponding to the directly associated document type, the target key-value pair corresponding to the target key that is the same as the preset key in the preset key set is determined as the target key-value pair set corresponding to the directly associated document type.
6. The method according to claim 1, characterized in that The step of generating a target archive file corresponding to the file to be archived based on the file to be archived, the directly related documents and the indirectly related documents includes: Get the archive file template; Based on the archive file template, extracting target information from the to-be-archived file, the directly related documents and the indirectly related documents; Based on the archive file template and the target information, a target archive file corresponding to the file to be archived is generated.
7. The method according to claim 1, characterized in that The step of generating a target archive file corresponding to the file to be archived based on the file to be archived, the directly related documents and the indirectly related documents includes: Get the archive file template; The archive file template, the file to be archived, the directly related documents and the indirectly related documents are input into a target large language model to obtain a target archive file corresponding to the file to be archived.
8. An archive file generating device, characterized in that: The device comprises: An acquisition module, used to acquire a plurality of target key-value pair sets corresponding to the files to be archived; the target key-value pair sets correspond to the directly associated document types; A directly associated document determination module, used for determining, for each of the target key-value pair sets, a directly associated document corresponding to the to-be-archived file; the document type of the directly associated document is the same as the directly associated document type corresponding to the target key-value pair set; An indirect related document determination module, used to determine the indirect related document corresponding to the to-be-archived file based on the key-value pair in the directly related document; A generating module is used to generate a target archive file corresponding to the file to be archived based on the file to be archived, the directly related documents and the indirectly related documents.
9. 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 steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Intelligent matching method of receipt file and voucher file and related device
CN121980287A
Intelligent matching method and related device for return receipt documents and voucher documents
CN121980287B