Government affair construction scheme analysis method and device and computer equipment

Through the pre-constructed keyword database of government affairs construction and the pre-trained text content similarity model, the content extraction and similarity detection of government affairs construction plans is solved, and the problem of low accuracy of government affairs construction plans in the existing technology is achieved, and high Similarity calculation of accuracy.

CN119106106AInactive Publication Date: 2024-12-10HANGZHOU SHUWEISHANXING TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411597242.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing document plagiarism check model has low detection accuracy in government affairs construction plans, mainly due to inaccurate detection of the similarity of the calculated document caused by the differences in the public data set and the actual text expression form.

Method used

The pre-constructed government affairs construction keyword database is used to locate and extract contents of portable document format documents of government affairs construction plans, and similarity detection is carried out in combination with the pre-trained government affairs text content similarity model to determine duplicate government affairs construction plans.

Benefits of technology

It improves the accuracy of the accurate extraction of the content of the government construction plan and the accuracy of similarity calculation, reduces the amount of calculation, and ensures the reliability of the test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106106A_ABST
    Figure CN119106106A_ABST
Patent Text Reader

Abstract

The invention provides a government affair construction scheme analysis method, a government affair construction scheme analysis device and computer equipment, and relates to the technical field of data processing. Performing government affair construction content positioning extraction on the portable document format document of each government affair construction scheme in a plurality of preset government affair construction schemes to obtain government affair construction content data of each government affair construction scheme; according to the government affair construction content data of the plurality of government affair construction schemes, performing similarity detection on the plurality of government affair construction schemes by adopting a pre-trained government affair text content similarity model to obtain a similarity detection result of every two government affair construction schemes; and according to a similarity detection result of every two government affair construction schemes in the plurality of government affair construction schemes, determining at least two repeated target government affair construction schemes from the plurality of government affair construction schemes. The government affair construction scheme content can be accurately extracted, the calculation amount is reduced, and the detection accuracy is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and more specifically, to a method, device and computer equipment for analyzing government construction plans. Background Art

[0002] The calculation of document similarity has important application value in the fields of information retrieval, text mining and intellectual property. In existing technologies, the calculation of document similarity mainly relies on methods such as word frequency statistics and vector space models. By counting and analyzing the words in the document, the feature vector of the document is constructed, and then the similarity between documents is measured by calculating the distance or angle between the vectors.

[0003] However, most document duplication detection models on the market calculate the probability of text similarity based on the number of text repetitions, using cutting-edge models to train network public data sets. However, the text expression of actual government construction plans is quite different from the public data sets, and direct application will result in low detection accuracy. Summary of the invention

[0004] The purpose of this application is to provide a government construction plan analysis method, device and computer equipment to accurately extract the content of the government construction plan, reduce the amount of calculation, and ensure the accuracy of detection in response to the deficiencies in the above-mentioned prior art.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows: In a first aspect, an embodiment of the present application provides a method for analyzing a government affairs construction plan, the method comprising: Using a pre-built government affairs construction keyword library, locate and extract government affairs construction content from a portable document format document of each government affairs construction plan among a plurality of preset government affairs construction plans, and obtain government affairs construction content data of each government affairs construction plan; Based on the government affairs construction content data of the plurality of government affairs construction plans, a pre-trained government affairs text content similarity model is used to perform similarity detection on the plurality of government affairs construction plans, and obtain a similarity detection result of every two government affairs construction plans in the plurality of government affairs construction plans; According to the similarity detection result of every two government affairs construction plans among the multiple government affairs construction plans, at least two repeated target government affairs construction plans are determined from the multiple government affairs construction plans.

[0006] Optionally, the pre-built government affairs construction keyword library is used to locate and extract the government affairs construction content of each government affairs construction plan in a portable document format of a plurality of preset government affairs construction plans, and the government affairs construction content data of each government affairs construction plan is obtained, including: Using the government affairs construction keyword library, matching the portable document format document of each government affairs construction plan with government affairs keywords to obtain all target title information having at least one government affairs keyword in the portable document format document of each government affairs construction plan; Extracting target title serial numbers from all target title information; Extracting, from the portable document format document of each government affairs construction plan, the row numbers of all content titles including the target title sequence number according to the target title sequence number and the preset title hierarchy relationship; According to the row numbers of all the content titles, the government affairs construction content of each government affairs construction plan is extracted to obtain the government affairs construction content data of each government affairs construction plan.

[0007] Optionally, before using a pre-built government affairs construction keyword library to locate and extract government affairs construction content from a portable document format document of each government affairs construction plan among a plurality of preset government affairs construction plans, and obtaining government affairs construction content data of each government affairs construction plan, the method further includes: Extracting government keywords according to historical government construction plans for multiple government units to obtain multiple government keywords; The government affairs construction keyword library is constructed based on the multiple government affairs keywords.

[0008] Optionally, extracting the row numbers of all content titles including the target title sequence number from the portable document format document of each government affairs construction plan according to the target title sequence number and the preset title hierarchy relationship includes: According to each target title number among all the target title numbers and the preset title hierarchy relationship, the row numbers of all hierarchical titles under the target title number are extracted level by level from the portable document format document of each government construction plan to obtain the row numbers of all content titles.

[0009] Optionally, extracting government affairs construction content from each government affairs construction plan according to the row numbers of all content titles to obtain government affairs construction content data of each government affairs construction plan includes: According to the line number of any content title among all the content titles, the content data of the government construction content of each government construction plan is extracted line by line until the next same-level title is reached, and the government construction content data of any content title is obtained.

