Document information processing method and storage medium
By preprocessing keywords and information derivation of documents, the accurate and efficient processing of document information is achieved, and the problems of poor accuracy and high cost in the prior art are solved, processing efficiency is improved and cost is reduced.
Patent Information
- Application Number
- CN202411213618.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The prior art has problems of poor accuracy and high cost in document information processing. Especially when relying on artificial intelligence large models for information derivation, a large amount of historical data is required to train and maintain, resulting in low efficiency and high cost.
By obtaining the to-process documents and benchmark documents, pre-processing is performed to determine keywords, and information derivation is performed based on these keywords, generating a collection of information to be compared and a collection of reference information, performing differences and comparing, and achieving accurate and efficient processing of document information.
It improves the accuracy and efficiency of document information processing, reduces costs, and solves the high cost problem caused by relying on artificial intelligence large models.
Smart Images

Figure CN119202128A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a document information processing method and a storage medium. Background Art
[0002] Document information processing involves information search, derivation, comparison and other operations based on keywords in documents. Existing document information processing methods usually use a "point-to-point" method to search, and users need to invest a lot of preliminary preparation and secondary sorting work to complete the comparison of document information, resulting in low document processing efficiency and poor accuracy. In addition, some existing technologies can derive document information based on artificial intelligence big models. Although this information derivation method can ensure the processing efficiency of massive document information, it is necessary to use massive historical data to train and continuously adjust the model before the artificial intelligence big model is put into production, until the artificial intelligence big model can meet the user's use needs, and in the process of putting the model into production, it is necessary to pay time and economic costs for model maintenance.
[0003] From the above analysis, it can be seen that there is currently no effective solution to the problem that the above-mentioned existing technologies have poor accuracy in document information processing and rely on large artificial intelligence models to derive information, resulting in high costs. Summary of the invention
[0004] The embodiments of the present invention provide a document information processing method and a storage medium to at least solve the technical problems of the prior art in that the document information processing accuracy is poor and the information is derived from a large artificial intelligence model, resulting in high costs.
[0005] According to one aspect of an embodiment of the present invention, there is provided a document information processing method, comprising:
[0006] Obtain a document to be processed and a benchmark document; pre-process the document to be processed to obtain a first processing result, and pre-process the benchmark document to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the benchmark document; derive information from the first keyword based on the first processing result to obtain an information collection to be compared, and derive information from the second keyword based on the second processing result to obtain a benchmark information collection; perform a difference comparison between the information collection to be compared and the benchmark information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the benchmark information collection.
[0007] Optionally, preprocessing the document to be processed to obtain a first processing result includes: using a document analyzer to analyze and process the document to be processed to obtain block information, wherein the block information is used to characterize the structure and semantics of the document to be processed; matching any keyword in the block information with any demand keyword to obtain a matching result, wherein any demand keyword is determined by a preset demand vocabulary, and the matching result includes a first keyword and first position information, the first keyword is a keyword that successfully matches any demand keyword, and the first position information is used to determine the position of any first keyword in the block information; structurally dividing the block information based on the matching result to obtain a first processing result, wherein the first processing result includes first preceding text information corresponding to the first keyword and first following text information corresponding to the first keyword, the first preceding text information is information in the block information that is before the position of the first keyword, and the first following text information is information in the block information that is after the position of the first keyword.
[0008] Optionally, information is derived from the first keyword based on the first processing result to obtain a collection of information to be compared, including: reading any first keyword in sequence according to the position order represented by the first position information and using any first keyword as the current derived keyword; deriving information from the current derived keyword at least based on the current derived node and the current derived position to obtain a derived result, wherein the current derived node is the position of the target unit document information in the block information, the target unit document information is the longest unit document information derived from the current derived keyword in the block information, the current derived position is the position of the current derived keyword in the block information, and the current derived position is determined by the first position information; and generating a collection of information to be compared based on the derived result and the first subsequent information corresponding to the current derived keyword.
[0009] Optionally, information is derived from the current derived keyword at least based on the current derived node and the current derived position, and the derived result includes: taking the beginning of the block information as the starting derived node, calculating the number of unit document information located between the current derived node and the current derived position, and obtaining a calculation result; comparing the calculation result with a preset value to obtain a first comparison result, wherein the first comparison result is used to determine whether to perform a loop derivation on the current derived keyword; in response to determining that the calculation result is less than the preset value based on the first comparison result, judging whether the current derived keyword exists in the preset demand vocabulary to obtain a first judgment result; in response to determining that the current derived keyword does not exist in the preset demand vocabulary based on the first judgment result, generating a derivative result based on the current derived keyword and the current derivative position.
[0010] Optionally, the above-mentioned document information processing method also includes: in response to determining according to the first judgment result that the current derived keyword exists in the preset demand vocabulary, judging whether the current derived keyword belongs to the target category keyword to obtain a second judgment result; in response to determining according to the second judgment result that the current derived keyword belongs to the target category keyword, generating a derivative result based on the current derived keyword and the current derivative position.
[0011] Optionally, the document information processing method further includes: in response to determining that the current derived keyword does not belong to the target category keyword according to the second judgment result, converting the current derived keyword into first preceding text information corresponding to the next first keyword.
[0012] Optionally, the above-mentioned document information processing method also includes: in response to determining that the calculation result is greater than or equal to a preset value based on the first comparison result, updating the current derived keywords at least according to the current derivative node to obtain updated derived keywords; judging whether the updated derived keywords meet the derivation rationality conditions to obtain a third judgment result; and determining the derivative results based on the third judgment result.
[0013] Optionally, the above-mentioned document information processing method also includes: taking any first keyword as the current derived keyword; deriving and updating the current derived keyword according to the first previous text information corresponding to the current derived keyword and the unit document information of a preset derivative number to obtain an updated derived keyword; judging whether the updated derived keyword satisfies the derivation rationality condition to obtain a fourth judgment result; in response to determining that the updated derived keyword satisfies the derivation rationality condition according to the fourth judgment result, cyclically deriving the current derived keyword and updating the current number of derivations of the current derived keyword; in response to determining that the updated derived keyword does not satisfy the derivation rationality condition according to the fourth judgment result, determining the derivation result at least according to the current number of derivations.
[0014] Optionally, the information collection to be compared includes multiple first information groups, any one of the first information groups is composed of first derivative information and first requirement information, the first derivative information is determined by the derivative result corresponding to any one of the first keywords in the document to be processed, and the first requirement information is the requirement information obtained by matching the first derivative information in the first subsequent information corresponding to any one of the first keywords according to the preset matching requirement, and the benchmark information collection includes multiple second information groups, any one of the second information groups is composed of second derivative information and second requirement information, the second derivative information is determined by the derivative result corresponding to any one of the second keywords in the benchmark document, and the second requirement information is the requirement information obtained by matching the second derivative information in the second subsequent information corresponding to any one of the second keywords according to the preset matching requirement, and the second subsequent information is determined by the second processing result, and the information collection to be compared is differentiated from the benchmark information collection. Comparison to obtain a target information collection includes: comparing any first derivative information with any second derivative information to obtain a second comparison result, wherein the second comparison result includes the similarity between any first derivative information and any second derivative information; in response to determining that the similarity is less than or equal to a preset similarity threshold according to the second comparison result, generating a target information collection according to any first derivative information and any second derivative information; in response to determining that the similarity is greater than the preset similarity threshold according to the second comparison result, comparing the first requirement information corresponding to any first information with the second requirement information corresponding to any second derivative information to obtain a third comparison result; in response to determining that the first requirement information is different from the second requirement information according to the three comparison results, generating a target information collection according to the first information group corresponding to any first derivative information and the second information group corresponding to any second derivative information.
[0015] According to another aspect of an embodiment of the present invention, there is also provided a document information processing device, including:
[0016] An acquisition module is used to acquire a document to be processed and a benchmark document; a preprocessing module is used to preprocess the document to be processed to obtain a first processing result, and to preprocess the benchmark document to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the benchmark document; a first derivation module is used to derive information from the first keyword based on the first processing result to obtain a collection of information to be compared, and to derive information from the second keyword based on the second processing result to obtain a benchmark information collection; a comparison module is used to compare the information collection to be compared with the benchmark information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the benchmark information collection.
[0017] Optionally, the above-mentioned preprocessing module is also used to: use a document analyzer to analyze and process the document to be processed to obtain block information, wherein the block information is used to characterize the structure and semantics of the document to be processed; match any keyword in the block information with any demand keyword to obtain a matching result, wherein any demand keyword is determined by a preset demand vocabulary, and the matching result includes a first keyword and first position information, the first keyword is a keyword that successfully matches any demand keyword, and the first position information is used to determine the position of any first keyword in the block information; structurally divide the block information based on the matching result to obtain a first processing result, wherein the first processing result includes a first preceding text information corresponding to the first keyword and a first following text information corresponding to the first keyword, the first preceding text information is information in the block information that is before the position of the first keyword, and the first following text information is information in the block information that is after the position of the first keyword.
[0018] Optionally, the above-mentioned first derivation module is also used to: read any first keyword in sequence according to the position order represented by the first position information and use any first keyword as the current derived keyword; derive information for the current derived keyword at least according to the current derivation node and the current derivation position to obtain a derivation result, wherein the current derivation node is the position of the target unit document information in the block information, the target unit document information is the longest unit document information for which the current derived keyword is derivatized in the block information, the current derivation position is the position of the current derived keyword in the block information, and the current derivation position is determined by the first position information; generate a collection of information to be compared according to the derivation result and the first subsequent information corresponding to the current derived keyword.
[0019] Optionally, the above-mentioned first derivation module is also used to: take the beginning of the block information as the starting derivation node, calculate the number of unit document information located between the current derivation node and the current derivation position, and obtain a calculation result; compare the calculation result with a preset value to obtain a first comparison result, wherein the first comparison result is used to determine whether to perform a loop derivation on the current derived keyword; in response to determining that the calculation result is less than the preset value according to the first comparison result, judge whether the current derived keyword exists in the preset demand vocabulary to obtain a first judgment result; in response to determining that the current derived keyword does not exist in the preset demand vocabulary according to the first judgment result, generate a derivative result according to the current derived keyword and the current derivative position.
[0020] Optionally, the above-mentioned document information processing device also includes: a generation module, which is used to respond to determining according to the first judgment result that the current derived keyword exists in the preset demand vocabulary, judge whether the current derived keyword belongs to the target category keyword, and obtain a second judgment result; in response to determining according to the second judgment result that the current derived keyword belongs to the target category keyword, generate a derivative result based on the current derived keyword and the current derivative position.
[0021] Optionally, the document information processing device further includes: a conversion module for converting the current derivative keyword into first preceding text information corresponding to the next first keyword in response to determining that the current derivative keyword does not belong to the target category keyword according to the second judgment result.
[0022] Optionally, the above-mentioned document information processing device also includes: a determination module, which is used to respond to determining that the calculation result is greater than or equal to a preset value based on the first comparison result, and to update the current derived keywords at least according to the current derived node to obtain updated derived keywords; judge whether the updated derived keywords meet the derivation rationality conditions to obtain a third judgment result; and determine the derived results based on the third judgment result.
[0023] Optionally, the above-mentioned document information processing device also includes: a second derivation module, used to take any one of the first keywords as the current derived keyword; derive and update the current derived keyword according to the first previous text information corresponding to the current derived keyword and the unit document information of a preset derivative number to obtain an updated derived keyword; judge whether the updated derived keyword meets the derivation rationality condition to obtain a fourth judgment result; in response to determining that the updated derived keyword meets the derivation rationality condition according to the fourth judgment result, cyclically derive the current derived keyword and update the current number of derivations of the current derived keyword; in response to determining that the updated derived keyword does not meet the derivation rationality condition according to the fourth judgment result, determine the derivation result at least according to the current number of derivations.
[0024] Optionally, the information collection to be compared includes multiple first information groups, any one of the first information groups is composed of first derivative information and first requirement information, the first derivative information is determined by a derivative result corresponding to any first keyword in the document to be processed, and the first requirement information is requirement information obtained by matching the first derivative information in the first subsequent information corresponding to any first keyword according to a preset matching requirement, the reference information collection includes multiple second information groups, any one of the second information groups is composed of second derivative information and second requirement information, the second derivative information is determined by a derivative result corresponding to any second keyword in the reference document, the second requirement information is requirement information obtained by matching the second derivative information in the second subsequent information corresponding to any second keyword according to the preset matching requirement, and the second subsequent information is determined by the second processing result, and the comparison module is also used In: comparing any first derivative information with any second derivative information to obtain a second comparison result, wherein the second comparison result includes a similarity between any first derivative information and any second derivative information; in response to determining that the similarity is less than or equal to a preset similarity threshold according to the second comparison result, generating a target information collection according to any first derivative information and any second derivative information; in response to determining that the similarity is greater than the preset similarity threshold according to the second comparison result, comparing first requirement information corresponding to any first information with second requirement information corresponding to any second derivative information to obtain a third comparison result; in response to determining that the first requirement information is different from the second requirement information according to the three comparison results, generating a target information collection according to a first information group corresponding to any first derivative information and a second information group corresponding to any second derivative information.
[0025] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, any of the document information processing methods described above is implemented.
[0026] In an embodiment of the present invention, a document to be processed and a benchmark document are first obtained, then the document to be processed is preprocessed to obtain a first processing result, and the benchmark document is preprocessed to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the benchmark document, and then information is derived from the first keyword based on the first processing result to obtain an information collection to be compared, and information is derived from the second keyword based on the second processing result to obtain a benchmark information collection, and finally, a difference comparison is performed between the information collection to be compared and the benchmark information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the benchmark information collection.
[0027] It is easy to understand that the above method determines the keywords to be derived in the processed document and the benchmark document and the preceding and following information of each derived keyword by performing refined preprocessing operations such as segmentation, keyword matching, and structural division on the processed document and the benchmark document, and then derives information from the derived keywords based on the processing results obtained from the preprocessing to obtain an information collection containing derived information and required information. Then, by performing a difference comparison between the information collection to be compared corresponding to the processed document and the benchmark information collection corresponding to the benchmark document, the purpose of accurately and efficiently processing the document information in a manner that can meet the user's customized needs is achieved, thereby achieving the technical effect of improving the accuracy and efficiency of document information processing and saving costs, and thus solving the technical problems of the prior art in that the document information processing accuracy is poor and the information deriving depends on large artificial intelligence models, resulting in high costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0029] Figure 1 is a hardware structure block diagram of an optional computing terminal for a document information processing method according to an embodiment of the present invention;
[0030] Figure 2 is a flowchart of a document information processing method according to an embodiment of the present invention;
[0031] Figure 3 is a flowchart of an optional document information preprocessing process according to an embodiment of the present invention;
[0032] Figure 4 is a flowchart of an optional keyword preprocessing process according to an embodiment of the present invention;
[0033] Figure 5 is a flowchart of another optional keyword preprocessing process according to an embodiment of the present invention;
[0034] Figure 6 is a flowchart of another optional keyword preprocessing process according to an embodiment of the present invention;
[0035] Figure 7 is a flow chart of an optional keyword information derivation process according to an embodiment of the present invention;
[0036] Figure 8 is a flow chart of another optional keyword information derivation process according to an embodiment of the present invention;
[0037] Fig. 9 is a flow chart of an optional information group construction process according to an embodiment of the present invention;
[0038] Fig.10 It is a structural block diagram of a document information processing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] According to an embodiment of the present invention, a method embodiment of a document information processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 1 is a hardware structure block diagram of a computing terminal for a document information processing method according to an embodiment of the present invention, such as Figure 1As shown, the computing terminal (or mobile device) may include one or more processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Microcontroller Unit, MCU) or a programmable logic device (FieldProgrammable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display device 110, an input and output device 108 (i.e., an IO device), a Universal Serial Bus (USB) port (which may be included as one of the ports of a computer bus, not shown in the figure), a network interface (not shown in the figure), a power supply (not shown in the figure) and / or a camera (not shown in the figure). It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above computing terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0043] It should be noted that the one or more processors 102 and / or other data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be fully or partially integrated into any of the other components in the computing terminal (or mobile device).
[0044] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the document information processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned document information processing method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computing terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0045] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0046] Under the above operating environment, the embodiment of the present invention provides the following Figure 2 The document information processing method shown, Figure 2 is a flowchart of a document information processing method according to an embodiment of the present invention. Figure 2 As shown, the method includes the following implementation steps:
[0047] Step S201, obtaining a document to be processed and a reference document;
[0048] Step S202, preprocessing the document to be processed to obtain a first processing result, and preprocessing the reference document to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the reference document;
[0049] Step S203, deriving information from the first keyword based on the first processing result to obtain a collection of information to be compared, and deriving information from the second keyword based on the second processing result to obtain a collection of reference information;
[0050] Step S204, performing a difference comparison between the information collection to be compared and the reference information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the reference information collection.
[0051] The above-mentioned to-be-processed document is a document that the user needs to compare information with, and the above-mentioned reference document can be a standard reference document determined by the user for comparing and determining the difference status of the to-be-processed document. It should be noted that the number of reference documents can be adjusted by the user as required. When there are multiple reference documents, the to-be-compared information collection can be compared with the reference information collection corresponding to each reference document to determine the information difference status between the to-be-processed document and different reference documents.
[0052] In the present invention, the preprocessing process of the document to be processed and the reference document may include: segmentation, keyword matching, and structural division after analysis and processing, wherein the analysis and processing process is used to analyze the structure and semantics of the document, the keyword matching process is used to determine the keywords to be derived in the document, and the structural division process is used to determine the preceding and succeeding text information corresponding to each keyword to be derived, the preceding text information is used to participate in the information derivation process of the keyword to be derived, and the succeeding text information is used to match the demand information corresponding to the derived information derived from each keyword to be derived.
[0053] The above-mentioned information collection to be compared is composed of the first derivative information corresponding to each first keyword and the first requirement information corresponding to the first derivative information, and the above-mentioned reference information collection is composed of the second derivative information corresponding to each second keyword and the second requirement information corresponding to the second derivative information. By performing a difference comparison according to the information group composed of the derivative information and the requirement information, the difference information in the document to be processed and the reference document can be quickly and accurately determined.
[0054] In an embodiment of the present invention, a document to be processed and a benchmark document are first obtained, then the document to be processed is preprocessed to obtain a first processing result, and the benchmark document is preprocessed to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the benchmark document, and then information is derived from the first keyword based on the first processing result to obtain an information collection to be compared, and information is derived from the second keyword based on the second processing result to obtain a benchmark information collection, and finally, a difference comparison is performed between the information collection to be compared and the benchmark information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the benchmark information collection.
[0055] It is easy to understand that the above method determines the keywords to be derived in the processed document and the benchmark document and the preceding and following information of each derived keyword by performing refined preprocessing operations such as segmentation, keyword matching, and structural division on the processed document and the benchmark document, and then derives information from the derived keywords based on the processing results obtained from the preprocessing to obtain an information collection containing derived information and required information. Then, by performing a difference comparison between the information collection to be compared corresponding to the processed document and the benchmark information collection corresponding to the benchmark document, the purpose of accurately and efficiently processing the document information in a manner that can meet the user's customized needs is achieved, thereby achieving the technical effect of improving the accuracy and efficiency of document information processing and saving costs, and thus solving the technical problems of the prior art in that the document information processing accuracy is poor and the information deriving depends on large artificial intelligence models, resulting in high costs.
[0056] The above method of the embodiment of the present invention is further introduced below.
[0057] In an optional embodiment, in step S202, the document to be processed is preprocessed to obtain a first processing result including:
[0058] Step S221, using a document analyzer to analyze and process the document to be processed to obtain block information, wherein the block information is used to characterize the structure and semantics of the document to be processed;
[0059] Step S222, matching any keyword in the block information with any demand keyword to obtain a matching result, wherein any demand keyword is determined by a preset demand word library, and the matching result includes a first keyword and first position information, the first keyword is a keyword that successfully matches any demand keyword, and the first position information is used to determine the position of any first keyword in the block information;
[0060] Step S223, structurally divide the block information based on the matching results to obtain a first processing result, wherein the first processing result includes the first preceding context information corresponding to the first keyword and the first following context information corresponding to the first keyword, the first preceding context information is the information located before the position of the first keyword in the block information, and the first following context information is the information located after the position of the first keyword in the block information.
[0061] It should be noted that the document information processing process of the present invention is described in detail below by taking the operation steps of the preprocessing process and the information derivation process of the to-be-processed document and the reference document being identical as an example.
[0062] Figure 3 is a flowchart of an optional document information preprocessing process according to an embodiment of the present invention. Figure 3 As shown, the user first inputs the document to be processed and the benchmark document into the document information processing system, and inputs the preset demand vocabulary. Taking the preprocessing process of the document to be processed as an example, the system first uses the document analyzer to analyze and process the input document to be processed, analyzes the semantics and structure in the document to be processed, and divides the document information of the document to be processed into blocks according to the analysis results (such as dividing by punctuation marks) to obtain the above-mentioned block information.
[0063] Still Figure 3As shown, then, any keyword in the block information is matched with any demand keyword in the preset demand vocabulary, and the successfully matched keyword is used as the keyword to be derived (i.e., the first keyword) in the document to be processed, and the position of each first keyword in the block information is recorded to obtain the above-mentioned first position information. Further, the block information can be divided into information with a target structure according to the position of the first keyword. The target structure can be "keyword pre-context information + keyword + keyword post-context information". The present invention limits each target structure to only contain one keyword. After structural division, the preprocessing result of the document to be processed (i.e., the first processing result) is obtained. Then, information is derived from the first keyword according to the first processing result corresponding to the document to be processed, and information is derived from the second keyword according to the second processing result corresponding to the benchmark document, and the data collection obtained after the information derivation is compared to determine the document information difference between the document to be processed and the benchmark document.
[0064] It should also be noted that each piece of document information obtained after analyzing and processing the document information in the present invention corresponds to a number, and the number values from small to large represent the order of the block information in the document information.
[0065] The above-mentioned preset demand word library may include at least one of the following: a common word library containing keywords frequently used by users in their daily work (such as words such as "substation", "line", "main transformer" in the power industry); a supplementary word library containing additional keywords of any keyword in the common word library; a special word library containing specific keywords in the document information processing task. It should be noted here that the document information processing method provided by the present invention will not derive information for specific keywords in the special word library, nor will it delete the position of the specific keyword in the first position information.
[0066] As an optional way to determine the context of keywords, such as Figure 4 As shown, first read all keyword positions corresponding to the current block information according to the first position information, determine whether the current block information contains the first keyword, and when the first keyword does not exist, merge the current block information into the post-context information corresponding to the last first keyword of the previous block information; when the first keyword exists, first pre-process each first keyword in the current block information, then remove the document information related to the first keyword that has been pre-processed from the current block information, and perform keyword existence judgment on the remaining document information of the current block information, and when it is further determined that the first keyword does not exist in the remaining document information, set the post-context information for the first keyword that has completed pre-processing.
[0067] As an optional implementation method of the keyword preprocessing process, Figure 5As shown, for any first keyword position, first determine whether there are other first keywords before the position. When it is determined that there are no other first keywords, determine that the keyword corresponding to the position remains unchanged, and use the beginning of the current block information as a derivative node. Next, obtain the document information between the derivative node and the position (recorded as keyword preceding information), and determine whether the keyword preceding information is empty. When it is determined that the keyword preceding information is not empty, determine whether there are conjunctions or prepositions before the position. When there are conjunctions or prepositions, use the position after the conjunction or preposition as the derivative point of the keyword corresponding to the position, and further obtain the field (including keywords) between the derivative point and the keyword corresponding to the position as the new keyword corresponding to the position. Further, it is determined whether the new keyword satisfies the derivation rationality condition. It should be noted here that the user can set the control content such as standard files, file groups, databases, etc. in advance according to their own needs. The determination of whether the new keyword satisfies the derivation rationality condition can be to determine whether the new keyword exists in the control content. When the new keyword satisfies the derivation rationality condition (that is, the new keyword exists in the control content), the position of the derivation point is moved forward by one position, and the field (including the keyword) between the new position of the derivation point and the new keyword is taken as the new keyword for the second update. It is further determined whether the new keyword after the second update meets the derivation rationality condition, and the preprocessing result of the first keyword is determined according to the judgment result, and the first keyword is adjusted according to the judgment result. The first previous text information corresponding to the keyword, specifically: when a new keyword meets the derivation rationality condition, the new keyword is used as the preprocessed keyword at the position (recorded as the position keyword), the derivative node corresponding to the position keyword is set to be consistent with the derivative node determined in the previous step of keyword previous text information judgment, and the previous text information corresponding to the position keyword is set to the document information between the derivative node and the position; when the new keyword after the second update does not meet the derivation rationality condition, the new keyword that is first judged whether it meets the derivation rationality condition is used as the preprocessed position keyword, and the position after the conjunction or preposition is used as the derivative node corresponding to the position keyword, and the previous text information corresponding to the position keyword is set to empty.
[0068] It should be noted that the unit document information can be customized by the user, for example: the unit document information is a Chinese character; for another example: the unit document information is a character.
[0069] like Figure 5 As shown, still in the above optional implementation, when it is determined that there is no conjunction or preposition before the position, the keyword in the previous step of determining whether the keyword preceding information is empty is determined as the preprocessed position keyword.
[0070] like Figure 5As shown, still in the above optional implementation, when it is first determined that the new keyword does not meet the derivative rationality condition, the keyword in the previous step of determining whether the keyword preamble information is empty is determined as the preprocessed position keyword, the derivative node is adjusted to the position two characters after the conjunction or preposition, and the document information between the adjusted derivative node and the preprocessed position keyword is used as the preamble information corresponding to the position keyword.
[0071] As Figure 5 shown, still in the above optional implementation, when there are other first keywords before the process start judgment position, the field between two adjacent first keywords before and after this position (including the two first keywords) is taken as the new keyword corresponding to this position. Then, it is judged whether the new keyword meets the derivative rationality condition. When it is determined that the new keyword meets the derivative rationality condition, the first keyword before this position to the field including the two first keywords before and after is taken as the newly updated keyword. At the same time, the two first keywords corresponding to this position, and the derivative node corresponding to the first keyword before this position are taken as the derivative node corresponding to the new keyword. Then, the subsequent preprocessing process is carried out according to the newly updated keyword and the corresponding derivative node. When it is judged that the new keyword does not meet the derivative rationality condition, it is judged whether there are auxiliary words (such as "de"), other symbols (such as spaces), etc. in the new keyword. When it is determined that there is such content, this content is deleted from the new keyword. When it is determined that there is no such content, it is judged whether the number of unit document information between the new keyword and the adjacent keyword before the position (denoted as P) meets the quantity condition. It should be noted that the user can preset the number of unit document information (denoted as N) of the minimum unit for the keyword matching process according to requirements. The above quantity judgment process can refer to judging whether the value P is greater than or equal to the sum of the quantity N and the value 1. When the quantity P meets the quantity condition, the keyword corresponding to this position is updated to the first keyword before the start of the preprocessing process, and the position of the (N + 1)-th unit document information after the position of the keyword before the current position is determined as the derivative node corresponding to the updated keyword corresponding to this position; when the quantity P does not meet the quantity condition, the keyword corresponding to this position is converted into ordinary document information and no longer participates in the subsequent preprocessing process and information derivation process.
[0072] As another optional implementation of the keyword preprocessing process, as Figure 6As shown, for any preprocessed position keyword (current position keyword), first determine whether there are other keywords before the position of the position keyword. When it is determined that there are other keywords, the post-context information of the current position keyword is set to the document information between the current position keyword and the adjacent keywords after the position (excluding two keywords); when it is determined that there are no other keywords, the post-context information of the current position keyword is set to the content from the current position keyword to the end of the block information (excluding the current position keyword).
[0073] As a specific example, assuming that the current block information is "Brand X electric vehicles have a range of 500 kilometers, which is very suitable for users' travel, just like the brand Y electric vehicle automatic driving interface meets the user's travel needs and is very competitive", the number N is 3, and assuming that the keywords of the preset demand vocabulary include "electric vehicle", "interface" and "mileage", when the keywords "electric vehicle range" and "electric vehicle automatic driving interface" meet the derivation rationality conditions, the keyword "interface" can be derived forward to the first "electric vehicle" (that is, the "electric vehicle" in "brand Y electric vehicle") to be combined into the keyword preprocessing result. Since only one keyword is retained in the target structure, the second "electric vehicle" derived forward from the keyword in the block information (that is, the "electric vehicle" in "brand X electric vehicle") cannot be combined with the previously combined "electric vehicle range", but since the number N value is large enough, the second "electric vehicle" can be retained, and the final keyword "interface" corresponds to the position keyword in the preprocessing result as "electric vehicle automatic driving interface". After keyword preprocessing, the keywords "interface" and "mileage" are determined to be the main information of the block information. For the two position keywords "electric vehicle range" and "electric vehicle automatic driving interface" of the preprocessing results, assuming that the number of minimum unit document information N is 3, the preceding text information corresponding to the position keyword "electric vehicle range" is "brand X", and the following text information corresponding to the position keyword "electric vehicle range" is "500 kilometers is very suitable for users' travel conditions like brand Y", and the preceding text information corresponding to the position keyword "electric vehicle automatic driving interface" is "kilometers is very suitable for users' travel conditions like brand Y", and the following text information corresponding to the position keyword "electric vehicle automatic driving interface" is "It meets users' travel needs and is very competitive."
[0074] In an optional embodiment, in step S203, information is derived from the first keyword based on the first processing result, and the information collection to be compared includes:
[0075] Step S231, reading any first keyword in sequence according to the position sequence represented by the first position information and using any first keyword as the current derived keyword;
[0076] Step S232, deriving information for the current derived keyword at least according to the current derived node and the current derived position to obtain a derived result, wherein the current derived node is the position of the target unit document information in the block information, the target unit document information is the longest unit document information derived from the current derived keyword in the block information, the current derived position is the position of the current derived keyword in the block information, and the current derived position is determined by the first position information;
[0077] Step S233: Generate a collection of information to be compared according to the derived result and the first subsequent information corresponding to the current derived keyword.
[0078] Wherein, information is derived from the current derived keyword at least according to the current derived node and the current derived position, and the derived results include:
[0079] Step S2321, taking the beginning of the block information as the starting derived node, calculating the number of unit document information between the current derived node and the current derived position, and obtaining a calculation result;
[0080] Step S2322, comparing the calculation result with a preset value to obtain a first comparison result, wherein the first comparison result is used to determine whether to perform a cyclic derivation on the current derived keyword;
[0081] Step S2323, in response to determining that the calculation result is less than a preset value according to the first comparison result, determining whether the current derived keyword exists in the preset demand word library, and obtaining a first determination result;
[0082] Step S2324, in response to determining according to the first judgment result that the current derived keyword does not exist in the preset demand vocabulary, generating a derived result according to the current derived keyword and the current derived position.
[0083] In the present invention, after preprocessing the keywords, information is derived according to the keyword preprocessing results. An optional information derivation process can be as follows: Figure 7As shown, firstly, the keyword position in the first position information is obtained and the keyword position is used as the current derivative position. Then, the position keyword corresponding to the current derivative position is read and the position keyword is used as the current derivative keyword. Further, the derivative node is extracted from the preprocessing result of the position keyword (at least including the derivative node, previous text information and subsequent text information corresponding to the position keyword) as the current derivative node, and then the document information between the current derivative node and the current derivative position is obtained, and the number of unit document information between the current derivative node and the current derivative position is calculated (recorded as Q). Further, the number Q is compared with the preset value 1. When the first comparison result determines that the number Q is less than the preset value 1, it is determined whether the current derivative keyword exists in the preset demand word library. When it is determined that the current derivative keyword does not exist in the preset demand word library, the original position keyword and the position of the original position keyword are used as the derivative result. Further, the position keyword of the next position is read to derive information.
[0084] In an optional embodiment, the document information processing method further includes:
[0085] Step S2325, in response to determining that the current derived keyword exists in the preset demand word library according to the first judgment result, determining whether the current derived keyword belongs to the target category keyword, and obtaining a second judgment result;
[0086] Step S2326, in response to determining that the current derived keyword belongs to the target category keyword according to the second judgment result, generating a derived result according to the current derived keyword and the current derived position.
[0087] Still Figure 7 As shown, when it is determined according to the first judgment result that the current derived keyword exists in the preset demand vocabulary, it is judged whether the current derived keyword belongs to the target category keyword (such as: a specific keyword input by the user). When it is further determined that the current derived keyword belongs to the target category keyword, the original position keyword and the position of the original position keyword are used as derivative results.
[0088] In an optional embodiment, the document information processing method further includes:
[0089] Step S2327, in response to determining that the current derived keyword does not belong to the target category keyword according to the second judgment result, the current derived keyword is converted into the first previous context information corresponding to the next first keyword.
[0090] Still Figure 7 As shown, when it is determined that the current derivative keyword does not belong to the target category keyword, it is determined that there is no corresponding derivative result at the current derivative position, and the current derivative keyword is converted into the previous text information corresponding to the next position keyword.
[0091] In an optional embodiment, the document information processing method further includes:
[0092] Step S2328, in response to determining that the calculation result is greater than or equal to the preset value according to the first comparison result, updating the current derived keyword at least according to the current derived node to obtain an updated derived keyword;
[0093] Step S2329, determine whether the updated derived keywords meet the derivation rationality condition, and obtain a third determination result; determine the derivation result according to the third determination result.
[0094] Still Figure 7 As shown, when the first comparison result determines that the quantity Q is greater than or equal to the preset value 1, the quantity Q is compared with the preset value 2. Then, when the comparison determines that the quantity Q is greater than or equal to the preset value 2, the midpoint between the current derivative node and the current derivative position is used as the derivative point, and the field between the derivative point and the current derivative position (including the current derivative keyword) is used as the new derivative keyword corresponding to the current derivative position (updated derivative keyword), and then it is determined whether the new derivative keyword meets the derivation rationality condition. When it is determined that the new derivative keyword meets the derivation rationality condition, the new derivative keyword is used as the new position keyword corresponding to the current derivative position; when it is determined that the new derivative keyword does not meet the derivation rationality condition, the position of the new derivative keyword is used as the new derivative node corresponding to the position keyword corresponding to the current derivative position, and then the quantity Q is re-determined according to the aforementioned steps based on the position keyword and the new derivative node.
[0095] Still Figure 7As shown, when the comparison determines that the number Q is greater than or equal to the preset value 1 and less than the preset value 2, the current derivative node is used as the derivative point, and the field between the derivative point and the current derivative position (including the current derivative keyword) is used as the new derivative keyword corresponding to the current derivative position (updated derivative keyword), and then it is determined whether the new derivative keyword meets the derivation rationality condition. When it is determined that the new derivative keyword meets the derivation rationality condition, the new derivative keyword and the current derivative position are used as the derivative result corresponding to the position keyword; when it is determined that the new derivative keyword does not meet the derivation rationality condition, it is determined whether the result of step 3.4.3.3 exists, and when the result exists, the result of step 3.4.3.3 is used as the information derivative result of the position keyword (including the corresponding position); when the result does not exist, it is determined whether the new derivative keyword belongs to the target category keyword. Further, when the new derivative keyword belongs to the target category keyword, the original position keyword and the position of the original keyword before the start of the process are determined as the derivative result; when the new derivative keyword does not belong to the target category keyword, it is determined that there is no corresponding derivative result for the current derivative position, and the position keyword of the current derivative position is converted into the previous text information related to the next position keyword.
[0096] In an optional embodiment, the document information processing method further includes:
[0097] Step S251, taking any first keyword as the current derived keyword;
[0098] Step S252, deriving and updating the current derived keyword according to the first previous text information corresponding to the current derived keyword and the unit document information of the preset derived quantity, to obtain an updated derived keyword;
[0099] Step S253, determining whether the updated derived keywords meet the derivation rationality condition, and obtaining a fourth determination result;
[0100] Step S254, in response to determining that the updated derived keyword meets the derivation rationality condition according to the fourth judgment result, cyclically derive the current derived keyword and update the current derivation number of the current derived keyword;
[0101] Step S255, in response to determining according to the fourth judgment result that the updated derived keyword does not meet the derivation rationality condition, a derivation result is determined at least according to the current derivation number.
[0102] Another alternative information derivation process can be as follows Figure 8As shown, firstly, the keyword position in the first position information is obtained and the keyword position is used as the current derivative position. Then, the position keyword corresponding to the current derivative position is read and the position keyword is used as the current derivative keyword. Further, the derivative node is extracted from the preprocessing result of the position keyword (at least including the derivative node, previous text information and subsequent text information corresponding to the position keyword) as the current derivative node, and then the document information between the current derivative node and the current derivative position is obtained, and the number of unit document information between the current derivative node and the current derivative position is calculated (recorded as Q). Further, the unit document information of the first preset derivative number (recorded as A) is added forward to the current derivative position as the updated derivative keyword, and the current derivative number is increased once, and it is judged whether the updated derivative keyword meets the derivative rationality condition. When the derivative rationality condition is met, it is judged whether the current derivative number is less than or equal to the number Q. When the current derivative number is less than or equal to the number Q, the derivative keyword and the derivative number are cyclically derived and updated.
[0103] Still Figure 8 As shown, when the updated derived keyword does not meet the derivation rationality condition, the current derivation position is increased forward by the second preset derivation number (denoted as B, where B=AC, 1≤C≤A) of unit document information as the updated derived keyword, and the current derivation number is increased once to determine whether the updated derived keyword meets the derivation rationality condition. When the derivation rationality condition is met, it is determined whether the current derivation number is less than or equal to the number Q. When the current derivation number is less than or equal to the number Q, the derived keyword and the derivation number are cyclically derived and updated.
[0104] Still Figure 8 As shown, when the updated derivative keyword still does not meet the derivation rationality condition, the number of unit document information added to the current derivative position is further reduced by one, and the derivation rationality judgment is still performed according to the above content. When it is judged that the updated derivative keyword meets the derivation rationality condition and the current derivation number is greater than or equal to the value 1, the current updated derivative keyword and the corresponding position are determined as the derivation result. When it is judged that the updated derivative keyword meets the derivation rationality condition and the current derivation number is less than the value 1, it is judged whether the current updated derivative keyword belongs to the target category keyword. When it belongs to the target category keyword, the current updated derivative keyword and the corresponding position are determined as the derivation result; when it does not belong to the target category keyword, it indicates that the current position keyword is not suitable for information derivation, and the current derivative position is deleted from the first position information.
[0105] In an optional embodiment, in step S204, the information collection to be compared includes multiple first information groups, any one of the first information groups is composed of first derivative information and first requirement information, the first derivative information is determined by the derivative result corresponding to any one of the first keywords in the document to be processed, the first requirement information is the requirement information obtained by matching the first derivative information in the first subsequent information corresponding to any one of the first keywords according to the preset matching requirement, the reference information collection includes multiple second information groups, any one of the second information groups is composed of second derivative information and second requirement information, the second derivative information is determined by the derivative result corresponding to any one of the second keywords in the reference document, the second requirement information is the requirement information obtained by matching the second derivative information in the second subsequent information corresponding to any one of the second keywords according to the preset matching requirement, the second subsequent information is determined by the second processing result, and the information collection to be compared is compared with the reference information collection to obtain the target information collection including:
[0106] Step S241, comparing any one of the first derivative information with any one of the second derivative information to obtain a second comparison result, wherein the second comparison result includes a similarity between any one of the first derivative information and any one of the second derivative information;
[0107] Step S242, in response to determining that the similarity is less than or equal to a preset similarity threshold according to the second comparison result, generating a target information collection according to any one of the first derivative information and any one of the second derivative information;
[0108] Step S243, in response to determining that the similarity is greater than a preset similarity threshold according to the second comparison result, compare the first requirement information corresponding to any one of the first information with the second requirement information corresponding to any one of the second derivative information to obtain a third comparison result;
[0109] Step S244, in response to determining that the first requirement information is different from the second requirement information according to the three comparison results, a target information collection is generated according to a first information group corresponding to any one of the first derivative information and a second information group corresponding to any one of the second derivative information.
[0110] In the present invention, after the derived results are obtained through information derivation, the derived information is extracted from the derived results (e.g., the location keyword is "substation", and the derived information is "220VXX substation"), and the subsequent information corresponding to the location keyword is extracted from the keyword preprocessing result. Then, the demand information corresponding to the derived information is matched from the subsequent information according to the user's demand, such as Fig. 9As shown, user requirements may include but are not limited to: numerical matching requirements, content matching requirements, and other matching requirements. Furthermore, the derivative information corresponding to each position keyword and the requirement information are combined into an information group, and the information group is sorted to obtain a data collection corresponding to the document. It should be noted that the sorting basis may be but is not limited to one of the following: numbers, symbols, letters, and Chinese characters.
[0111] When performing information comparison, first compare any first derivative information in the data collection to be compared with any second derivative information in the benchmark data collection to determine whether there is first derivative information that meets the similarity requirements (that is, the similarity is less than or equal to the preset similarity threshold). When there is no second derivative information that meets the similarity requirements in the benchmark data collection, the first derivative information is added to the target information collection.
[0112] When there is second derivative information that meets the similarity requirement in the reference data collection, the first requirement information corresponding to the current first derivative information is further compared with the second requirement information corresponding to the second derivative information. When the first requirement information is the same as the second requirement information, it is determined that there is no difference between the two information groups. Then, the next first derivative information in the data collection to be compared is traversed and the difference is compared. When the first requirement information is different from the second requirement information, the information group consisting of the first derivative information and the first requirement information is added to the target information collection.
[0113] It should be noted that after the target information collection is determined by comparison, the target information collection can be converted into a file in a common format (such as a document, a table, etc.) so that the user can flexibly access it.
[0114] In an embodiment of the present invention, a document to be processed and a benchmark document are first obtained, then the document to be processed is preprocessed to obtain a first processing result, and the benchmark document is preprocessed to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the benchmark document, and then information is derived from the first keyword based on the first processing result to obtain an information collection to be compared, and information is derived from the second keyword based on the second processing result to obtain a benchmark information collection, and finally, a difference comparison is performed between the information collection to be compared and the benchmark information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the benchmark information collection.
[0115] It is easy to understand that the above method determines the keywords to be derived in the processed document and the benchmark document and the preceding and following information of each derived keyword by performing refined preprocessing operations such as segmentation, keyword matching, and structural division on the processed document and the benchmark document, and then derives information from the derived keywords based on the processing results obtained from the preprocessing to obtain an information collection containing derived information and required information. Then, by performing a difference comparison between the information collection to be compared corresponding to the processed document and the benchmark information collection corresponding to the benchmark document, the purpose of accurately and efficiently processing the document information in a manner that can meet the user's customized needs is achieved, thereby achieving the technical effect of improving the accuracy and efficiency of document information processing and saving costs, and thus solving the technical problems of the prior art in that the document information processing accuracy is poor and the information deriving depends on large artificial intelligence models, resulting in high costs.
[0116] In this embodiment, a document information processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, a "module" is a combination of software and / or hardware that can implement a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0117] Fig.10 is a structural block diagram of a document information processing device according to an embodiment of the present invention. Fig.10 As shown, the device comprises:
[0118] An acquisition module 1001 is used to acquire a document to be processed and a reference document;
[0119] A preprocessing module 1002 is used to preprocess the document to be processed to obtain a first processing result, and to preprocess the reference document to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the reference document;
[0120] A first derivation module 1003 is used to derive information from the first keyword based on the first processing result to obtain a collection of information to be compared, and to derive information from the second keyword based on the second processing result to obtain a collection of reference information;
[0121] The comparison module 1004 is used to compare the information collection to be compared with the reference information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the reference information collection.
[0122] Optionally, the above-mentioned preprocessing module 1002 is also used to: use a document analyzer to analyze and process the document to be processed to obtain block information, wherein the block information is used to characterize the structure and semantics of the document to be processed; match any keyword in the block information with any demand keyword to obtain a matching result, wherein any demand keyword is determined by a preset demand vocabulary, and the matching result includes a first keyword and first position information, the first keyword is a keyword that successfully matches any demand keyword, and the first position information is used to determine the position of any first keyword in the block information; structurally divide the block information based on the matching result to obtain a first processing result, wherein the first processing result includes a first preceding text information corresponding to the first keyword and a first following text information corresponding to the first keyword, the first preceding text information is information in the block information that is before the position of the first keyword, and the first following text information is information in the block information that is after the position of the first keyword.
[0123] Optionally, the above-mentioned first derivation module 1003 is also used to: read any first keyword in sequence according to the position order represented by the first position information and use any first keyword as the current derived keyword; derive information for the current derived keyword at least according to the current derivation node and the current derivation position to obtain a derivation result, wherein the current derivation node is the position of the target unit document information in the block information, the target unit document information is the longest unit document information for which the current derived keyword is derivatized in the block information, the current derivation position is the position of the current derived keyword in the block information, and the current derivation position is determined by the first position information; generate a collection of information to be compared according to the derivation result and the first subsequent information corresponding to the current derived keyword.
[0124] Optionally, the above-mentioned first derivation module 1003 is also used to: take the beginning of the block information as the starting derivation node, calculate the number of unit document information located between the current derivation node and the current derivation position, and obtain a calculation result; compare the calculation result with a preset value to obtain a first comparison result, wherein the first comparison result is used to determine whether to perform a loop derivation on the current derived keyword; in response to determining that the calculation result is less than the preset value according to the first comparison result, determine whether the current derived keyword exists in the preset demand vocabulary to obtain a first judgment result; in response to determining that the current derived keyword does not exist in the preset demand vocabulary according to the first judgment result, generate a derivative result according to the current derived keyword and the current derivation position.
[0125] Optionally, the above-mentioned document information processing device also includes: a generation module (not shown in the figure), which is used to respond to the determination based on the first judgment result that the current derived keyword exists in the preset demand vocabulary, judge whether the current derived keyword belongs to the target category keyword, and obtain a second judgment result; in response to the determination based on the second judgment result that the current derived keyword belongs to the target category keyword, generate a derivative result based on the current derived keyword and the current derivative position.
[0126] Optionally, the document information processing device further includes: a conversion module (not shown in the figure), which is used to respond to the second judgment result that determines that the current derived keyword does not belong to the target category keyword, and convert the current derived keyword into the first previous text information corresponding to the next first keyword.
[0127] Optionally, the above-mentioned document information processing device also includes: a determination module (not shown in the figure), which is used to respond to determining that the calculation result is greater than or equal to a preset value based on the first comparison result, and to update the current derived keywords at least according to the current derived node to obtain updated derived keywords; judge whether the updated derived keywords meet the derivation rationality conditions to obtain a third judgment result; and determine the derived results based on the third judgment result.
[0128] Optionally, the above-mentioned document information processing device also includes: a second derivation module (not shown in the figure), which is used to take any one of the first keywords as the current derived keyword; derive and update the current derived keyword according to the first previous text information corresponding to the current derived keyword and the unit document information of a preset number of derivations, to obtain an updated derived keyword; judge whether the updated derived keyword meets the derivation rationality condition to obtain a fourth judgment result; in response to determining that the updated derived keyword meets the derivation rationality condition according to the fourth judgment result, cyclically derive the current derived keyword and update the current number of derivations of the current derived keyword; in response to determining that the updated derived keyword does not meet the derivation rationality condition according to the fourth judgment result, determine the derivation result at least according to the current number of derivations.
[0129] Optionally, the information collection to be compared includes a plurality of first information groups, any one of the first information groups is composed of first derivative information and first requirement information, the first derivative information is determined by a derivative result corresponding to any first keyword in the document to be processed, the first requirement information is requirement information obtained by matching the first derivative information in the first subsequent information corresponding to any first keyword according to a preset matching requirement, the reference information collection includes a plurality of second information groups, any one of the second information groups is composed of second derivative information and second requirement information, the second derivative information is determined by a derivative result corresponding to any second keyword in the reference document, the second requirement information is requirement information obtained by matching the second derivative information in the second subsequent information corresponding to any second keyword according to the preset matching requirement, the second subsequent information is determined by the second processing result, and the comparison module 1004 It is also used for: comparing any first derivative information with any second derivative information to obtain a second comparison result, wherein the second comparison result includes the similarity between any first derivative information and any second derivative information; in response to determining that the similarity is less than or equal to a preset similarity threshold according to the second comparison result, generating a target information collection according to any first derivative information and any second derivative information; in response to determining that the similarity is greater than the preset similarity threshold according to the second comparison result, comparing first requirement information corresponding to any first information with second requirement information corresponding to any second derivative information to obtain a third comparison result; in response to determining that the first requirement information is different from the second requirement information according to the three comparison results, generating a target information collection according to a first information group corresponding to any first derivative information and a second information group corresponding to any second derivative information.
[0130] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0131] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, any of the document information processing methods described above is implemented.
[0132] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0133] Step S1, obtaining a document to be processed and a reference document;
[0134] Step S2, preprocessing the document to be processed to obtain a first processing result, and preprocessing the reference document to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the reference document;
[0135] Step S3, deriving information from the first keyword based on the first processing result to obtain a collection of information to be compared, and deriving information from the second keyword based on the second processing result to obtain a collection of reference information;
[0136] Step S4, performing a difference comparison between the information collection to be compared and the reference information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the reference information collection.
[0137] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0138] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiment and its optional implementation manners, and this embodiment will not be described in detail here.
[0139] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0140] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0141] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0143] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk, etc., various media that can store program codes.
[0145] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A document information processing method, characterized in that: include: Get the pending documents and the baseline documents; Preprocessing the document to be processed to obtain a first processing result, and preprocessing the reference document to obtain a second processing result, wherein the first processing result is at least used to determine a first keyword, which is a keyword to be derived in the document to be processed, and the second processing result is at least used to determine a second keyword, which is a keyword to be derived in the reference document; Deriving information from the first keyword based on the first processing result to obtain a collection of information to be compared, and deriving information from the second keyword based on the second processing result to obtain a collection of reference information; The information collection to be compared is compared with the reference information collection to obtain a target information collection, wherein the target information collection is used to characterize the difference between the information collection to be compared and the reference information collection.
2. The document information processing method according to claim 1, characterized in that: Preprocessing the document to be processed to obtain the first processing result includes: Analyzing and processing the document to be processed by using a document analyzer to obtain block information, wherein the block information is used to characterize the structure and semantics of the document to be processed; Matching any keyword in the block information with any demand keyword to obtain a matching result, wherein the any demand keyword is determined by a preset demand vocabulary, and the matching result includes the first keyword and first position information, the first keyword is a keyword that successfully matches the any demand keyword, and the first position information is used to determine the position of any first keyword in the block information; The block information is structurally divided based on the matching result to obtain the first processing result, wherein the first processing result includes first preceding context information corresponding to the first keyword and first following context information corresponding to the first keyword, the first preceding context information is information in the block information that is located before the position of the first keyword, and the first following context information is information in the block information that is located after the position of the first keyword.
3. The document information processing method according to claim 2, characterized in that: The first keyword is subjected to information derivation based on the first processing result, and the collection of information to be compared is obtained, including: According to the position sequence represented by the first position information, read the any first keyword in sequence and use the any first keyword as the current derived keyword; At least according to the current derivation node and the current derivation position, the current derivation keyword is derivatized to obtain a derivation result, wherein the current derivation node is the position of the target unit document information in the block information, the target unit document information is the longest unit document information in which the current derivation keyword is derivatized in the block information, the current derivation position is the position of the current derivation keyword in the block information, and the current derivation position is determined by the first position information; The collection of information to be compared is generated according to the derived result and the first subsequent information corresponding to the current derived keyword.
4. The document information processing method according to claim 3, characterized in that: At least according to the current derivation node and the current derivation position, information is derived for the current derivation keyword to obtain the derivation result, including: Taking the beginning of the block information as the starting derivative node, calculating the number of unit document information between the current derivative node and the current derivative position to obtain a calculation result; Comparing the calculation result with a preset value to obtain a first comparison result, wherein the first comparison result is used to determine whether to perform a cyclic derivation on the current derived keyword; In response to determining that the calculation result is less than the preset value according to the first comparison result, determining whether the current derived keyword exists in the preset demand word library to obtain a first determination result; In response to determining, according to the first judgment result, that the current derived keyword does not exist in the preset demand vocabulary, the derived result is generated according to the current derived keyword and the current derived position.
5. The document information processing method according to claim 4, characterized in that: The document information processing method further includes: In response to determining that the current derived keyword exists in the preset demand word library according to the first judgment result, determining whether the current derived keyword belongs to a target category keyword, and obtaining a second judgment result; In response to determining that the current derived keyword belongs to the target category keyword according to the second judgment result, the derived result is generated according to the current derived keyword and the current derived position.
6. The document information processing method according to claim 5, characterized in that: The document information processing method further includes: In response to determining that the current derived keyword does not belong to the target category keyword according to the second judgment result, the current derived keyword is converted into first preceding context information corresponding to the next first keyword.
7. The document information processing method according to claim 4, characterized in that: The document information processing method further includes: In response to determining, according to the first comparison result, that the calculation result is greater than or equal to the preset value, updating the current derived keyword at least according to the current derived node to obtain an updated derived keyword; Determine whether the updated derived keyword meets the derivation rationality condition, and obtain a third determination result; The derived result is determined according to the third judgment result.
8. The document information processing method according to claim 3, characterized in that: The document information processing method further includes: Taking any one of the first keywords as the current derived keyword; According to the first preceding text information corresponding to the current derived keyword and the unit document information of a preset derived quantity, the current derived keyword is subjected to information derivation and update to obtain an updated derived keyword; Determine whether the updated derived keyword meets the derivation rationality condition, and obtain a fourth determination result; In response to determining that the updated derived keyword satisfies the derivation rationality condition according to the fourth judgment result, cyclically deriving the current derived keyword and updating the current derivation number of the current derived keyword; In response to determining, according to the fourth judgment result, that the updated derived keyword does not satisfy the derivation rationality condition, a derivation result is determined at least according to the current derivation number.
9. The document information processing method according to claim 4, characterized in that: The information collection to be compared includes a plurality of first information groups, any one of the first information groups is composed of first derivative information and first requirement information, the first derivative information is determined by a derivative result corresponding to any first keyword in the document to be processed, the first requirement information is requirement information obtained by matching the first derivative information in the first subsequent information corresponding to any first keyword according to a preset matching requirement, the reference information collection includes a plurality of second information groups, any one of the second information groups is composed of second derivative information and second requirement information, the second derivative information is determined by a derivative result corresponding to any second keyword in the reference document, the second requirement information is requirement information obtained by matching the second derivative information in the second subsequent information corresponding to any second keyword according to the preset matching requirement, the second subsequent information is determined by the second processing result, and the target information collection is obtained by performing a difference comparison between the information collection to be compared and the reference information collection, and includes: Compare any one of the first derivative information with any one of the second derivative information to obtain a second comparison result, wherein the second comparison result includes a similarity between the any one of the first derivative information and the any one of the second derivative information; In response to determining, according to the second comparison result, that the similarity is less than or equal to a preset similarity threshold, generating the target information collection according to any one of the first derivative information and any one of the second derivative information; In response to determining that the similarity is greater than the preset similarity threshold according to the second comparison result, comparing the first requirement information corresponding to any one of the first information with the second requirement information corresponding to any one of the second derived information to obtain a third comparison result; In response to determining that the first requirement information is different from the second requirement information according to the three comparison results, the target information collection is generated according to a first information group corresponding to any one of the first derivative information and a second information group corresponding to any one of the second derivative information.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the document information processing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Quick retrieval method for documents in knowledge base, application server and computer readable storage medium
CN108038096A
Document label information generation method and device, equipment, medium and program product
CN115129899A
Document comparison method and device, equipment and medium
CN115937891A
Text matching method and device, equipment and storage medium
CN116956861A
Document expansion method and device, electronic equipment and readable storage medium
CN117217184A