File processing method, device, server and readable storage medium
By obtaining file types and specifications, classifying paragraphs, and automatically reviewing documents, the problem of low document review efficiency in the existing technology is solved, and rapid and accurate document review is achieved.
Patent Information
- Application Number
- CN202210709132.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-06-22
AI Technical Summary
The file review efficiency in the existing technology is low, requiring manual review of file contents one by one, resulting in low efficiency and possible omissions.
By obtaining the types of documents to be reviewed and corresponding document specifications, the paragraphs of the documents to be reviewed are classified, and the review results are determined based on the paragraph types, thereby automating the review and improving review efficiency.
Without word-for-word matching, document review can be completed through paragraph type matching, which significantly improves the efficiency and accuracy of document review and reduces the time and error rate of manual review.
Smart Images

Figure CN115098629B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of file processing technology, and specifically relates to a file processing method, device, server and readable storage medium. Background Art
[0002] With the continuous development of smart devices (such as smartphones, laptops, desktop computers, etc.), documents (such as contracts, etc.) that need to be signed for different businesses can be completed on smart devices, and the business volume of different businesses is growing rapidly. In order to ensure the compliance of documents, it is necessary to review the documents. At present, the review of documents is usually completed by staff checking the contents of the documents one by one, which is inefficient. Summary of the invention
[0003] The embodiments of the present application provide a file processing method, device, server and readable storage medium for improving the efficiency of file review.
[0004] In a first aspect, a file processing method is provided, comprising:
[0005] Obtaining the file to be reviewed and determining the file type of the file to be reviewed;
[0006] Obtaining a file specification corresponding to the file type and a plurality of first paragraph types of the file specification;
[0007] Classifying the paragraphs of the document to be reviewed to obtain a plurality of second paragraph types of the document to be reviewed;
[0008] The audit result of the to-be-audited document is determined according to the plurality of first paragraph types and the plurality of second paragraph types.
[0009] In a second aspect, a file processing device is provided, the device comprising:
[0010] A determination module, used to obtain the file to be reviewed and determine the file type of the file to be reviewed;
[0011] An acquisition module, used for acquiring a file specification corresponding to the file type and a plurality of first paragraph types of the file specification;
[0012] A classification module, used for classifying the paragraphs of the document to be reviewed to obtain a plurality of second paragraph types of the document to be reviewed;
[0013] The audit module is used to determine the audit result of the to-be-audited document according to the multiple first paragraph types and the multiple second paragraph types.
[0014] In a third aspect, a server is provided, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0015] In a fourth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.
[0017] In an embodiment of the present application, the file to be reviewed is first obtained. Since there are many types of files, and the file specifications corresponding to each file type are also different, it is necessary to determine the file type of the file to be reviewed, and then obtain the file specification corresponding to the file type of the file to be reviewed, as well as multiple first paragraph types of the file specification, and classify the paragraphs of the file to be reviewed to obtain multiple second paragraph types of the file to be reviewed. Finally, the review result of the file to be reviewed is determined based on the multiple first paragraph types and the multiple second paragraph types. By classifying the paragraphs of the file to be reviewed and the paragraphs of the file specification corresponding to the file to be reviewed, the first paragraph type of each paragraph in the file to be reviewed and the second paragraph type of each paragraph in the file specification can be determined. By determining a paragraph type for each paragraph of the file to be reviewed and the file specification, when reviewing the file, it is only necessary to determine whether the paragraph type of each paragraph in the file to be reviewed matches each paragraph type in the file specification, without the need to match word by word, thereby improving the efficiency of file review. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flowchart of a file processing method provided by an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a file processing device provided by an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of the structure of a server provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0023] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0024] In order to ensure the quality of documents, it is necessary to review the documents. However, since the number of pages of documents ranges from a dozen to dozens to hundreds of pages, and the number of documents is also large, the existing manual review of documents is time-consuming and labor-intensive, inefficient, and may be missed. In order to solve the above problems, this solution proposes a document processing method that uses computers to review documents, realizes the automation of review, and improves the efficiency of document review.
[0025] The following, in conjunction with the accompanying drawings, describes in detail the file processing method, device, server, and readable storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0026] like Figure 1 As shown, an embodiment of the present application provides a file processing method, which may include the contents shown in S101 to S104.
[0027] In S101, a file to be reviewed is obtained, and the file type of the file to be reviewed is determined.
[0028] Among them, the documents to be reviewed can be contracts, and the document types include sales contracts, electricity, water, gas, and heat supply contracts, gift contracts, loan contracts, lease contracts, construction contracts, transportation contracts, technical contracts, custody contracts, warehousing contracts, entrustment contracts, etc. Each contract has its corresponding contract specifications, which refer to the standards for contract review. For different types of contracts, some specifications will be written for review, such as: "The contract must state that the parties have delivered the original transaction contract that has been properly signed and stamped with the official seal", "The contract must state that the proportion of investment in XX products is not more than 10%", etc.
[0029] There are many ways to determine the file type of the file to be reviewed. For example, the file type information of the file itself can be used for classification, the file type can be determined by the file title, or some keywords and paragraph information in the file can be obtained and classified using a file classification model. The method of classification using a file classification model is described in detail in the subsequent embodiments and is not described in detail in this embodiment. The paragraph information includes the first paragraph, the middle paragraph, and the ending paragraph.
[0030] In S102, a file specification corresponding to the file type and a plurality of first paragraph types of the file specification are obtained.
[0031] After the file type of the file to be reviewed is determined, a file specification corresponding to the file type is obtained. The file specification includes multiple paragraphs, each paragraph has a corresponding paragraph type, and the paragraph types of the paragraphs may be the same or different, depending on the specific content of the paragraphs.
[0032] It is worth noting that the multiple first paragraph types of the file specification can be pre-classified and stored in the database, and can be directly called when used, or they can be classified in this application to determine the multiple first paragraph types of the file specification, and then stored in the database, and can be directly used later. This is not specifically limited in this application.
[0033] In S103, the paragraphs of the document to be reviewed are classified to obtain a plurality of second paragraph types of the document to be reviewed.
[0034] In the embodiment of the present application, since the document to be reviewed includes multiple paragraphs, each paragraph can be classified and then matched with each paragraph type in the file specification to determine whether the document to be reviewed can be reviewed. By classifying the paragraphs, it is not necessary to match word by word, so that the document can be reviewed quickly, thereby improving the efficiency of the document review. Therefore, it is necessary to divide the document to be reviewed into multiple paragraphs, and then classify each paragraph according to a preset method to obtain multiple second paragraph types of the document to be reviewed.
[0035] Among them, the preset method may include multiple methods, and the paragraphs may be classified according to the keywords in each paragraph, or the paragraphs may be classified according to the semantics of each paragraph. The specific details will be described in detail in the subsequent embodiments and are not limited in this embodiment.
[0036] In S104, the audit result of the to-be-audited document is determined according to the plurality of first paragraph types and the plurality of second paragraph types.
[0037] It is worth noting that matching multiple second paragraph types of the file to be reviewed with multiple first paragraph types of the file specification can be a one-to-one match between multiple second paragraph types of the file to be reviewed and multiple first paragraph types of the file specification, or multiple first paragraph types of the file specification can all find matching second paragraph types in the file to be reviewed, which means that the file to be reviewed has passed the review, otherwise it is necessary to mark the unmatched paragraphs or give reminders, and then conduct manual inspection again.
[0038] In an embodiment of the present application, the file to be reviewed is first obtained. Since there are many types of files, and the file specifications corresponding to each file type are also different, it is necessary to determine the file type of the file to be reviewed, and then obtain the file specification corresponding to the file type of the file to be reviewed, as well as multiple first paragraph types of the file specification, and classify the paragraphs of the file to be reviewed to obtain multiple second paragraph types of the file to be reviewed. Finally, the review result of the file to be reviewed is determined based on the multiple first paragraph types and the multiple second paragraph types. By classifying the paragraphs of the file to be reviewed and the paragraphs of the file specification corresponding to the file to be reviewed, the first paragraph type of each paragraph in the file to be reviewed and the second paragraph type of each paragraph in the file specification can be determined. By determining a paragraph type for each paragraph of the file to be reviewed and the file specification, when reviewing the file, it is only necessary to determine whether the paragraph type of each paragraph in the file to be reviewed matches each paragraph type in the file specification, without the need to match word by word, thereby improving the efficiency of file review.
[0039] In a possible implementation of the present application, determining the file type of the file to be reviewed may include: extracting file text data in the file to be reviewed; and determining the file type of the file to be reviewed based on characteristic field information in the file text data.
[0040] That is to say, before determining the type of the file to be audited, the data of the file to be audited can also be preprocessed to obtain the file text data of the file to be audited, for example, converting the file to be audited in the format of PDF, Word, PPT, etc. into plain text file text data, so as to extract keywords or paragraph information later. After extracting the file text data of the file to be audited, the characteristic field information in the file text data, such as keywords, structural characteristic information, etc., can be obtained, and the file type of the file to be audited can be determined based on the characteristic field information, so as to determine the corresponding file specification based on the file type of the file to be audited, so that the computer can more accurately determine the audit result of the file to be audited, and improve the efficiency of file auditing.
[0041] Among them, the file type can be quickly determined based on some keywords in the file text data, such as the title of the file. For example, if the file title is a house lease contract, the file to be reviewed can be determined as a lease document. However, since there are many types of lease documents, such as movable property leases and immovable property leases, general leases and special leases, periodic leases and irregular leases, etc., only the file title can tell us that it is a lease of a house, and no other information can be known. Therefore, in order to more accurately determine the audit type of the file to be reviewed, so that the corresponding file specifications can be more accurately determined, classification can also be performed through a model.
[0042] In a possible implementation of the present application, determining the file type of the to-be-audited file based on the characteristic field information in the file text data may include: obtaining keywords and structural characteristic information in the file text data; inputting the keywords and structural characteristic information into a file classification model, performing classification processing, and obtaining the file type of the to-be-audited file. The structural characteristic information includes the title, first paragraph, middle paragraph, and end paragraph of the file.
[0043] In an embodiment of the present application, the file to be reviewed can be classified and processed through a file classification model to determine the file type of the file to be reviewed. By utilizing the file classification model, by processing keywords and structural feature information, such as the title, first paragraph, middle paragraph, and ending paragraph of the file, the classification can be made more accurate and the review efficiency can be further improved.
[0044] The file classification model can be a pre-acquired existing model, that is, the file classification model can utilize the structure of the existing model and only needs to be trained on the existing model structure without rebuilding the model structure, thus saving resources. The file classification model can be any model applicable to the field of neural networks.
[0045] The training of the file classification model may include: obtaining keywords and structural feature information from multiple files carrying file type labels, inputting the above keywords and structural feature information into an initial classification model, performing model training, obtaining the file type of the file, and then adjusting the parameters of the initial classification model based on the loss between the file type and the file type label carried by the file, until the loss between the file type obtained through training and the file type label is less than a first preset value, thereby obtaining a file classification model.
[0046] In this application, the obtained keywords and structural feature information are input into the above-mentioned file classification model for classification processing to obtain the file type of the file to be reviewed. Keywords and structural feature information can be input into the file classification model for classification processing. Compared with directly judging the type of the file by the keywords of the file, such as the title, the classification of this application is more accurate, further improving the efficiency of file review.
[0047] In a possible implementation of the present application, obtaining multiple first paragraph types of the document specification may include: classifying the paragraphs of the document specification according to a preset method to obtain the multiple first paragraph types of the document specification.
[0048] That is to say, if the file specification corresponding to the file type of the file to be reviewed does not have a corresponding paragraph type in the database, that is, the paragraph classification corresponding to the file specification is not found in the database, it can be classified by a preset method to obtain multiple first paragraph types of the file specification, which can then be stored in the database for subsequent use to improve the efficiency of contract review.
[0049] Among them, the preset method may include multiple methods, and the paragraphs may be classified according to the keywords in each paragraph, or the paragraphs may be classified according to the semantics of each paragraph. In this embodiment, the paragraphs are classified in the same classification method as the paragraph classification of the file to be reviewed, as shown below.
[0050] The preset method may include: dividing the file into multiple paragraphs and obtaining keywords in each paragraph; determining the tag type and the standard type of each paragraph according to the keywords; and obtaining multiple paragraph types of the file according to the tag type and the standard type of each paragraph. The tag type is used to characterize the attributes of the paragraph, and the standard type includes a quantitative standard type and a descriptive standard type.
[0051] The file can be a file to be reviewed or a file specification.
[0052] Among them, the file specification can include multiple label types, for example, which aspects of the file does a certain paragraph correspond to, whether it is a right attribute, an obligation attribute, an amount attribute, or other. The quantitative specification type refers to clear entities and the relationship between entities. For example, the document must state that the proportion of investment in XX product is not higher than 10%, where the entities are XX product and 10%, and the relationship between entities is not higher than. The descriptive specification type refers to a descriptive specification without a specific entity, which requires semantic compliance with the specification. For example, the document must state that the parties have delivered the original signed transaction documents and affixed the official seal. The above preset method is used to classify the documents and document specifications to be reviewed into paragraphs, so that the type of each paragraph can be clearer, which is conducive to later review and further improves the efficiency of document review.
[0053] In an embodiment of the present application, the paragraph type in a file is a type derived from a combination of the tag type and the specification type of the paragraph. For example, if the tag type of a paragraph in a file is a rights attribute and the specification type is a quantitative specification type, then the paragraph type of the paragraph is "rights + quantitative specification type". When matching with the file specification, it is necessary to match the paragraph of "rights + quantitative specification type" in the file specification. By dividing the paragraphs in the file by the tag type and specification type of the paragraph, the paragraph type is clearer, and when the file to be reviewed is matched with the file specification, the match is more accurate, thereby improving the efficiency of file review.
[0054] In a possible implementation of the present application, determining the audit result of the to-be-audited document according to the plurality of first paragraph types and the plurality of second paragraph types may include:
[0055] If at least one of the plurality of second paragraph types does not match the plurality of first paragraph types, then the audit result is determined to be that the audit of the to-be-audited document has failed.
[0056] That is to say, the paragraph types of the two are matched to check whether the tag type of each paragraph of the to-be-reviewed file can match the tag type of the paragraph in the file specification. If at least one of the multiple second paragraph types of the to-be-reviewed file does not match the multiple first paragraph types, it means that there is content in the to-be-reviewed file that exceeds the provisions of the file specification. At this time, the audit result is determined to be that the to-be-reviewed file has not passed the audit, that is, the automatic audit of the to-be-reviewed file cannot pass. Further, the to-be-reviewed file can be transferred to manual verification to determine whether the content that exceeds the specification meets the specification, reduce audit loopholes, and improve the quality of file audit.
[0057] Since each paragraph of a file includes a label type and a specification type, when it is determined that the label types of multiple paragraphs of the file to be reviewed match the label types of the paragraphs in the file specification, it is necessary to further determine the specification type of the file to be reviewed to further determine whether the file to be reviewed complies with the provisions in the file specification and further improve the quality of the file review.
[0058] In a possible implementation manner of the present application, the file processing method may further include the following steps.
[0059] Step 1: If the multiple second paragraph types all match the multiple first paragraph types, then further determine the standard type of each paragraph of the document to be reviewed.
[0060] Among them, the specification type includes a quantitative specification type and a descriptive specification type. The quantitative specification type refers to a specification with clear entities and relationships between entities. The descriptive specification type refers to a specification without specific entities, which is a descriptive specification and requires semantic compliance with the specification. Specifically, it has been described in detail in the above embodiment and will not be repeated in this embodiment.
[0061] Step 2: If the specification type of at least one paragraph of the document to be reviewed is a quantitative specification type, then obtain the entities and entity relationships in each paragraph of the document to be reviewed. Since the quantitative specification type refers to a specification with clear entities, the relationship between entities must also be specified. Therefore, when it is clear that the specification type of the document to be reviewed is a quantitative specification, it is necessary to obtain the entities in the paragraph and the relationship between entities.
[0062] Step 3: If the entities and entity relationships in each paragraph of the document to be reviewed match the entities and entity relationships in the document specification, it is determined whether there is a paragraph of the document to be reviewed whose specification type is a descriptive specification type.
[0063] Among them, the entities and entity relationships in the file specification can be stored in the database and obtained together when the database obtains the file specification, or they can be obtained in the paragraph of the contract specification when it is determined that the specification type of the document to be reviewed is a quantitative specification. The specific details shall be based on the actual application and are not limited in this embodiment.
[0064] The entities and entity relationships in each paragraph of the document to be reviewed are matched to the entities and entity relationships in the document specification. Specifically, it can be: judging whether the entities are consistent, and whether the entity relationships between entities are consistent. For example, the paragraph of the document to be reviewed is "The proportion of the funds invested in XX is less than 10%", where the entities are: funds, XX, 10%, and the entity relationship is: less than; the paragraph in the document specification is "The document must state that the proportion of investment in XX is not higher than 10%", where the entities are: XX, 10%, and the entity relationship is: not higher than. The entities in the two are matched, and the entity relationships are also matched, which means that the entities and entity relationships in the paragraph of the document to be reviewed can be matched to the entities and entity relationships in the document specification. If not all are matched, then proceed to step 4. If all are matched, it is necessary to further judge whether there is a paragraph of the specification type of descriptive specification type in the paragraph of the document to be reviewed. If not, then determine that the audit result is that the document to be reviewed has passed the audit.
[0065] Step 4: If there are entities and entity relationships in at least one paragraph in the file to be reviewed that do not match the entities and entity relationships in the file specification, the review result is determined to be that the file to be reviewed has failed the review.
[0066] It is worth noting that the entities and entity relationships in the paragraphs of the document to be reviewed are not matched with the entities and entity relationships in the document specification, which may mean that there is no corresponding paragraph in the document specification, or that the entities and entity relationships in the paragraphs of the document to be reviewed are different from the entities and entity relationships in the paragraphs of the document specification.
[0067] For example, if the paragraph of the document to be reviewed is "The proportion of the funds invested in XX is less than 10%", the entities are: funds, XX, 10%, and the entity relationship is: less than, but there is no corresponding paragraph in the document specification, the audit result is determined to be that the document to be reviewed has not passed the audit. For another example, if the paragraph of the document to be reviewed is "The proportion of the funds invested in XX is not less than 10%", the entities are: funds, XX, 10%, and the entity relationship is: not less than; the paragraph of the document specification is "The document must state that the proportion of investment in XX is not higher than 10%", the entities are: XX, 10%, and the entity relationship is: not higher than. The entities in the two match, but the entity relationship does not match, so the audit result is determined to be that the document to be reviewed has not passed the audit.
[0068] In the embodiment of the present application, when it is determined that multiple second paragraph types of the document to be reviewed all match multiple first paragraph types in the document specification, the specification type of each paragraph of the document to be reviewed is further determined to determine whether the document to be reviewed complies with the provisions in the document specification, so that the document review has steps, the process of document review is clearer, and the quality of document review can be improved.
[0069] In a possible implementation manner of the present application, the file processing method may further include the following steps.
[0070] Step 1: If the specification type of at least one paragraph of the document to be reviewed is a descriptive specification type, then obtain the keywords of each paragraph of the document to be reviewed. Since the descriptive specification type has no clear entity and needs to be judged based on semantics, the semantics of the paragraph can be determined based on the keywords in the paragraph to determine whether it matches the document specification.
[0071] Among them, obtaining keywords can be to extract keywords in the paragraph according to keywords in the keyword library, that is, some words in the paragraph are in the keyword library, and the words can be extracted as keywords of the paragraph. Keywords in the paragraph can also be obtained through a sequence annotation model. The sequence annotation model can be an existing model that is obtained in advance, that is, the sequence annotation model can use the structure of the existing model, and only needs to be trained on the basis of the existing model structure, without rebuilding the model structure, saving resources. Among them, the sequence annotation model can be a hidden Markov model (HMM), it can also be a maximum entropy model (The Maximum Entropy Principle), and it can also be a conditional random field (CRF), which is not specifically limited in this embodiment.
[0072] Step 2: Input the keywords of each paragraph of the document to be reviewed into the pre-acquired semantic model for semantic matching, and detect whether the description of each paragraph of the document to be reviewed semantically meets the requirements of the document specification.
[0073] The keywords obtained above are input into the pre-acquired semantic model for training, and the semantics of the keywords can be output. For example, it can be determined whether the word is a place name, a date, a book, a song, etc.
[0074] Among them, the semantic model can be an existing model acquired in advance, that is, the semantic model can utilize the structure of the existing model. It only needs to train the interface based on the existing model structure, without rebuilding the model structure, thus saving resources.
[0075] The training of the semantic model may include: inputting multiple words carrying semantic labels into the initial semantic model for model training to obtain the semantics of the words, and then adjusting the parameters of the initial semantic model according to the loss between the semantics of the words and the semantic labels, until the loss between the semantics of the trained words and the semantic labels carried by the words is less than a second preset value, thereby obtaining the semantic model.
[0076] In the present application, the keywords of each paragraph of the document to be reviewed are input into the semantic model obtained through the above training for semantic matching to obtain the semantics corresponding to the keyword. Then, the semantics are matched with the semantics of the corresponding paragraph in the document specification to detect whether the description of each paragraph of the document to be reviewed semantically meets the requirements of the document specification.
[0077] Step 3: If the description of each paragraph of the document to be reviewed meets the requirements of the document specification in terms of semantics, the review result is determined to be that the document to be reviewed has passed the review.
[0078] That is to say, if the semantics of the keywords obtained through the semantic model match the requirements of the file specification, for example, if the matching degree is above 90%, it can be said that the file to be reviewed meets the requirements of the file specification and the file to be reviewed has passed the review.
[0079] Step 4: If the description of at least one paragraph in the document to be reviewed does not semantically meet the requirements of the document specification, the review result is determined as failure of the document to be reviewed.
[0080] Correspondingly, if the semantics of the keywords obtained through the semantic model do not match the requirements of the file specification, it means that the file to be reviewed does not meet the requirements of the file specification, and the review of the file to be reviewed fails.
[0081] In the embodiment of the present application, when it is determined that the label types of multiple paragraphs of the file to be reviewed match the label types of the paragraphs in the file specification, the specification type of the file to be reviewed is further determined to determine whether the file to be reviewed complies with the provisions in the file specification, so that the file review has steps, the process of file review is clearer, and the quality of file review can be improved.
[0082] It is worth noting that the paragraph specification type mentioned above refers to a paragraph in the file to be reviewed. Since the file to be reviewed may include multiple paragraphs, each paragraph needs to be judged when judging whether the file to be reviewed has been reviewed. There may be a paragraph whose label type is rights and whose specification type is descriptive specification. The label type is rights and the specification type is descriptive specification as the classification result of the paragraph, and it is matched with the file specification to judge whether the paragraph meets the requirements of the file specification. After all the paragraphs are judged, if they all meet the requirements of the file specification, it can be finally judged that the file to be reviewed has been reviewed. If one or several paragraphs do not meet the requirements of the file specification, it is judged that the review file has not been reviewed. By classifying the paragraphs of the file to be reviewed and then matching them with the corresponding paragraph types of the file specification to determine whether the file to be reviewed has been reviewed, manual review is not required, which improves the efficiency of file review.
[0083] Furthermore, corresponding to the above Figure 1 Based on the same technical concept, the present application also provides a file processing device, such as Figure 2 As shown, the file processing device may include: a determination module 201 , an acquisition module 202 , a classification module 203 and an audit module 204 .
[0084] Among them, the determination module 201 is used to obtain the file to be reviewed and determine the file type of the file to be reviewed; the acquisition module 202 is used to obtain the question specification corresponding to the file type and multiple first paragraph types of the file specification; the classification module 203 is used to classify the paragraphs of the file to be reviewed and obtain multiple second paragraph types of the file to be reviewed; the review module 204 is used to determine the review result of the file to be reviewed based on the multiple first paragraph types and the multiple second paragraph types.
[0085] In the embodiment of the present application, first, the determination module 201 obtains the file to be reviewed. Since there are many types of files, and the file specifications corresponding to each file type are also different, it is necessary to determine the file type of the file to be reviewed. Then, the acquisition module 202 obtains the file specification corresponding to the file type of the file to be reviewed, as well as multiple first paragraph types of the file specification. The classification module 203 classifies the paragraphs of the file to be reviewed to obtain multiple second paragraph types of the file to be reviewed. Finally, the review module 204 determines the review result of the file to be reviewed based on the multiple first paragraph types and multiple second paragraph types. By classifying the paragraphs of the file to be reviewed and the paragraphs of the file specification corresponding to the file to be reviewed, the first paragraph type of each paragraph in the file to be reviewed and the second paragraph type of each paragraph in the file specification can be determined. By determining a paragraph type for each paragraph of the file to be reviewed and the file specification, when reviewing the file, it is only necessary to determine whether the paragraph type of each paragraph in the file to be reviewed matches each paragraph type in the file specification, without the need to match word by word, thereby improving the efficiency of file review.
[0086] In a possible implementation of the present application, the determination module 201 is used to: extract file text data from the file to be reviewed; and determine the file type of the file to be reviewed according to characteristic field information in the file text data.
[0087] In a possible implementation of the present application, the determination module 201 is used to: obtain keywords and structural feature information in the file text data, the structural feature information including the title, first paragraph, middle paragraph and ending paragraph of the file; input the keywords and structural feature information into the file classification model, perform classification processing, and obtain the file type of the file to be reviewed.
[0088] In a possible implementation of the present application, the acquisition module 202 is used to: classify the paragraphs of the file specification according to a preset method to obtain multiple first paragraph types of the file specification; wherein the preset method includes: dividing the file into multiple paragraphs, and obtaining keywords in each paragraph; according to the keywords, determining the label type and specification type of each paragraph, the label type is used to characterize the attributes of the paragraph, and the specification type includes a quantitative specification type and a descriptive specification type; according to the label type and specification type of each paragraph, obtaining multiple paragraph types of the file.
[0089] In a possible implementation of the present application, the review module 204 is used to: if at least one of the plurality of second paragraph types does not match the plurality of first paragraph types, determine the review result as failure of the review of the to-be-reviewed file.
[0090] In a possible implementation of the present application, the review module 204 is used to: if multiple second paragraph types all match multiple first paragraph types, then determine the specification type of each paragraph of the document to be reviewed; if the specification type of at least one paragraph of the document to be reviewed is a quantitative specification type, then obtain the entities and entity relationships in each paragraph of the document to be reviewed; if the entities and entity relationships in each paragraph of the document to be reviewed all match the entities and entity relationships in the file specification, then determine whether there are paragraphs in the document to be reviewed whose specification type is a descriptive specification type; if there is at least one paragraph in the document to be reviewed whose entities and entity relationships do not match the entities and entity relationships in the file specification, then determine the review result as failure of the document to be reviewed.
[0091] In a possible implementation of the present application, the audit module 204 is used to: if the specification type of at least one paragraph of the file to be audited is a descriptive specification type, obtain the keywords of each paragraph of the file to be audited; input the keywords of each paragraph of the file to be audited into a pre-acquired semantic model for semantic matching, and detect whether the description of each paragraph of the file to be audited semantically meets the requirements of the file specification; if the description of each paragraph of the file to be audited semantically meets the requirements of the file specification, determine the audit result as the file to be audited has passed the audit; if there is at least one paragraph in the file to be audited whose description does not semantically meet the requirements of the file specification, determine the audit result as the file to be audited has failed the audit.
[0092] The file processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a server.
[0093] The file processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0094] Alternatively, if Figure 3 As shown, the embodiment of the present application also provides a server 300, including a processor 301, a memory 302, and a program or instruction stored in the memory 302 and executable on the processor 301. When the program or instruction is executed by the processor 301, the various processes of the embodiment of the above-mentioned file processing method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0095] The embodiment of the present application also provides a readable storage medium, which stores a program or instruction, and when the program or instruction is executed by a processor, it implements each process of the embodiment of the file processing method provided in any of the above embodiments. And it can achieve the same technical effect, so it will not be repeated here to avoid repetition.
[0096] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0097] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the file processing method provided in the above embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0098] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0099] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0101] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A file processing method, characterized in that: include: Obtaining the file to be reviewed and determining the file type of the file to be reviewed; Obtaining a file specification corresponding to the file type and a plurality of first paragraph types of the file specification, the first paragraph types comprising a tag type and a specification type; Classifying the paragraphs of the to-be-reviewed document to obtain a plurality of second paragraph types of the to-be-reviewed document, wherein the second paragraph types include a label type and a standard type; Determining a review result of the to-be-reviewed document according to the plurality of first paragraph types and the plurality of second paragraph types; The method also includes: if the tag types in the multiple second paragraph types all match the tag types in the multiple first paragraph types, then determining the specification type of each paragraph of the file to be reviewed; if the specification type of at least one paragraph is a quantitative specification type, then obtaining the entities and entity relationships in each paragraph; if there is at least one paragraph where the entities and entity relationships do not match the entities and entity relationships in the file specification, then determining that the review result is failed.
2. The method according to claim 1, characterized in that: Determining the file type of the file to be reviewed includes: Extracting the file text data from the file to be reviewed; The file type of the file to be reviewed is determined according to the characteristic field information in the file text data.
3. The method according to claim 2, characterized in that Determining the file type of the to-be-audited file according to the characteristic field information in the file text data includes: Acquire keywords and structural feature information in the text data of the file, wherein the structural feature information includes the title, first paragraph, middle paragraph and end paragraph of the file; The keywords and the structural feature information are input into a file classification model, and classification processing is performed to obtain the file type of the file to be reviewed.
4. The method according to claim 1, characterized in that Get multiple first paragraph types of the file specification, including: Classifying the paragraphs of the document specification according to a preset method to obtain a plurality of first paragraph types of the document specification; The preset method includes: dividing the document into a plurality of paragraphs, and obtaining keywords in each paragraph; According to the keywords, the tag type and the standard type of each paragraph are determined, the tag type is used to characterize the attribute of the paragraph, and the standard type includes a quantitative standard type and a descriptive standard type; according to the tag type and the standard type of each paragraph, multiple paragraph types of the file are obtained.
5. The method according to claim 4, characterized in that The determining the audit result of the to-be-audited document according to the plurality of first paragraph types and the plurality of second paragraph types comprises: If at least one of the tag types in the plurality of second paragraph types does not match the tag types in the plurality of first paragraph types, it is determined that the audit result is that the to-be-audited file has failed the audit.
6. The method according to claim 5, characterized in that The method further comprises: If the entities and entity relationships in each paragraph of the to-be-audited document match the entities and entity relationships in the document specification, it is determined whether there is a paragraph whose specification type is a descriptive specification type in the paragraphs of the to-be-audited document.
7. The method according to claim 6, characterized in that The method further comprises: If the specification type of at least one paragraph of the document to be reviewed is a descriptive specification type, obtaining keywords of each paragraph of the document to be reviewed; Input the keywords of each paragraph of the document to be reviewed into the pre-acquired semantic model for semantic matching, and detect whether the description of each paragraph of the document to be reviewed semantically meets the requirements of the document specification; If the description of each paragraph of the document to be reviewed semantically meets the requirements of the document specification, then the review result is determined to be that the document to be reviewed has passed the review; If the description of at least one paragraph in the to-be-audited document does not semantically meet the requirements of the document specification, the audit result is determined to be that the to-be-audited document has failed the audit.
8. A file processing device, characterized in that: The device comprises: A determination module, used to obtain the file to be reviewed and determine the file type of the file to be reviewed; An acquisition module, configured to acquire a file specification corresponding to the file type and a plurality of first paragraph types of the file specification, wherein the first paragraph type includes a tag type and a specification type; A classification module, used for classifying the paragraphs of the to-be-reviewed document to obtain a plurality of second paragraph types of the to-be-reviewed document, wherein the second paragraph types include a label type and a standard type; An audit module, used for determining an audit result of the to-be-audited document according to the plurality of first paragraph types and the plurality of second paragraph types; The review module is also used to determine the specification type of each paragraph of the file to be reviewed if the tag types in the multiple second paragraph types all match the tag types in the multiple first paragraph types; if the specification type of at least one paragraph is a quantitative specification type, obtain the entities and entity relationships in each paragraph; if there is at least one paragraph where the entities and entity relationships do not match the entities and entity relationships in the file specification, determine that the review result is failed.
9. A server, characterized in that: The server includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction implements the steps of the method according to any one of claims 1 to 7 when executed by the processor.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