[0010] Optionally, before performing similarity detection on the multiple government affairs construction plans based on the government affairs construction content data of the multiple government affairs construction plans using a pre-trained government affairs text content similarity model and obtaining the similarity detection result between every two government affairs construction plans in the multiple government affairs construction plans, the method further includes: Cleaning the government affairs construction content data of each government affairs construction plan to obtain target government affairs construction data of each government affairs construction plan; The process of performing similarity detection on the plurality of government affairs construction plans based on the government affairs construction content data of the plurality of government affairs construction plans by using a pre-trained government affairs text content similarity model to obtain similarity detection results of every two government affairs construction plans in the plurality of government affairs construction plans includes: According to the target government affairs construction content data of each two government affairs construction plans, the government affairs text content similarity model is adopted to perform similarity detection on each two government affairs construction plans to obtain the similarity detection result of the two government affairs construction plans.

[0011] Optionally, before performing similarity detection on each of the two government affairs construction plans based on the target government affairs construction content data of each of the two government affairs construction plans by using the government affairs text content similarity model and obtaining the similarity detection result of the two government affairs construction plans, the method further includes: Slicing the target government affairs construction content data of each government affairs construction plan to obtain a plurality of content slices of each government affairs construction plan; The similarity detection of each of the two government affairs construction plans is performed based on the target government affairs construction content data of each of the two government affairs construction plans by using the government affairs text content similarity model to obtain the similarity detection results of the two government affairs construction plans, including: According to the multiple content slices of each government affairs construction plan in each of the two government affairs construction plans, the government affairs text content similarity model is used to perform similarity detection on each of the two government affairs construction plans to obtain a similarity detection result for each of the two government affairs construction plans.

[0012] Optionally, before performing similarity detection on the multiple government affairs construction plans based on the government affairs construction content data of the multiple government affairs construction plans using a pre-trained government affairs text content similarity model and obtaining the similarity detection result between every two government affairs construction plans in the multiple government affairs construction plans, the method further includes: Extracting synonymous government data sets and heteronymous government data sets from preset historical government documents; The preset initial document similarity model is trained according to the synonymous government affairs data set and the heteronymous government affairs data set to obtain the government affairs text content similarity model.

[0013] In a second aspect, another embodiment of the present application provides a device for analyzing a government affairs construction plan, the device for analyzing a government affairs construction plan comprising: An extraction module is used to use a pre-built government affairs construction keyword library to locate and extract government affairs construction content from a portable document format document of each government affairs construction plan among a plurality of preset government affairs construction plans, and obtain government affairs construction content data of each government affairs construction plan; A detection module, configured to perform similarity detection on the plurality of government affairs construction plans according to the government affairs construction content data of the plurality of government affairs construction plans by using a pre-trained government affairs text content similarity model, and obtain a similarity detection result of every two government affairs construction plans in the plurality of government affairs construction plans; The determination module is used to determine at least two repeated target government affairs construction plans from the multiple government affairs construction plans based on the similarity detection results of every two government affairs construction plans from the multiple government affairs construction plans.

[0014] In the third aspect, another embodiment of the present application provides a computer device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the government affairs construction plan analysis method as described in any one of the first aspects above.

[0015] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the government affairs construction plan analysis method as described in any one of the above-mentioned first aspects are executed.

[0016] The beneficial effects of this application are: The present application provides a method, device and computer equipment for analyzing government affairs construction schemes, which uses a pre-built government affairs construction keyword library to locate and extract the government affairs construction content of each government affairs construction scheme in a portable document format of a preset plurality of government affairs construction schemes, and obtain the government affairs construction content data of each government affairs construction scheme; based on the government affairs construction content data of the plurality of government affairs construction schemes, a pre-trained government affairs text content similarity model is used to perform similarity detection on the plurality of government affairs construction schemes, and obtain the similarity detection results of every two government affairs construction schemes in the plurality of government affairs construction schemes; based on the similarity detection results of every two government affairs construction schemes in the plurality of government affairs construction schemes, at least two target government affairs construction schemes that are repeated are determined from the plurality of government affairs construction schemes. The present application can extract the government affairs construction content data in each government affairs construction scheme, thereby determining the similarity of the government affairs construction content data in different government affairs construction schemes, and determining the similarity of the government affairs construction schemes based on the similarity of the government affairs construction content. The government affairs construction content data is accurately extracted, the amount of calculation is reduced, and the accuracy of the similarity calculation is ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A flowchart of a method for analyzing a government affairs construction plan provided in an embodiment of the present application; Figure 2 A schematic diagram of a process for determining government affairs construction content data in a government affairs construction scheme analysis method provided in an embodiment of the present application; Figure 3 A schematic diagram of a process for constructing a keyword library in a method for analyzing a government affairs construction plan provided in an embodiment of the present application; Figure 4 A schematic diagram of a process for determining a similarity detection result in a method for analyzing a government construction plan provided in an embodiment of the present application; Figure 5 A schematic diagram of a process for determining a similarity detection result in another method for analyzing a government affairs construction plan provided in an embodiment of the present application; Figure 6 A schematic diagram of a process for determining a government affairs text content similarity model in a government affairs construction plan analysis method provided in an embodiment of the present application; Figure 7 A schematic diagram of a device for analyzing a government affairs construction plan provided in an embodiment of the present application; Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0020] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0021] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0022] At present, there are a large number of clichés or other meaningless expressions in government construction plans. It is necessary to automatically extract construction-related content from portable document format (PDF) document articles with hundreds of thousands or millions of words, and perform repetitive analysis on sentences with the same semantic context to obtain the analysis results of the government construction plan. This results in a large amount of calculation in the analysis process of the government construction plan, and the accuracy of the calculation results is not high. To this end, the present application provides a government construction plan analysis method. In order to clearly describe a government construction plan analysis method provided in an embodiment of the present application, the government construction plan analysis method provided in an embodiment of the present application is described below in conjunction with a plurality of accompanying drawings, Figure 1 A flowchart of a method for analyzing a government affairs construction plan provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes: Step 101: Use a pre-built government affairs construction keyword library to locate and extract the government affairs construction content of each government affairs construction plan in a portable document format of a plurality of preset government affairs construction plans, and obtain the government affairs construction content data of each government affairs construction plan.

