Engineering project management method and system based on rule engine
Through a rule engine-based method, combined with image preprocessing, deep learning model and OCR recognition technology, the automated collection, text extraction and data conversion of engineering project information materials are achieved, solving the problems of low efficiency and poor accuracy in the existing technology, and improving the efficiency and accuracy of information processing.
Patent Information
- Application Number
- CN202411858680.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-11
AI Technical Summary
It is difficult for existing engineering project governance technologies to achieve efficient and accurate data processing and document management, especially when large-scale data processing and complex document processing, traditional manual inspection and OCR technologies have problems of low efficiency and poor accuracy.
Using a rule engine-based method, the images of information are obtained, preprocessed, geometric alignment and correction are performed, and the ResNet pre-trained model and improved cosine similarity matching template are used, combined with OCR recognition technology and regular expressions, the text is converted into structured data, and multi-dimensional verification is performed through the rule engine to generate a list of problems.
It improves the efficiency and accuracy of information and data inspection, is suitable for a variety of document scenarios, realizes automation and closed-loop management, and significantly improves the intelligence level of project governance.
Smart Images

Figure CN119810848A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated processing technology, and in particular to a rule engine-based engineering project management method and system. Background Art
[0002] Project governance is a complex management process that involves a lot of information processing, document checking and data analysis. In the existing project governance process, information such as project contracts, bills and documents are usually archived in paper or scanned form, and these information are manually checked and verified. However, the traditional manual inspection method has the problems of low efficiency and poor accuracy, especially when it comes to large-scale data processing, its disadvantages are more obvious. With the continuous expansion of the scale of engineering projects and the increase in information needs, existing technologies can no longer meet the needs of efficient and accurate data processing and document management.
[0003] The inadequacy of existing document inspection methods. At present, the inspection of information materials in engineering project management mainly relies on the following methods. Engineering managers manually check contracts, bills and documents one by one, such as checking whether the amount, signing date, and number are correct. This method relies on manpower, which is not only time-consuming and labor-intensive, but also easily affected by human factors, resulting in problems such as missed inspections and false inspections. The low efficiency of manual inspections makes it difficult to meet the high frequency and high accuracy requirements of large engineering projects. Some tools use basic OCR (optical character recognition) technology to extract text content from documents and convert them into electronic text. However, traditional OCR technology has limited processing capabilities for document quality (such as blurriness, tilt) and complex typesetting (such as tables, mixed text and graphics), resulting in low accuracy of extraction results. Even if OCR technology is used to complete text extraction, subsequent error checking and logic verification still need to rely on manual judgment, and the overall efficiency and accuracy have not been significantly improved.
[0004] Technical bottlenecks in information data processing. With the increasing complexity of project management, traditional information processing methods have significant bottlenecks in the following aspects: Scanned or photographed images may have problems such as blur, noise, and tilt, which directly affect the recognition effect of OCR technology. Existing image preprocessing methods (such as simple grayscale and binarization) have limited effects when processing documents with complex backgrounds and are difficult to meet the needs of high-quality text extraction. There is currently a lack of effective image alignment and correction methods for locating and correcting specific content in document images, especially for complex tables or typeset documents. Poor flexibility of data inspection rules: The information content in project documents is diverse, and the formats and field logic of different document types (such as contracts, bills, and receipts) are different. Fixed inspection rules are difficult to adapt to a variety of document scenarios. For example, the signing date and performance date in the contract should meet the logic of sequence, and the total amount in the bill must match the sum of the amounts of each item. These logical verification rules need to be adjusted dynamically, but the existing system is not flexible enough to efficiently respond to changing needs.
[0005] In recent years, with the rapid development of information technology, the management of engineering projects has put forward higher requirements for the digital processing and intelligent management of information materials: the number of documents involved in engineering projects is huge, and relying solely on manual or semi-automatic means can no longer meet the needs. A solution that can realize automatic document parsing, automatic data verification and automatic error feedback is needed. Automated processing can not only significantly improve efficiency, but also reduce subjective errors in manual inspection.
[0006] Engineering projects involve huge amounts of money and complex processes. Once an error occurs (such as an incorrect amount or inconsistent dates), it may cause serious economic losses or management risks. Therefore, the accuracy and reliability of the information processing system are particularly important. The document types and formats of different engineering projects vary greatly, and the document processing system needs to be highly flexible to meet the needs of different scenarios.
[0007] In order to deal with the above problems, some technical solutions have achieved automation of document processing and data verification to a certain extent: modern OCR technology (such as Tesseract, Baidu OCR, etc.) can already realize text extraction of clear and regular documents, but it still has deficiencies in image preprocessing, complex typesetting processing and recognition error correction. Some information systems have built-in simple rule engines that can perform preliminary logical verification on the extracted data, such as checking whether the field is empty or the format is correct. However, the scalability of such rule engines is limited and cannot dynamically adapt to complex scenarios. In recent years, deep learning technology has been widely used in fields such as image classification, feature extraction, and natural language processing. By using deep learning models to extract global features of document images, the accuracy of document type recognition and image alignment can be significantly improved. However, the existing technical solutions lack the effective combination of deep learning technology and rule engines, and fail to give full play to their advantages in practical applications.
[0008] Although existing technologies have made certain progress in OCR recognition and rule verification, they still cannot fully meet the actual needs of engineering project management. Specifically, document acquisition, preprocessing, text extraction, error checking and other links have not achieved automated and closed-loop management. Existing solutions are difficult to adapt to a variety of document types, especially scenarios with complex formats or diverse rules. Traditional technologies are still inefficient in large-scale engineering project document processing, and recognition accuracy and error verification precision are limited. Summary of the invention
[0009] In view of the above problems mentioned in the prior art, in order to solve the above technical problems, the present invention provides a project management method and system based on a rule engine, including: obtaining scanned images of information materials or collecting images through a CCD camera; preprocessing, geometric alignment and correction of the images, extracting global embedding vectors using the ResNet pre-training model, combining with the improved cosine similarity matching template, and completing alignment through perspective transformation; extracting text content using OCR recognition technology, and matching field formats through regular expressions to convert text into structured data; using a rule engine to check structured data, etc., generating a problem list and sending it to the user. The present invention improves the efficiency and accuracy of information material inspection, is suitable for a variety of document scenarios such as contracts, bills and receipts, and has high adaptability and broad application prospects.
[0010] A method for project management based on a rule engine, comprising the steps of:
[0011] S1: Obtaining a scanned image of information or using a CCD camera to capture an image of information, the information including contract, bill or document information;
[0012] S2: Perform image preprocessing on the acquired images, and perform geometric alignment and correction on the preprocessed images. The steps of geometric alignment and correction are as follows:
[0013] S21: Use the ResNet pre-trained model to extract the global embedding vector of the image and give the information type;
[0014] S22: for different types of information, using corresponding improved cosine similarity to calculate the similarity between the collected image and the template image in the template library;
[0015] S23: selecting a matching template according to the similarity score, and geometrically aligning and correcting the image content based on the matching template;
[0016] S3: Use OCR recognition technology to extract text content and convert it into structured data:
[0017] S4: Use the rule engine to check structured data according to preset rules and detect errors in the data;
[0018] S5: Output the inspection results to generate a question list and send it to the user.
[0019] Preferably, for different types of information materials, the similarity between the collected image and the template image in the template library is calculated using the corresponding improved cosine similarity, specifically:
[0020] When the information type is contract, the improved cosine similarity is as follows:
[0021]
[0022] When the information material type is bill, the improved cosine similarity is as follows:
[0023]
[0024] When the information material type is a document, the improved cosine similarity is as follows:
[0025]
[0026]
[0027] Among them, V is the global embedding vector extracted by the ResNet pre-training model, Y k is the kth template image vector in the template library, V = [v1, v2, ..., v n ],Y ki =[y k1 ,y k2 ,...,y kn], n is the vector latitude, v1 is the first component in the global embedding vector V, v2 is the second component in the global embedding vector V, v i is the i-th component in the global embedding vector V; y k1 The first component of the kth template image vector in the template library, y k2 The second component of the kth template image vector in the template library; y kn is the nth component of the kth template image vector in the template library, y ki is the i-th component of the k-th template image vector in the template library; G is the image grayscale mean, σ is the standard deviation of the grayscale distribution, σ max is the historical maximum value of the standard deviation of the grayscale distribution, d is the mean distance from each pixel to the center of the image, and d max The maximum historical average distance from each pixel to the center of the image.
[0028] Preferably, the image preprocessing performed on the collected image includes performing denoising processing using Gaussian filtering.
[0029] Preferably, the method of selecting a matching template according to a similarity score and geometrically aligning and correcting the image content based on the matching template includes: first, selecting a template image with the largest cosine similarity value, and using a SIFT feature detection algorithm to extract feature points of the input image and the template image; second, using a KNN feature matching algorithm to match feature points to obtain key point pairs between the input image and the template image; third, based on the matching point pairs, calculating the homography matrix between the input image and the template image through a RANSAC algorithm; then, based on the homography matrix, using a perspective transformation method to geometrically transform the input image so that its content is aligned with the template image in geometric position; finally, outputting the aligned image.
[0030] Preferably, the method of extracting text content using OCR recognition technology and converting it into structured data includes: first, extracting text content in the image through OCR recognition technology; then, segmenting and locating the extracted text content based on regular expression matching field format; thirdly, cleaning and formatting the segmented field content, removing irrelevant characters and converting the data into a standard format; finally, constructing a structured data format according to the field name and field value, and storing it in JSON data format.
[0031] Preferably, the rule engine is used to check structured data according to preset rules to detect errors in the data, including: loading preset format verification rules: checking whether the date field value conforms to the standard date format YYYY-MM-DD; checking whether the amount field value is a numeric type and is a positive number; checking whether the number field value conforms to the fixed-length letter and number combination rule; matching the rules for each field in the structured data and verifying the field value; for fields that fail the rule check, recording the field name, rule type and error description; summarizing all error information and generating a problem list.
[0032] This application also provides a project management system based on a rule engine, such as Figure 2 As shown, it includes: system hardware composition, image acquisition equipment is used to collect images of project information materials. High-resolution CCD camera is used to shoot contracts, bills or documents. Image scanner is used to scan paper documents to generate digital images. The interface is connected to the data processing server through a USB interface or a network interface to transmit the collected image data to the system. The data processing server is responsible for image preprocessing, geometric alignment and correction, OCR recognition, structured data generation and rule engine execution. High-performance computing server, equipped with GPU (such as NVIDIA GPU) to accelerate the operation of deep learning models. The server is equipped with a multi-core CPU, at least 32GB of memory, and more than 1TB of storage space. Image preprocessing module: deploy Gaussian filtering algorithm for image denoising. Use deep learning models (such as ResNet) to extract embedded vectors to achieve template matching and geometric alignment.
[0033] OCR recognition module: deploy OCR engine (such as Tesseract or PaddleOCR) to extract text content. Rule engine module deploys rule management and execution engine (such as Drools or custom engine) to verify structured data. Data storage module database server (such as MySQL, PostgreSQL) is used to store templates, structured data and verification rules. User terminal device allows users to view inspection results, adjust rules and upload information. Hardware example: desktop, laptop. Mobile device supports smartphones or tablets running web browsers. Interface mode communicates with the data processing server through the network (wired or wireless) to access the user interface (UI).
[0034] The notification module is responsible for sending the inspection results and problem lists to the user. Message push server. Supporting terminal email server, SMS gateway or instant messaging platform (such as WeChat, DingTalk). Interface mode interacts with the data processing server through HTTPAPI or SMTP protocol to push messages to users. Hardware connection mode The connection between the image acquisition device and the data processing server, the wired connection directly transmits the image data through USB, network cable, etc. The wireless connection uploads the collected images to the server through Wi-Fi or Bluetooth connection. The connection between the data processing server and the user terminal device, Local Area Network (LAN) connection: suitable for internal deployment of enterprises, data sharing and real-time access through the local area network. Internet connection: The user terminal accesses the Web application or interface on the server through the Internet to view the inspection results and adjust the rules. The connection between the data processing server and the notification module, message queue: Use message queues such as RabbitMQ and Kafka to achieve asynchronous communication, and push the generated problem list to the notification module. API interface: The server calls the interface of the notification module through HTTP or SMTP protocol to send emails, SMS or instant messages.
[0035] An acquisition module acquires scanned images of information materials or uses a CCD camera to capture images of information materials, the information materials including contract, bill or document information;
[0036] The preprocessing and geometric alignment and correction module performs image preprocessing on the collected images, and performs geometric alignment and correction on the preprocessed images. The geometric alignment and correction steps are as follows: use the ResNet pre-training model to extract the global embedding vector of the image and give the information data type; for different types of information data, use the corresponding improved cosine similarity to calculate the similarity between the collected image and the template image in the template library; select the matching template according to the similarity score, and perform geometric alignment and correction on the image content based on the matching template;
[0037] OCR recognition module: Use OCR recognition technology to extract text content and convert it into structured data:
[0038] Check module: Use the rule engine to check structured data according to preset rules and detect errors in the data;
[0039] Notification module: Outputs inspection results and generates a problem list to send to the user.
[0040] Preferably, for different types of information materials, the similarity between the collected image and the template image in the template library is calculated using the corresponding improved cosine similarity, specifically:
[0041] When the information type is contract, the improved cosine similarity is as follows:
[0042]
[0043] When the information material type is bill, the improved cosine similarity is as follows:
[0044]
[0045] When the information material type is a document, the improved cosine similarity is as follows:
[0046]
[0047] Among them, V is the global embedding vector extracted by the ResNet pre-training model, Y k is the kth template image vector in the template library, V = [v1, v2, ..., v n ],Y ki =[y k1 ,y k2 ,...,y kn ], n is the vector latitude, v1 is the first component in the global embedding vector V, v2 is the second component in the global embedding vector V, v i is the i-th component in the global embedding vector V; y k1 The first component of the kth template image vector in the template library, y k2 The second component of the kth template image vector in the template library; y kn is the nth component of the kth template image vector in the template library, y ki is the i-th component of the k-th template image vector in the template library; G is the image grayscale mean, σ is the standard deviation of the grayscale distribution, σ max is the historical maximum value of the standard deviation of the grayscale distribution, d is the mean distance from each pixel to the center of the image, and d max The maximum historical average distance from each pixel to the center of the image.
[0048] Preferably, the image preprocessing performed on the collected image includes performing denoising processing using Gaussian filtering.
[0049] Preferably, the method of selecting a matching template according to a similarity score and geometrically aligning and correcting the image content based on the matching template includes: first, selecting a template image with the largest cosine similarity value, and using a SIFT feature detection algorithm to extract feature points of the input image and the template image; second, using a KNN feature matching algorithm to match feature points to obtain key point pairs between the input image and the template image; third, based on the matching point pairs, calculating the homography matrix between the input image and the template image through a RANSAC algorithm; then, based on the homography matrix, using a perspective transformation method to geometrically transform the input image so that its content is aligned with the template image in geometric position; finally, outputting the aligned image.
[0050] The present invention provides a method and system for project management based on a rule engine, which can achieve the following beneficial technical effects:
[0051] 1. The present invention obtains images of scanned copies of information materials or collects images through a CCD camera; pre-processes, geometrically aligns and corrects the images, extracts global embedding vectors using a ResNet pre-trained model, combines an improved cosine similarity matching template, and completes alignment through perspective transformation; uses OCR recognition technology to extract text content, and matches field formats through regular expressions to convert text into structured data; uses a rule engine to check structured data, etc., generates a list of questions and sends it to the user. The present invention improves the efficiency and accuracy of information material inspection, is suitable for a variety of document scenarios such as contracts, bills and receipts, and has high adaptability and broad application prospects.
[0052] 2. This application improves information processing efficiency. By combining image preprocessing, deep learning models and OCR recognition technology, it realizes the automated collection, text extraction and data conversion of engineering project information, avoiding the lengthy process of traditional manual inspection and greatly improving information processing efficiency. Improve inspection accuracy, use deep learning models to extract global image features, combine with improved cosine similarity matching templates, and ensure the alignment accuracy of text content through geometric alignment and correction technology, thereby significantly improving the accuracy of OCR recognition.
[0053] 3. Multi-dimensional verification of structured data is performed through the rule engine, including format verification, logic verification, data integrity verification and uniqueness verification, which can quickly discover errors in the data and reduce human misjudgment. Enhance adaptability and flexibility. The present invention supports flexible processing of various types of information materials such as contracts, bills, and receipts, and dynamically adjusts template matching rules in combination with improved cosine similarity to adapt to diverse scenarios of different documents. The rule engine supports users to dynamically expand and adjust verification rules according to actual needs, enhancing the flexibility and adaptability of the system. Realize automation and closed-loop management. Through modular design, the present invention organically integrates information collection, preprocessing, text extraction, error checking and problem feedback, realizes full-process automation and closed-loop management of engineering project document management, and significantly improves the level of intelligent project management.
[0054] 4. Wide scope of application: the present invention is applicable to the management of engineering projects of various sizes, especially in large-scale and complex projects. It can effectively process massive information and data, ensure the integrity and accuracy of data, and provide reliable technical support for engineering management. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 It is a schematic diagram of the steps of a project management method based on a rule engine of the present invention;
[0057] Figure 2 It is a system diagram of engineering project management based on rule engine of the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0059] Embodiment 1:
[0060] In view of the above problems mentioned in the prior art, in order to solve the above technical problems, as shown in the attached Figure 1 As shown: A project management method based on a rule engine, comprising the steps of:
[0061] S1: Obtaining a scanned image of information or using a CCD camera to capture an image of information, the information including contract, bill or document information;
[0062] S2: Perform image preprocessing on the acquired images, and perform geometric alignment and correction on the preprocessed images. The steps of geometric alignment and correction are as follows:
[0063] S21: Use the ResNet pre-trained model to extract the global embedding vector of the image and give the information type;
[0064] S22: for different types of information, using the corresponding improved cosine similarity to calculate the similarity between the collected image and the template image in the template library;
[0065] S23: selecting a matching template according to the similarity score, and geometrically aligning and correcting the image content based on the matching template;
[0066] S3: Use OCR recognition technology to extract text content and convert it into structured data:
[0067] S4: Use the rule engine to check structured data according to preset rules and detect errors in the data;
[0068] S5: Output the inspection results to generate a question list and send it to the user.
[0069] In one embodiment, an engineering company needs to check a batch of contracts and bills to ensure that there are no errors in key fields such as amount and date. Use a high-resolution CCD camera to shoot paper documents, or generate image files through a scanner, and the collected images include contracts, bills and receipts. S21: Use the ResNet pre-trained model to extract the global embedding vector of the image and give the information material type ResNet model definition: ResNet is a deep learning model used to analyze the overall features of an image. In this method, the ResNet model is used to extract the overall feature vector (embedded vector) from the image to describe the content of the image. The collected image is input into the pre-trained ResNet model. The feature vector output by the model represents the image content, such as describing the document's typesetting style, text density, etc. Based on these features, the classification model can determine whether the image type is a contract, bill or receipt.
[0070] S22: Match the best template in the template library for different types of information. Template matching definition: The template library stores standard styles of contracts, bills, and documents, which are used to align and correct image content. This method combines the feature vector of the document and finds the best matching template by comparing the similarity between the document and the template. Operation instructions: Compare the similarity between the document and each template based on the features extracted by the ResNet model. Set specific rules for different document types, such as focusing on the distribution of text blocks for contracts and the amount field area for bills. Finally, select the template with the highest similarity.
[0071] S23: Geometric alignment and correction of image content based on matching template. Geometric alignment and correction definition: The goal of geometric alignment is to eliminate deformation problems such as tilt and distortion in the image and align the content with the standard template. The correction process includes feature point matching, matrix calculation and image transformation. Operation instructions: Use the SIFT algorithm to detect key points in the image and template, such as the intersection of table lines or the edge of text blocks. After matching the key points, calculate the transformation relationship and align the document content with the template. Apply perspective transformation technology to correct the image to the standard format.
[0072] S3: Use OCR recognition technology to extract text content and convert it into structured data. OCR definition: OCR is a technology that converts text content in an image into editable text. Operation instructions: Use an OCR engine (such as Tesseract or PaddleOCR) to extract text from contracts and bills. The extracted text includes field contents such as date, amount, and number. Based on regular expressions, convert text into structured data, for example, format the date as YYYY-MM-DD, and convert the amount into a numeric value after removing redundant symbols.
[0073] S4: Use the rule engine to check the structured data according to the preset rules and detect errors in the data. The rule engine is defined as a system that dynamically checks and executes preset rules. In this method, the rules include format checks (such as date format, amount value), logic checks (such as date sequence, consistency of total amount) and integrity checks (whether the field is missing). Operation instructions: The rule engine checks the structured data item by item, for example: check whether the contract amount is a positive number; check whether the signing date is earlier than the performance date; check whether the bill number is unique. If an error is found, such as the amount is inconsistent with the sum of the amounts, the error information is recorded.
[0074] S5: Output the check results to generate a problem list and send it to the user. The problem list includes detailed information such as the error field name, error description, and rule type. Operation Instructions Summarize the check results to generate a problem list, such as "there is a negative value error in the amount field" or "the signing date is later than the performance date". Send the problem list to the user via email, instant messaging, etc., so that the user can make corrections.
[0075] In some embodiments, for different types of information, the similarity between the collected image and the template image in the template library is calculated using the corresponding improved cosine similarity, specifically:
[0076] When the information type is contract, the improved cosine similarity is as follows:
[0077]
[0078] When the information material type is bill, the improved cosine similarity is as follows:
[0079]
[0080] When the information material type is a document, the improved cosine similarity is as follows:
[0081]
[0082] Among them, V is the global embedding vector extracted by the ResNet pre-training model, Y kis the kth template image vector in the template library, V = [v1, v2, ..., v n ],Y ki =[y k1 ,y k2 ,...,y kn ], n is the vector latitude, v1 is the first component in the global embedding vector V, v2 is the second component in the global embedding vector V, v i is the i-th component in the global embedding vector V; y k1 The first component of the kth template image vector in the template library, y k2 The second component of the kth template image vector in the template library; y kn is the nth component of the kth template image vector in the template library, y ki is the i-th component of the k-th template image vector in the template library; G is the image grayscale mean, σ is the standard deviation of the grayscale distribution, σ max is the historical maximum value of the standard deviation of the grayscale distribution, d is the mean distance from each pixel to the center of the image, and d max The maximum historical average distance from each pixel to the center of the image.
[0083] In some embodiments, the image preprocessing of the acquired image includes performing denoising processing using Gaussian filtering.
[0084] In some embodiments, the method of selecting a matching template according to a similarity score and geometrically aligning and correcting the image content based on the matching template includes: first, selecting a template image with the largest cosine similarity value, and using a SIFT feature detection algorithm to extract feature points of the input image and the template image; second, using a KNN feature matching algorithm to match feature points to obtain key point pairs between the input image and the template image; third, based on the matching point pairs, using a RANSAC algorithm to calculate the homography matrix between the input image and the template image; then, based on the homography matrix, using a perspective transformation method to geometrically transform the input image so that its content is aligned with the template image in geometric position; finally, outputting the aligned image.
[0085] In some embodiments, the method of extracting text content using OCR recognition technology and converting it into structured data includes: first, extracting text content in an image using OCR recognition technology; then, segmenting and locating the extracted text content based on regular expression matching field formats; thirdly, cleaning and formatting the segmented field content, removing irrelevant characters and converting the data into a standard format; finally, constructing a structured data format based on field names and field values, and storing it in JSON data format.
[0086] In some embodiments, the rule engine is used to check structured data according to preset rules to detect errors in the data, including: loading preset format verification rules: checking whether the date field value complies with the standard date format YYYY-MM-DD; checking whether the amount field value is a numeric type and is a positive number; checking whether the number field value complies with the fixed-length letter and number combination rules; matching the rules for each field in the structured data and verifying the field values; for fields that fail the rule check, recording the field name, rule type and error description; summarizing all error information and generating a problem list.
[0087] The present application also provides an engineering project management system based on a rule engine, including:
[0088] An acquisition module acquires scanned images of information materials or uses a CCD camera to capture images of information materials, the information materials including contract, bill or document information;
[0089] The preprocessing and geometric alignment and correction module performs image preprocessing on the collected images, and performs geometric alignment and correction on the preprocessed images. The geometric alignment and correction steps are as follows: use the ResNet pre-training model to extract the global embedding vector of the image and give the information data type; for different types of information data, use the corresponding improved cosine similarity to calculate the similarity between the collected image and the template image in the template library; select the matching template according to the similarity score, and perform geometric alignment and correction on the image content based on the matching template;
[0090] OCR recognition module: Use OCR recognition technology to extract text content and convert it into structured data:
[0091] Check module: Use the rule engine to check structured data according to preset rules and detect errors in the data;
[0092] Notification module: Outputs inspection results and generates a problem list to send to the user.
[0093] In some embodiments, for different types of information, the similarity between the collected image and the template image in the template library is calculated using the corresponding improved cosine similarity, specifically:
[0094] When the information type is contract, the improved cosine similarity is as follows:
[0095]
[0096] When the information material type is bill, the improved cosine similarity is as follows:
[0097]
[0098] When the information material type is a document, the improved cosine similarity is as follows:
[0099]
[0100] Among them, V is the global embedding vector extracted by the ResNet pre-training model, Y k is the kth template image vector in the template library, V = [v1, v2, ..., v n ],Y ki =[y k1 ,y k2 ,...,y kn ], n is the vector latitude, v1 is the first component in the global embedding vector V, v2 is the second component in the global embedding vector V, v i is the i-th component in the global embedding vector V; y k1 The first component of the kth template image vector in the template library, y k2 The second component of the kth template image vector in the template library; y kn is the nth component of the kth template image vector in the template library, y ki is the i-th component of the k-th template image vector in the template library; G is the image grayscale mean, σ is the standard deviation of the grayscale distribution, σ max is the historical maximum value of the standard deviation of the grayscale distribution, d is the mean distance from each pixel to the center of the image, and d max The maximum historical average distance from each pixel to the center of the image.
[0101] In some embodiments, the image preprocessing of the acquired image includes performing denoising processing using Gaussian filtering.
[0102] In some embodiments, the method of selecting a matching template according to a similarity score and geometrically aligning and correcting the image content based on the matching template includes: first, selecting a template image with the largest cosine similarity value, and using a SIFT feature detection algorithm to extract feature points of the input image and the template image; second, using a KNN feature matching algorithm to match feature points to obtain key point pairs between the input image and the template image; third, based on the matching point pairs, using a RANSAC algorithm to calculate the homography matrix between the input image and the template image; then, based on the homography matrix, using a perspective transformation method to geometrically transform the input image so that its content is aligned with the template image in geometric position; finally, outputting the aligned image.
[0103] The present invention provides a method and system for project management based on a rule engine, which can achieve the following beneficial technical effects:
[0104] 1. The present invention obtains images of scanned copies of information materials or collects images through a CCD camera; pre-processes, geometrically aligns and corrects the images, extracts global embedding vectors using a ResNet pre-trained model, combines an improved cosine similarity matching template, and completes alignment through perspective transformation; uses OCR recognition technology to extract text content, and matches field formats through regular expressions to convert text into structured data; uses a rule engine to check structured data, etc., generates a list of questions and sends it to the user. The present invention improves the efficiency and accuracy of information material inspection, is applicable to a variety of document scenarios such as contracts, bills and receipts, and has high adaptability and broad application prospects.
[0105] 2. This application improves information processing efficiency. By combining image preprocessing, deep learning models and OCR recognition technology, it realizes the automated collection, text extraction and data conversion of engineering project information, avoiding the lengthy process of traditional manual inspection and greatly improving information processing efficiency. Improve inspection accuracy, use deep learning models to extract global image features, combine with improved cosine similarity matching templates, and ensure the alignment accuracy of text content through geometric alignment and correction technology, thereby significantly improving the accuracy of OCR recognition.
[0106] 3. Multi-dimensional verification of structured data is performed through the rule engine, including format verification, logic verification, data integrity verification and uniqueness verification, which can quickly discover errors in the data and reduce human misjudgment. Enhance adaptability and flexibility. The present invention supports flexible processing of various types of information materials such as contracts, bills, and receipts, and dynamically adjusts template matching rules in combination with improved cosine similarity to adapt to diverse scenarios of different documents. The rule engine supports users to dynamically expand and adjust verification rules according to actual needs, enhancing the flexibility and adaptability of the system. Realize automation and closed-loop management. Through modular design, the present invention organically integrates information collection, preprocessing, text extraction, error checking and problem feedback, realizes full-process automation and closed-loop management of engineering project document management, and significantly improves the level of intelligent project management.
[0107] 4. Wide scope of application: the present invention is applicable to the management of engineering projects of various sizes, especially in large-scale and complex projects. It can effectively process massive information and data, ensure the integrity and accuracy of the data, and provide reliable technical support for engineering management.
[0108] The above is a detailed introduction to a project management method and system based on a rule engine. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the core idea of the present invention. At the same time, for those skilled in the art, according to the ideas and methods of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A project management method based on rule engine, characterized in that: Includes steps: S1: Obtaining a scanned image of information or using a CCD camera to capture an image of information, the information including contract, bill or document information; S2: Perform image preprocessing on the acquired images, and perform geometric alignment and correction on the preprocessed images. The steps of geometric alignment and correction are as follows: S21: Use the ResNet pre-trained model to extract the global embedding vector of the image and give the information type; S22: for different types of information, using the corresponding improved cosine similarity to calculate the similarity between the collected image and the template image in the template library; S23: selecting a matching template according to the similarity score, and geometrically aligning and correcting the image content based on the matching template; S3: Use OCR recognition technology to extract text content and convert it into structured data: S4: Use the rule engine to check structured data according to preset rules and detect errors in the data; S5: Output the inspection results to generate a question list and send it to the user.
2. A method for project management based on a rule engine as claimed in claim 1, characterized in that: For different types of information, the corresponding improved cosine similarity is used to calculate the similarity between the collected image and the template image in the template library, specifically: When the information type is contract, the improved cosine similarity is as follows: When the information material type is bill, the improved cosine similarity is as follows: When the information material type is a document, the improved cosine similarity is as follows: Among them, V is the global embedding vector extracted by the ResNet pre-training model, Y k is the kth template image vector in the template library, V = [v1, v2, ..., v n ],Y ki =[y k1 ,y k2 ,...,y kn ], n is the vector latitude, v1 is the first component in the global embedding vector V, v2 is the second component in the global embedding vector V, v i is the i-th component in the global embedding vector V; y k1 The first component of the kth template image vector in the template library, y k2 The second component of the kth template image vector in the template library; y kn is the nth component of the kth template image vector in the template library, y ki is the i-th component of the k-th template image vector in the template library; G is the image grayscale mean, σ is the standard deviation of the grayscale distribution, σ max is the historical maximum value of the standard deviation of the grayscale distribution, d is the mean distance from each pixel to the center of the image, and d max The maximum historical average distance from each pixel to the center of the image.
3. A method for project management based on a rule engine as claimed in claim 1, characterized in that: The image preprocessing performed on the collected image includes performing denoising processing using Gaussian filtering.
4. The engineering project management method based on rule engine according to claim 1, characterized in that: The method selects a matching template according to a similarity score, and performs geometric alignment and correction on the image content based on the matching template, including: first, selecting a template image with the largest cosine similarity value, and using a SIFT feature detection algorithm to extract feature points of an input image and a template image; second, using a KNN feature matching algorithm to perform feature point matching to obtain key point pairs between the input image and the template image; third, based on the matching point pairs, using a RANSAC algorithm to calculate a homography matrix between the input image and the template image; then, based on the homography matrix, using a perspective transformation method to perform a geometric transformation on the input image, so that its content is aligned with the template image in terms of geometric position; and finally, outputting the aligned image.
5. The engineering project management method based on rule engine according to claim 1, characterized in that: The method of extracting text content by using OCR recognition technology and converting it into structured data includes: first, extracting text content in an image by using OCR recognition technology; then, segmenting and locating the extracted text content based on regular expression matching field format; third, cleaning and formatting the segmented field content, removing irrelevant characters and converting the data into a standard format; finally, constructing a structured data format according to field names and field values, and storing it in JSON data format.
6. A method for project management based on a rule engine as claimed in claim 1, characterized in that: The rule engine is used to check structured data according to preset rules to detect errors in the data, including: loading preset format verification rules: checking whether the date field value conforms to the standard date format YYYY-MM-DD; checking whether the amount field value is a numeric type and is a positive number; checking whether the number field value conforms to the fixed-length letter and number combination rule; matching the rules for each field in the structured data and verifying the field value; for fields that fail the rule check, recording the field name, rule type and error description; summarizing all error information and generating a problem list.
7. A project management system based on rule engine, characterized in that: include: An acquisition module acquires scanned images of information materials or uses a CCD camera to capture images of information materials, the information materials including contract, bill or document information; The preprocessing and geometric alignment and correction module performs image preprocessing on the collected images, and performs geometric alignment and correction on the preprocessed images. The geometric alignment and correction steps are as follows: use the ResNet pre-training model to extract the global embedding vector of the image and give the information data type; for different types of information data, use the corresponding improved cosine similarity to calculate the similarity between the collected image and the template image in the template library; select the matching template according to the similarity score, and perform geometric alignment and correction on the image content based on the matching template; OCR recognition module: Use OCR recognition technology to extract text content and convert it into structured data: Check module: Use the rule engine to check structured data according to preset rules and detect errors in the data; Notification module: Outputs inspection results and generates a problem list to send to the user.
8. The engineering project management system based on rule engine as claimed in claim 7, characterized in that: For different types of information, the corresponding improved cosine similarity is used to calculate the similarity between the collected image and the template image in the template library, specifically: When the information type is contract, the improved cosine similarity is as follows: When the information material type is bill, the improved cosine similarity is as follows: When the information material type is a document, the improved cosine similarity is as follows: Among them, V is the global embedding vector extracted by the ResNet pre-training model, Y k is the kth template image vector in the template library, V = [v1, v2, ..., v n ],Y ki =[y k1 ,y k2 ,...,y kn ], n is the vector latitude, v1 is the first component in the global embedding vector V, v2 is the second component in the global embedding vector V, v i is the i-th component in the global embedding vector V; y k1 The first component of the kth template image vector in the template library, y k2 The second component of the kth template image vector in the template library; y kn is the nth component of the kth template image vector in the template library, y ki is the i-th component of the k-th template image vector in the template library; G is the image grayscale mean, σ is the standard deviation of the grayscale distribution, σ max is the historical maximum value of the standard deviation of the grayscale distribution, d is the mean distance from each pixel to the center of the image, and d max The maximum historical average distance from each pixel to the center of the image.
9. The engineering project management system based on rule engine as claimed in claim 7, characterized in that: The image preprocessing performed on the collected image includes performing denoising processing using Gaussian filtering.
10. The engineering project management system based on rule engine as claimed in claim 7, characterized in that: The method selects a matching template according to a similarity score, and performs geometric alignment and correction on the image content based on the matching template, including: first, selecting a template image with the largest cosine similarity value, and using a SIFT feature detection algorithm to extract feature points of an input image and a template image; second, using a KNN feature matching algorithm to perform feature point matching to obtain key point pairs between the input image and the template image; third, based on the matching point pairs, using a RANSAC algorithm to calculate a homography matrix between the input image and the template image; then, based on the homography matrix, using a perspective transformation method to perform a geometric transformation on the input image, so that its content is aligned with the template image in terms of geometric position; and finally, outputting the aligned image.
Citation Information
Cited By
Document data general conversion method and device
CN120409426A