[0023] Among them, the government affairs keyword library can be constructed when writing the government affairs construction plan, or it can be constructed according to the government affairs construction plan that has been written, and the embodiment of the present application does not limit this. The government affairs construction plan is a plan for constructing government affairs, including multiple government affairs related contents. The government affairs construction plan includes multiple high-level titles and multiple low-level titles under the high-level. Each line in the government affairs construction plan has a corresponding line number for locating the content of the line. The government affairs construction keyword library may include: construction plan, support capabilities, construction content, business functions and other government affairs construction related words, and the embodiment of the present application does not limit this.

[0024] The positioning extraction can be performed based on the text features of the government affairs construction content, based on the location information of the government affairs construction content, or based on the structured tags of the government affairs construction content, and the embodiments of the present application do not impose any restrictions on this.

[0025] Optionally, by pre-building a government affairs construction keyword library, the government affairs construction keyword library includes multiple government affairs construction related words, and the government affairs construction content of the portable document format document of each government affairs construction plan in the preset multiple government affairs construction plans is matched according to the government affairs construction keyword library, and the government affairs construction content is located and extracted according to the matching results to obtain the government affairs construction content data of each government affairs construction plan.

[0026] Step 102: Based on the government affairs construction content data of the plurality of government affairs construction plans, a pre-trained government affairs text content similarity model is used to perform similarity detection on the plurality of government affairs construction plans, and obtain similarity detection results for every two government affairs construction plans in the plurality of government affairs construction plans.

[0027] The pre-trained government text content similarity model is used to calculate the similarity between the government construction content data of multiple government construction plans. The pre-trained government text content similarity model can be a pre-trained language model based on Bidirectional Encoder Representations from Transformers (BERT model) or other models that can calculate the similarity of government text content, which is not limited in the embodiments of the present application.

[0028] Optionally, the government construction content data of every two government construction plans among the multiple government construction plans are used as inputs of a pre-trained government text content similarity model, and similarity detection is performed on the government construction content data of every two government construction plans to obtain similarity detection results of every two government construction plans among the multiple government construction plans, until the government construction content data of all government construction plans are checked every two.

[0029] Step 103: According to the similarity detection result between every two government affairs construction plans in the multiple government affairs construction plans, at least two repeated target government affairs construction plans are determined from the multiple government affairs construction plans.

[0030] Optionally, by setting a similarity threshold, the similarity detection results of every two government affairs construction plans among the multiple government affairs construction plans are compared with the similarity threshold; if there are two government affairs construction plans among the multiple government affairs construction plans whose similarity detection results are greater than the similarity threshold, then at least two target government affairs construction plans with repeated similarity detection results are determined from the multiple government affairs construction plans.

[0031] The present application provides a method for analyzing government affairs construction schemes, which uses a pre-constructed government affairs construction keyword library to locate and extract government affairs construction content from a portable document format document of each government affairs construction scheme in a plurality of preset government affairs construction schemes, and obtains government affairs construction content data of each government affairs construction scheme; based on the government affairs construction content data of the plurality of government affairs construction schemes, a pre-trained government affairs text content similarity model is used to perform similarity detection on the plurality of government affairs construction schemes, and obtains similarity detection results of every two government affairs construction schemes in the plurality of government affairs construction schemes; based on the similarity detection results of every two government affairs construction schemes in the plurality of government affairs construction schemes, at least two target government affairs construction schemes that are repeated are determined from the plurality of government affairs construction schemes. The present application can extract the government affairs construction content data in each government affairs construction scheme, thereby determining the similarity of the government affairs construction content data in different government affairs construction schemes, and determining the similarity of the government affairs construction schemes based on the similarity of the government affairs construction content. The government affairs construction content data is accurately extracted, the amount of calculation is reduced, and the accuracy of the similarity calculation is ensured.

[0032] Based on the above embodiments, the present application also provides a process for determining government construction content data in a government construction solution analysis method. Figure 2 A schematic diagram of a process for determining government construction content data in a government construction plan analysis method provided in an embodiment of the present application, such as using a pre-built government construction keyword library in the above step 101 to locate and extract government construction content from a portable document format document of each government construction plan in a plurality of preset government construction plans, and obtaining government construction content data of each government construction plan, including: Step 201: Use the government affairs construction keyword library to match the government affairs keywords for each portable document format document of the government affairs construction plan, and obtain all target title information having at least one government affairs keyword in the portable document format document of each government affairs construction plan.

[0033] The target title information includes: title name, title level, title row number and other information, which is not limited in the embodiment of the present application.

[0034] Optionally, the content in the portable document format document of each government affairs construction plan is matched with the government affairs construction keywords in the government affairs construction keyword library. If there is content matching the government affairs construction keywords in the portable document format document of the government affairs construction plan, all target title information of the government affairs keywords is determined from the portable document format document of each government affairs construction plan.

[0035] For example, the extracted title information may be: "Chapter 4 Construction Plan", "Chapter 5 Implementation Plan", "4 Construction Plan", "4.1.1 Construction Content", "4.1.2 Technical Route", etc., and the embodiments of the present application do not limit this.

[0036] Optionally, before matching the government keywords to the portable document format document of each government construction plan, a preset portable document format document extraction tool is used to extract the content of each government construction plan's portable document format document. During the extraction process, the line is determined to be a title line or a content line based on the content at the beginning of each line. The preset portable document format document extraction tool may be a pdfplumber tool, and the content at the beginning of a line may be a digital keyword, font size, or whether to bold, etc., which is not limited in the present embodiment of the application.

[0037] Step 202: Extract the target title serial number from all target title information.

[0038] Optionally, the target title information is identified to obtain the target title information, and the target title serial number is obtained from the target title information.

[0039] For example, "Chapter 4" is extracted from "Chapter 4 Construction Plan", "4.1.1" is extracted from "4.1.1 Construction Content", "5" is extracted from "5 Project Construction Plan", etc.

[0040] Step 203: extract the row numbers of all content titles including the target title sequence number from the portable document format document of each government affairs construction plan according to the target title sequence number and the preset title hierarchy relationship.

[0041] Among them, the title level corresponding to the target title can be determined by the target title serial number, and the title level is divided into high-level titles and low-level titles. The preset title level relationship can be pre-set, including serial number information corresponding to the first, second, third, and fourth level titles. For example, "Chapter 4" is a high-level title, "4.1.1" is a low-level title, etc. This application does not limit the specific title level setting.

[0042] Optionally, different title numbers in the present application correspond to different line numbers, and different title numbers may correspond to different title levels, and the title levels may be high-level levels and low-level levels. According to the target title number and the title level corresponding to the target title number, the line numbers of all content titles including the target title number are extracted from the portable document format document of each government construction plan.

[0043] For example, when the target title is a high-level title, the title serial numbers of the target title and the low-level titles under the target title, as well as the target title serial number and the line numbers of all content titles of the low-level titles under the target title are extracted from the portable document format document of each government affairs construction plan; when the target title is a low-level title, the line numbers of all content under the target title serial number are extracted from the portable document format document of each government affairs construction plan.

[0044] Step 204: extract the government affairs construction content of each government affairs construction plan according to the row numbers of all content titles, and obtain the government affairs construction content data of each government affairs construction plan.

[0045] Optionally, the row numbers of all content titles are determined based on the row numbers of the target title serial number and multiple contents in the target title serial number, thereby extracting the government affairs construction content for each government affairs construction plan based on the row numbers of all content titles to obtain the government affairs construction content data for each government affairs construction plan.

[0046] In the embodiment of the present application, a government construction keyword library is used to match government construction keywords on the portable document format document of each government construction plan, obtain all target title information with at least one government keyword in the portable document format document of each government construction plan, extract the target title sequence number from all target title information, extract the line number of all content titles including the target title sequence number from the portable document format document of each government construction plan according to the target title sequence number and the preset title hierarchy relationship, extract government construction content from each government construction plan according to the line number of all content titles, and obtain government construction content data of each government construction plan. The present application can ensure the accuracy of government construction content data extraction and improve the efficiency of government construction content data extraction.

[0047] Based on the above embodiments, the present application also provides a process for constructing a keyword library in a method for analyzing a government construction plan. Figure 3 A flowchart of constructing a keyword library in a method for analyzing a government construction plan provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, in the above step 101, a pre-built government affairs construction keyword library is used to locate and extract the government affairs construction content of each government affairs construction plan in a portable document format of a plurality of preset government affairs construction plans, and before obtaining the government affairs construction content data of each government affairs construction plan, the method further includes: Step 301: extract government affairs keywords according to historical government affairs construction plans for multiple government affairs units to obtain multiple government affairs keywords.

[0048] Optionally, since different units have different forms of expression for construction content when compiling construction plans, it is necessary to sort out the different forms of expression of the titles describing the construction content in the construction plan documents, then according to the historical government construction plans of multiple government units, the words related to government construction are determined from the historical government construction methods of multiple government units for extraction to obtain multiple government keywords. Among them, the government unit can be any government construction-related unit, and this embodiment of the application does not limit this.

[0049] Step 302: construct a government affairs construction keyword library based on multiple government affairs keywords.

[0050] Optionally, multiple government affairs keywords extracted from historical government affairs construction plans of multiple government affairs units are summarized, and a government affairs construction keyword library is constructed based on the summarized multiple government affairs keywords.

[0051] This application extracts government keywords based on historical government construction plans for multiple government units, obtains multiple government keywords, and constructs a government construction keyword library based on multiple government keywords. This facilitates the subsequent accurate extraction of portable document format documents of government construction plans, so that the extracted content is all government construction content data.

[0052] Based on the above embodiment, the present application provides a process for determining the line number of content in a method for analyzing a government construction plan. In the above step 203, according to the target title sequence number and the preset title hierarchy relationship, the line numbers of all content titles including the target title sequence number are extracted from the portable document format document of each government construction plan, and further include: According to the content title numbers in all target title numbers and the preset title hierarchy relationship, the row numbers of all hierarchical titles under the target title number are extracted level by level from the portable document format document of each government construction plan to obtain the row numbers of all content titles.

[0053] Optionally, based on all target title numbers and preset title hierarchical relationships, determine the level corresponding to the target title number, and based on the level of the target title number, obtain the content title numbers that are lower than the target title number level, extract the row numbers of all hierarchical titles under the target title number from the portable document format document of each government affairs construction plan level by level, determine the order of the target title numbers, and obtain the row numbers of all content titles based on the order of the target title numbers.

[0054] In the embodiment of the present application, according to each target title sequence number in all target title sequence numbers and the preset title hierarchy relationship, the row numbers of all hierarchical titles under the target title sequence number are extracted step by step from the portable document format document of each government construction plan to obtain the row numbers of all content titles. This ensures that the target content is accurately located and improves the accuracy of extracting government construction content data.

[0055] On the basis of the above embodiment, the present application further provides a process for determining government construction content data in a government construction plan analysis method. In the above step 204, government construction content is extracted for each government construction plan according to the row number of all content titles, and the government construction content data of each government construction plan is obtained, including: According to the line number of any content title in all content titles, the content data of the government construction content of each government construction plan is extracted line by line until the next same-level title is reached, and the government construction content data of any content title is obtained.

[0056] The next same-level title is the content title that is at the same level as the content title but after the content title. For example, if the content title is numbered 4.1.1, the next same-level title is 4.1.2.

[0057] Optionally, based on the row title of any content title among all content titles, content data is extracted line by line for each government affairs construction plan corresponding to the content title until the next same-level title is reached. At this time, it means that the content extraction under the content title is completed, thereby obtaining the government affairs construction content of any content title.

[0058] For example, since there is continuity between title numbers, count starting from the row where the titles of each level are located according to the row numbers of the recorded titles, extract the content data under the titles, and terminate the extraction when encountering the next title of the same level. For example, data is extracted starting from "4.1 Construction Plan", and the extraction is terminated when encountering "4.2 Project Rules". Then, lower-level titles can be extracted, such as "4.1.1xx Function 1", "4.1.1.1xx Sub-level Function" and other sub-titles under 4.1 Construction Plan.

[0059] For example, when the content title is "5.1.2 Construction Content"; The document content is: "5.1 Construction objectives, scale and content 5.1.1 Construction goals for this period 5.1.2 Construction Content Digital Reform Portal - Digital Society Reform Portal - Smart assistance for the disabled, iterative improvement of full-cycle service management applications for the disabled (epidemic control, disability supervision) 5.1.3 Technical standards Technical standards refer to application integration and basic tools that provide support and services for the platform.

[0060] It can be seen that the next same-level title is "5.1.3 Technical Standards". The government affairs construction content data extracted at this time is "Digital Reform Portal-Digital Society Reform Portal-Smart Assistance for the Disabled, Iterative Improvement of Full-Cycle Service Management Applications for Disabled Persons (Epidemic Control, Disability Supervision)".

[0061] In the embodiment of the present application, according to the line number of any content title in all content titles, the content data of the government construction content of each government construction plan is extracted line by line until the next same-level title is reached, and the government construction content data of any content title is obtained. It can be ensured that the extracted government construction content data is the government content data under the target title, ensuring the accuracy of the extracted data.

[0062] Based on the above embodiments, the present application also provides a process for determining similarity detection results in a government construction solution analysis method. Figure 4 A flowchart of determining a similarity detection result in a method for analyzing a government construction plan provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, in the above step 103, based on the government affairs construction content data of the plurality of government affairs construction plans, a pre-trained government affairs text content similarity model is used to perform similarity detection on the plurality of government affairs construction plans, and before obtaining the similarity detection result of every two government affairs construction plans in the plurality of government affairs construction plans, the method further includes: Step 401: clean the government affairs construction content data of each government affairs construction plan to obtain the target government affairs construction data of each government affairs construction plan.

[0063] Optionally, data cleaning can be performed on the government affairs construction content data of each government affairs construction plan. Regular means can be used to extract a large amount of non-essential text from the government affairs construction content data. Specific data cleaning can include: titles, numerical texts, directory data, page numbers, quoted texts, etc. Data cleaning can avoid interference from non-essential data and retain text semantics, thereby obtaining the target government affairs construction data for each government affairs construction plan.

[0064] In the above step 103, based on the government affairs construction content data of every two government affairs construction plans among the multiple government affairs construction plans, a pre-trained government affairs text content similarity model is used to perform similarity detection on every two government affairs construction plans, and a similarity detection result of every two government affairs construction plans is obtained, including: Step 402: Based on the target government affairs construction content data of each two government affairs construction plans, a government affairs text content similarity model is used to perform a similarity test on each two government affairs construction plans to obtain a similarity test result of the two government affairs construction plans.

[0065] In the embodiment of the present application, the government affairs construction content data of each government affairs construction plan is cleaned to obtain the target government affairs construction data of each government affairs construction plan, and the government affairs text content similarity model is used to perform similarity detection on each two government affairs construction plans according to the target government affairs construction content data of each two government affairs construction plans to obtain the similarity detection results of the two government affairs construction plans. The accuracy of the obtained similarity detection results is improved to avoid detection errors caused by text interference.

[0066] Based on the above embodiment, the present application also provides another process for determining the similarity detection result in the government construction plan analysis method. Figure 5 A schematic diagram of a process for determining a similarity detection result in another method for analyzing a government construction plan provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, as in the above step 403, based on the target government affairs construction content data of each two government affairs construction plans, using the government affairs text content similarity model, performing similarity detection on each two government affairs construction plans, and obtaining the similarity detection results of the two government affairs construction plans, the method further includes: Step 501: Slice the target government affairs construction content data of each government affairs construction plan to obtain multiple content slices of each government affairs construction plan.

[0067] Optionally, the target government affairs construction content data of each government affairs construction plan can be sliced ​​by a preset slice mark, so as to obtain multiple content slices of each government affairs construction plan. The preset slice mark can be symbol information such as a comma, a semicolon, a period, etc.

[0068] Optionally, the target government affairs construction content data of each government affairs construction plan can be sliced. Specifically, the target government affairs construction content can be sliced ​​according to commas, semicolons, and periods, so as to divide large paragraphs into short sentences. This not only retains the semantic integrity of the smallest sentence, but also facilitates the tracing of subsequent repeated texts, thereby obtaining multiple content slices for each government affairs construction plan.

[0069] As in step 403, based on the target government affairs construction content data of each two government affairs construction plans, a government affairs text content similarity model is used to perform similarity detection on each two government affairs construction plans, and the similarity detection results of the two government affairs construction plans are obtained, including: Step 502: Based on multiple content slices of each government affairs construction plan, a government affairs text content similarity model is used to perform similarity detection on each two government affairs construction plans to obtain similarity detection results for each two government affairs construction plans.

[0070] Optionally, multiple content slices of each government affairs construction plan between every two government affairs construction plans are used as inputs of a government affairs text content similarity model. The government affairs text content similarity model is used to perform similarity detection on multiple content slices of each government affairs construction plan between every two government affairs construction plans to obtain similarity detection results for every two government affairs construction plans.

[0071] For example, Table 1 is a similarity detection result of two content slices provided in an embodiment of the present application, as shown in Table 1: Table 1 Similarity detection results of two content slices

[0072] For example, from Table 1, it can be seen that the government text content similarity model can obtain the similarity results of two content slices by inputting content slice 1 and content slice 2. When content slice 1 is "the application support platform capability mainly relies on the two major support capabilities of the Jiangshan Data Resource Center project form and process to provide application technology support", and content slice 2 is "the application support platform capability mainly relies on the two major support capabilities of the Jiangshan City Integrated Intelligent Public Data Platform project form and process to provide application technology support", the similarity result obtained by using the government document similarity model is "0.9682319164276123".

[0073] In the embodiment of the present application, the target government affairs construction content data of each government affairs construction plan is sliced ​​to obtain multiple content slices of each government affairs construction plan, and the government affairs text content similarity model is used to perform similarity detection on each two government affairs construction plans according to the multiple content slices of each government affairs construction plan between every two government affairs construction plans, so as to obtain the similarity detection result of each two government affairs construction plans. The government affairs text content can be divided into the content slices of the smallest unit, and the similarity detection is performed on the multiple content slices, so as to reduce the calculation amount of the similarity detection and improve the detection quality and the accuracy of the similarity result.

[0074] Based on the above embodiments, the present application also provides a process for determining a government text content similarity model in a government construction plan analysis method. Figure 6A flowchart of determining a government text content similarity model in a government construction plan analysis method provided in an embodiment of the present application is provided. As shown in the figure, in the above step 103, based on the government construction content data of multiple government construction plans, a pre-trained government text content similarity model is used to perform similarity detection on multiple government construction plans, and before obtaining the similarity detection result of every two government construction plans in the multiple government construction plans, the method also includes: Step 601: extract synonymous government data sets and heteronymous government data sets from preset historical government documents.

[0075] Among them, the synonymous government affairs data set includes multiple pairs of Chinese synonyms, indicating that they have the same or very similar meanings in a specific context. For example, the synonymous government affairs data set may include: "legislation" and "enacting laws"; "budget" and "fiscal plan", etc., which are not limited in the embodiments of the present application. The heteronymous government affairs data set includes multiple pairs of Chinese synonyms, indicating that they have opposite meanings in a specific context. The heteronymous government affairs data set may include: multiple meanings of a word, sentence ambiguity, ambiguity between professional terms and common words, etc., which are not limited in the embodiments of the present application.

[0076] Optionally, multiple keywords are determined from preset historical government documents, multiple pairs of synonyms and multiple pairs of heteronyms are extracted from the multiple keywords, and a synonymous government dataset is formed through the multiple pairs of synonyms, and a heteronymous government dataset is formed through the multiple pairs of heteronyms. Alternatively, the synonymous government dataset and the heteronymous government dataset can be obtained from already public data.

[0077] Step 602: Based on the synonymous government affairs data set and the heteronymous government affairs data set, a preset initial document similarity model is trained to obtain a government affairs text content similarity model.

[0078] Optionally, a training set is constructed based on a synonymous government affairs data set and a heteronymous government affairs data set, a preset initial document similarity model is trained to obtain training results, and the preset initial document similarity model is optimized based on the training results to obtain a government affairs text content similarity model.

[0079] In the embodiment of the present application, a synonymous government data set and a heteronymous government data set are extracted from a preset historical government document, and a preset initial document similarity model is trained based on the synonymous government data set and the heteronymous government data set to obtain a government text content similarity model. The accuracy and speed of the government text content similarity model detection can be improved, so that the government text content similarity model is more compatible with the application scenario.

[0080] Based on the same inventive concept, the embodiment of the present application also provides a government affairs construction plan analysis device corresponding to the government affairs construction plan analysis method. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned government affairs construction plan analysis method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0081] Figure 7 A schematic diagram of a device for analyzing a government construction plan provided in an embodiment of the present application, the device comprises: an extraction module 701, a detection module 702, and a determination module 703; wherein, The extraction module 701 is used to use the pre-built government affairs construction keyword library to locate and extract the government affairs construction content of each government affairs construction plan in the portable document format of each government affairs construction plan among the preset multiple government affairs construction plans, and obtain the government affairs construction content data of each government affairs construction plan; The detection module 702 is used to perform similarity detection on the multiple government affairs construction plans based on the government affairs construction content data of the multiple government affairs construction plans by using a pre-trained government affairs text content similarity model to obtain a similarity detection result between every two government affairs construction plans in the multiple government affairs construction plans; The determination module 703 is used to determine at least two repeated target government affairs construction plans from the multiple government affairs construction plans according to the similarity detection results of every two government affairs construction plans in the multiple government affairs construction plans.

[0082] Optionally, the extraction module 701 is specifically used to: use the government affairs construction keyword library to match the government affairs keywords on the portable document format document of each government affairs construction plan, and obtain all target title information having at least one government affairs keyword in the portable document format document of each government affairs construction plan; Extract target title sequence number from all target title information; Extracting the row numbers of all content titles including the target title sequence number from the portable document format document of each government construction plan according to the target title sequence number and the preset title hierarchy relationship; The government affairs construction content of each government affairs construction plan is extracted according to the row numbers of all content titles, so as to obtain the government affairs construction content data of each government affairs construction plan.

[0083] Optionally, before the extraction module 701, the device further includes: a construction module, the construction module is used to: extract government keywords according to historical government construction plans for multiple government units to obtain multiple government keywords; Based on multiple government affairs keywords, build a government affairs construction keyword library.

[0084] Optionally, the extraction module 701 is specifically used to: extract the row numbers of all hierarchical titles under the target title number from the portable document format document of each government affairs construction plan step by step according to each target title number in all target title numbers and the preset title hierarchy relationship, and obtain the row numbers of all content titles.

[0085] Optionally, the extraction module 701 is specifically used to: extract content data line by line of the government affairs construction content of each government affairs construction plan according to the line number of any content title in all content titles, until reaching the next same-level title, and obtain the government affairs construction content data of any content title.

[0086] Optionally, before the detection module 702, the device further includes: a data cleaning module, the data cleaning module is used to: perform data cleaning on the government affairs construction content data of each government affairs construction plan to obtain target government affairs construction data of each government affairs construction plan; The detection module 702 is specifically used to: perform similarity detection on every two government affairs construction plans according to the target government affairs construction content data of every two government affairs construction plans, using the government affairs text content similarity model, and obtain the similarity detection results of the two government affairs construction plans.

[0087] Optionally, before the detection module 702, the device further includes: a slicing module, the slicing module is used to: slice the target government affairs construction content data of each government affairs construction plan to obtain multiple content slices of each government affairs construction plan; The detection module 702 is specifically used to: perform similarity detection on each two government affairs construction plans according to the multiple content slices of each government affairs construction plan described in each two government affairs construction plans, using the government affairs text content similarity model to obtain the similarity detection results of each two government affairs construction plans.

[0088] Optionally, before the detection module 702, the device further includes: a training module, the training module is used to: extract a synonymous government data set and a heteronymous government data set from a preset historical government document; According to the synonymous government affairs dataset and the heteronymous government affairs dataset, the preset initial document similarity model is trained to obtain the government affairs text content similarity model.

[0089] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0090] The present application embodiment also provides a computer device 800, such as Figure 8 As shown, Figure 8The schematic diagram of the structure of the computer device provided in the embodiment of the present application includes: a processor 801, a storage medium 802, and optionally, a bus 803. The storage medium 802 stores machine-readable instructions executable by the processor 801 (for example, Figure 7 The device extracts the execution instructions corresponding to the module 701, the detection module 702 and the determination module 703, etc.), when the computer device is running, the processor 801 communicates with the storage medium 802 through the bus 803, and when the machine-readable instructions are executed by the processor 801, the steps of the above-mentioned government construction plan analysis method are executed.

[0091] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned government affairs construction plan analysis method are executed.

[0092] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules 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 communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0093] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function 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 is essentially or part of the technical solution that contributes to the prior art 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 several 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, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.

[0094] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A method for analyzing a government construction plan, characterized in that: The method comprises: Using a pre-built government affairs construction keyword library, locate and extract government affairs construction content from a portable document format document of each government affairs construction plan among a plurality of preset government affairs construction plans, and obtain government affairs construction content data of each government affairs construction plan; Based on the government affairs construction content data of the plurality of government affairs construction plans, a pre-trained government affairs text content similarity model is used to perform similarity detection on the plurality of government affairs construction plans, and obtain a similarity detection result of every two government affairs construction plans in the plurality of government affairs construction plans; According to the similarity detection result of every two government affairs construction plans among the multiple government affairs construction plans, at least two repeated target government affairs construction plans are determined from the multiple government affairs construction plans.

2. The government construction plan analysis method according to claim 1 is characterized in that: The pre-built government affairs construction keyword library is used to locate and extract the government affairs construction content of each government affairs construction plan in a portable document format of a plurality of preset government affairs construction plans, and the government affairs construction content data of each government affairs construction plan is obtained, including: Using the government affairs construction keyword library, matching the portable document format document of each government affairs construction plan with government affairs keywords to obtain all target title information having at least one government affairs keyword in the portable document format document of each government affairs construction plan; Extracting target title serial numbers from all target title information; Extracting, from the portable document format document of each government affairs construction plan, the row numbers of all content titles including the target title sequence number according to the target title sequence number and the preset title hierarchy relationship; According to the row numbers of all the content titles, the government affairs construction content of each government affairs construction plan is extracted to obtain the government affairs construction content data of each government affairs construction plan.

3. The government construction plan analysis method according to claim 1 is characterized in that: The method further comprises: using the pre-built government affairs construction keyword library to locate and extract the government affairs construction content of each government affairs construction plan in a portable document format of a plurality of preset government affairs construction plans, and obtaining the government affairs construction content data of each government affairs construction plan; Extracting government keywords according to historical government construction plans for multiple government units to obtain multiple government keywords; The government affairs construction keyword library is constructed based on the multiple government affairs keywords.

4. The government affairs construction plan analysis method according to claim 2 is characterized in that: The extracting, according to the target title serial number and the preset title hierarchy relationship, the row numbers of all content titles including the target title serial number from the portable document format document of each government affairs construction plan comprises: According to each target title number among all the target title numbers and the preset title hierarchy relationship, the row numbers of all hierarchical titles under the target title number are extracted level by level from the portable document format document of each government construction plan to obtain the row numbers of all content titles.

5. The government affairs construction plan analysis method according to claim 2 is characterized in that: The extracting of government affairs construction content from each government affairs construction plan according to the row numbers of all content titles to obtain government affairs construction content data of each government affairs construction plan includes: According to the line number of any content title among all the content titles, the content data of the government construction content of each government construction plan is extracted line by line until the next same-level title is reached, and the government construction content data of any content title is obtained.

6. The method for analyzing government affairs construction plans according to claim 1 is characterized in that: Before performing similarity detection on the plurality of government affairs construction plans based on the government affairs construction content data of the plurality of government affairs construction plans by using a pre-trained government affairs text content similarity model and obtaining similarity detection results of every two government affairs construction plans in the plurality of government affairs construction plans, the method further comprises: Cleaning the government affairs construction content data of each government affairs construction plan to obtain target government affairs construction data of each government affairs construction plan; The process of performing similarity detection on the plurality of government affairs construction plans based on the government affairs construction content data of the plurality of government affairs construction plans by using a pre-trained government affairs text content similarity model to obtain similarity detection results of every two government affairs construction plans in the plurality of government affairs construction plans includes: According to the target government affairs construction content data of each two government affairs construction plans, the government affairs text content similarity model is adopted to perform similarity detection on each two government affairs construction plans to obtain the similarity detection result of the two government affairs construction plans.

7. The method for analyzing government affairs construction plans according to claim 6 is characterized in that: Before performing similarity detection on each of the two government affairs construction plans according to the target government affairs construction content data of each of the two government affairs construction plans by using the government affairs text content similarity model and obtaining the similarity detection result of the two government affairs construction plans, the method further includes: Slicing the target government affairs construction content data of each government affairs construction plan to obtain a plurality of content slices of each government affairs construction plan; The similarity detection of each of the two government affairs construction plans is performed based on the target government affairs construction content data of each of the two government affairs construction plans by using the government affairs text content similarity model to obtain the similarity detection results of the two government affairs construction plans, including: According to the multiple content slices of each government affairs construction plan in each of the two government affairs construction plans, the government affairs text content similarity model is used to perform similarity detection on each of the two government affairs construction plans to obtain a similarity detection result for each of the two government affairs construction plans.

8. The method for analyzing government affairs construction plans according to claim 1 is characterized in that: Before performing similarity detection on the plurality of government affairs construction plans based on the government affairs construction content data of the plurality of government affairs construction plans by using a pre-trained government affairs text content similarity model and obtaining similarity detection results of every two government affairs construction plans in the plurality of government affairs construction plans, the method further comprises: Extracting synonymous government data sets and heteronymous government data sets from preset historical government documents; The preset initial document similarity model is trained according to the synonymous government affairs data set and the heteronymous government affairs data set to obtain the government affairs text content similarity model.

9. A device for analyzing government construction plans, characterized in that: The government affairs construction plan analysis device comprises: An extraction module is used to use a pre-built government affairs construction keyword library to locate and extract government affairs construction content from a portable document format document of each government affairs construction plan among a plurality of preset government affairs construction plans, and obtain government affairs construction content data of each government affairs construction plan; A detection module, configured to perform similarity detection on the plurality of government affairs construction plans according to the government affairs construction content data of the plurality of government affairs construction plans by using a pre-trained government affairs text content similarity model, and obtain a similarity detection result of every two government affairs construction plans in the plurality of government affairs construction plans; The determination module is used to determine at least two repeated target government affairs construction plans from the multiple government affairs construction plans based on the similarity detection results of every two government affairs construction plans from the multiple government affairs construction plans.

10. A computer device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the government affairs construction plan analysis method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • A method and a device for generating a government data directory

    CN109241062A

  • Government affair encyclopedia construction method based on knowledge graph

    CN113204644A

  • Government affair system data cleaning method and government affair fusion system

    CN113704503A

  • Word-based knowledge base construction method and Word-based knowledge base control method

    CN113779931A

  • Financial statement attached event extraction method and system and storage medium

    CN116150361A